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
|
case WM_CREATE: {
CreateWindow (
"button",
"+",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
20,
90,
30,
30,
hwnd,
(HMENU) 1000,
((LPCREATESTRUCT) lParam)->hInstance,
NULL
);
break;
}
case WM_COMMAND: {
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
if(LOWORD(wParam) == 1000){//"+"
mypage++;
if(mystack0 == 4){
mypage2++;
mystack0 = 0;
}
}
if(LOWORD(wParam) == 1000){//"+"
CreateWindow (
"button",
"G",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
25,
140,
20,
20,
hwnd,
(HMENU) 10001,
NULL,
NULL
);
}
if(LOWORD(wParam) == 10001){//"G"
if(mystack0 < 4){
CreateWindow (
"button",
"GTR",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
25,
165,
95,
30,
hwnd,
(HMENU) (10005+mystack),
NULL,
NULL
);
mystack0 += 1;
mystack += 1;
X.push_back(0);
Y.push_back(0);
}
}
for(int i = 0; i < mystack; i++){//"GTR"
if(LOWORD(wParam) == (10005+i)){
RedrawWindow(hwnd, &lprcUpdate, hrgnUpdate, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW );
break;
}
}
break;
}
|