012
11.04.2004, 19:36 Uhr
RedEagle
|
Fehler gefunden, es lag an der regestrierung
Nächstes Problem: Wenn ich 1 Fenster schließe, werden alle geschlossen wie kann ich das verhindern
C++: |
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; static HWND hwndButton1, hwndButton2, hwndButton3, hwndButton4, hwndButton5, hwndButton6, hwndButton7, hwndButton8, hwndButton9, hwndButton10, hwndButton11, hwndButton12, hwndButton13; switch(message) { case WM_PAINT : hdc = BeginPaint (hwnd, &ps); SetTextColor(hdc, RGB(25 , 25 , 200)); SetBkColor (hdc, RGB(0 , 150, 255)); TextOut(hdc, 30, 20, "Hauptmenue", 10); //device context, x, y, string, string-Länge EndPaint (hwnd, &ps); return 0; case WM_CREATE : hwndButton1 = CreateWindow("button", schaltfl_01.c_str(), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 19, 50, 110, 20, hwnd, (HMENU)1, (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE), NULL); hwndButton13 = CreateWindow("button", schaltfl_13.c_str(), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 19, 300, 110, 20, hwnd, (HMENU)13, (HINSTANCE) GetWindowLong (hwnd, GWL_HINSTANCE), NULL); return 0; case WM_COMMAND : switch(LOWORD(wParam)) { case 1 : ShowWindow(hwnd1, SW_NORMAL); UpdateWindow(hwnd1); break;
case 13 : PostQuitMessage(0); return 0; } break; case WM_DESTROY : PostQuitMessage(0); return 0; } return DefWindowProc (hwnd, message, wParam, lParam); }
//////////////////////////////////////////////////////////////////////////////// /// 1 Office
LRESULT CALLBACK WndProc1 (HWND hwnd1, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; PAINTSTRUCT ps; static HWND hwndButton1, hwndButton2, hwndButton3, hwndButton4, hwndButton5, hwndButton6, hwndButton7, hwndButton8, hwndButton9, hwndButton10, hwndButton11, hwndButton12, hwndButton13; switch(message) { case WM_PAINT : hdc = BeginPaint (hwnd1, &ps); SetTextColor(hdc, RGB(25 , 25 , 200)); SetBkColor (hdc, RGB(0 , 150, 255)); TextOut (hdc, 30, 20, "Office", 6); EndPaint (hwnd1, &ps); return 0;
case WM_CREATE : hwndButton13 = CreateWindow("button", schaltfl_13.c_str(), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 19, 300, 110, 20, hwnd, (HMENU)13, (HINSTANCE) GetWindowLong (hwnd1, GWL_HINSTANCE), NULL); return 0; case WM_COMMAND : switch(LOWORD(wParam)) { case 13 : PostQuitMessage(0); return 0; } break; case WM_DESTROY : PostQuitMessage(0); return 0; } return DefWindowProc (hwnd1, message, wParam, lParam); }
|
-- MFG RedEagle Dieser Post wurde am 11.04.2004 um 19:36 Uhr von RedEagle editiert. |