1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
// création Edit
HWND hName = CreateWindow(
"EDIT", // type edit
NULL, // champ vide par défaut
WS_CHILD | WS_VISIBLE | ES_LOWERCASE | WS_BORDER, // composant de la fenêtre, visible, force la casse minuscule
100, // x
10, // y
120, // width,
20, // height,
hwnd, // parent
(HMENU)IDC_EDIT, // identifiant (cf header)
((LPCREATESTRUCT)lParam)->hInstance, // hInstance
NULL // pas de paramètre à passer
);
// création Bouton Ok
HWND hOk = CreateWindow(
"BUTTON", // type bouton
"&Ok", // Texte du bouton
WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
160, // x
70, // y
60, // width,
25, // height,
hwnd, // parent
(HMENU)IDC_BUTTON, // identifiant (cf header)
((LPCREATESTRUCT)lParam)->hInstance, // hInstance
NULL // pas de paramètre à passer
); |
Partager