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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
case WM_CREATE: {
CreateWindow (
"button",
"+",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
20,
50,
30,
30,
hwnd,
(HMENU) 1000,
((LPCREATESTRUCT) lParam)->hInstance,
NULL
);
break;
}
case WM_COMMAND: {
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
if(LOWORD(wParam) == 1000){
std::string s = std::to_string(mypage+1);
char const *pchar = s.c_str();
CreateWindow (
"static",
"Page",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
20,
100+mypage*175,
130,
170,
hwnd,
(HMENU) 1001,
NULL,
NULL
);
if(LOWORD(wParam) == 1000){
CreateWindow (
"button",
"G",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
25,
120+(mypage-1)*175,
20,
20,
hwnd,
(HMENU) 10001,
NULL,
NULL
);
}
if(LOWORD(wParam) == 10001){
if(mystack < 4){
std::string gtr = " GTR";
std::string mystrgtr = std::to_string(mynum+1);
instrument = (mystrgtr.append(gtr)).c_str();
CreateWindow (
"button",
instrument,
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
25,
145+30*mystack,
95,
30,
hwnd,
(HMENU) 10005,
NULL,
NULL
);
}
mystack += 1;
}
|