, . , , .
́ , . . : public.
. : private, protected, internal.
- , , . , , .
( )
, () ( ) , . , - - . - , . ( ) () , .
(. initialization) .
2) , (, ) . (). . , .
- .
Windows , . . Windows ( API) . switch , . . MFC . .
|
|
Windows, - , , . , Windows , DOS. - ( , device context), . , , . , .
WM_PAINT
Windows , . , , , , WM_PAINT. .
WM_TIMER
Windows , . (, ) . WM_TIMER. . , - . , , .
WM_DESTROY
, . , . . :
WM_CLOSE - , . . , . , . .
WM_ACTIVATE - , . , , - . :
WM_GETMINMAXINFO - . .
WM_COPYDATA - , .
SendMessage , . PostMessage, .
:
?
/, , , . . , , . , . , / .
|
|
, ?
Windows. . . .
. , .
, , . . , Windows , .
Windows - , , . , , , .
- GetMessage DispatchMessage.
GetMessage . , .
DispatchMessage . , , . , . Windows - DispatchMessage.
:
Windows, - . , , , , . Windows , , .
WinMain GetMessage , DispatchMessage.
, . , . GetMessage, . , DispatchMessage.
, , .
WM_CREATE . ( C++). windows.h, Windows.
, , . , , .
( ) WM_DESTROY. . WM_CREATE - , ( ) WM_DESTROY.
|
|
5) ́ , ( ).
6) ,
7) ++
++ MS DOS, Windows. ++ , , ++ -. - , - () .
Windows 16- 32- ().. , ( exe)
Windows
Windows Windows, . , Windows. , Windows .
( HINSTANCE, hInstance) . ( ). .
( HINSTANCE, hPrevInstance) , . , .
( LPSTR) , , .
( int, nCmdShow) ( , , ).
Windows- :
1. Windows . , , . Windows .
2. . , .
3. , . , <Alt> + <F4>. Windows.
8) Windows ( , , ..) :
) ( DECLARE_RESPONSE_TABLE)
) ( DEFINE_RESPONSE_TABLE1 END_RESPONSE_TABLE, a
, )
|
|
) ,
Windows
9) - "", .. , #define, . #define , ( ) , , .
10) new - .
new . new , . , new, C++ delete. , , delete.
new:
. , . , , - , - .
, , , , new. , .
, new, new , , NULL.
11) , "" "", .
, virtual, .