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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) /* handle the messages */
{
case WM_CREATE:{
CreateWindow(TEXT("EDIT"), TEXT(""),
WS_VISIBLE | WS_CHILD | WS_BORDER | ES_AUTOHSCROLL,
10, 20, 700, 400,
hwnd,(HMENU) NULL, NULL, NULL
);
//HMENU hMenubar = CreateMenu();
// HMENU hFile= CreateMenu();
// HMENU hOptions = CreateMenu();
// AppendMenu(hMenubar , MF_POPUP,NULL,"Make file");
// SetMenu(hwnd, hMenubar);
CreateWindow(TEXT("EDIT"),TEXT("FILENAME HERE"),
WS_VISIBLE | WS_CHILD | WS_BORDER ,
720, 10, 100,50,
hwnd,(HMENU) NULL, NULL, NULL
);
CreateWindow(TEXT("button"), TEXT("Make FILE"),
WS_VISIBLE | WS_CHILD,
720, 70 , 80, 40,
hwnd,(HMENU) ID_BUTTON, NULL, NULL
);
break;
}
case WM_COMMAND:{
if(LOWORD(wParam)==ID_BUTTON){
}
break;
}
case WM_DESTROY:
PostQuitMessage (0); /* send a WM_QUIT to the message queue */
break;
default: /* for messages that we don't deal with */
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0;
}
|