Win32


Windows OWL - . 57


   Windows

28-2 , .

// 28-2.

// 28-2.h #define INPUTDLG 100 #define CM_INPUT 201 #define CM_OPEN 202 #define CM_SAVE 203 #define CM_EXIT 24310 #define IDC_NAME 101 #define IDC_JOB 102 #define IDC_YEAR 103 #define IDC_M 104 #define IDC_F 105 #define IDC_ADD 106 #define MAXENTRIES 20 /* .*/ typedef struct{

char nameEdit[20];

char jobEdit[20];

char yearEdit[5];

bool mEdit;

bool fEdit;

}TSB;

// 28-2.rc #include "28-2.h" MainMenu MENU{ POPUP ""{

MENUITEM " ...",CM_INPUT MENUITEM "...",CM_OPEN


258 28

MENUITEM "...",CM_SAVE MENUITEM SEPARATOR MENUITEM "",CM_EXIT }

}

INPUTDLG DIALOG 7,37,222,130

STYLE DS_MODALFRAME|WS_POPUP| WS_VISIBLE|WS_CAPTION|WS_SYSMENU CLASS "bordlg"

CAPTION " " FONT 8, "MS Sans Serif"{

EDITTEXT IDC_NAME,69,12,137,12

RTEXT "",-1,11,15, 53, 9

EDITTEXT IDC_JOB,69,35,137,12

RTEXT "",-1,10,38, 54, 9

EDITTEXT IDC_YEAR,69,58,37,12

RTEXT " ",-1,11, 61, 54, 9

CONTROL "M",IDC_M,"BUTTON",BS_AUTORADIOBUTTON,123, 58, 20,12

CONTROL "",IDC_F,"BUTTON",BS_AUTORADIOBUTTON, 162, 58,20,12

CONTROL "",IDC_ADD,"BorBtn",BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE,40, 93, 37, 25

CONTROL "",IDOK,"BorBtn",BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE,145,93,37, 25

CONTROL '",-1,"BorShade",BSS_HDIP|BSS_LEFT|WS_CHILD|WS_VISIBLE,6,80,206,2

}

// 28-2.cpp

#include <owl\framewin.h>