home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 19
/
Freelog019.iso
/
Prog
/
Pratique
/
FichPrin.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2001-01-29
|
1KB
|
43 lines
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "FichPrin.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Edit1Change(TObject *Sender)
{
MessageBeep(0);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
// version du systeme utilise
// on declare comme precise ds l'aide
// une variable de la structure
OSVERSIONINFO veros;
// tjrs selon l'aide, on dimentionne
veros.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
// on appelle l'API concernΘe
::GetVersionEx(&veros);
// on traite la valeur retournee par l'appel
if (veros.dwPlatformId==VER_PLATFORM_WIN32_WINDOWS);
{
if(veros.dwMinorVersion==0)
Edit2->Text=" Windows 95";
else
Edit2->Text=" Windows 98";
}
}
//---------------------------------------------------------------------------