Азбука программирования в Win32 API


Азбука программирования в Win32 API - стр. 157


Dialog I DIALOG 2, 40, 250, 108

STYLE DSJDLOOK  DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE

FONT 8, "MS Sans Serif'

{

DEFPUSHBUTTON "OK". IDOK, 24, 65, 50, 14

CONTROL "This is a text in the first dialog", -1, "static". SSJ.EFT | WS_CHILD | WS VISIBLE, 20, 13,96,9

Dialog2 DIALOG 2, 40, 250, 108

STYLE DS_3DLOOK  DS_CONTEXTHELP

FONT 8. "MS Sans Serif"

WS POPUP I WS VISIBLE

DEFPUSHBUTTON "OK", IDOK, 24, 65, 50, 14

CONTROL "This is a text in the second dialog", -1, "static", SS_LEFT | WSJTHILD | WS VISIBLE, 20, 13, 120.9

Dialog3 DIALOG 2, 40, 250, 108

STYLE DS_3DLOOK | DSJTONTEXTHELP

FONT 8, "MS Sans Serif

WS POPUP I WS VISIBLE

DEFPUSHBUTTON "OK", IDOK, 24, 65, 50, 14

CONTROL "This is a text in the third dialog", -1, "static", SS_LEFT | WS_CHILB WS VISIBLE, 20, 13,96,9

Ниже приводится текст программы:

#includc <windows.h> ^include <commctrl.h> ^include <stdio.h>

188

HINSTANCE hlnst; HWND hWnd;

I.RESULT CALLBACK TabControlWndProc ( HWND. UINT, UINT, LONG ); BOOL CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hlnstance, HINSTANCE hPrevInstance,

LPSTR IpszCmdParam, int nCmdShow ) }

WNDCLASS WndClass ;

MSG Msg;

char szClassName[] = "TabControl";

hlnst = hlnstance; /* Registering our window class */ /* Fill WNDCLASS structure */

WndClass.stylc = CSJTREDRAW | CS_VREDRAW;

WndClass.lpfnWndProc = TabControlWndProc;

WndClass.cbClsExtra = 0;

WndClass.cbWndExtra = 0;

WndClass. hlnstance ~ hlnstance ;

WndCIass.hlcon = Loadlcon (NULL.IDI_APPLICATION);

WndClass.hCursor = LoadCursor (NULL, IDC_ARROW);

WndClass.hbrBackground = (HBRUSH) GetStockObjcct (LTGRAY_BRUSH);

WndClass. Ips/McmiNamc = "";

WndClass. IpszClassName = szClassName;

if ( !RegisterClass(&WndClass) ) {

McssageBox(NULL,"Cannot register class". "Error", MB__OK); return 0;

liWnd = CrcateWindow(szClassName, "Tab Control Demo Program",




Начало  Назад  Вперед



Книжный магазин