mein 2win spinnt
-
also ich hab folgendes problem ich mach 2wins aber ich komm nie in die Procedure vom 2 win !!
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT, WPARAM, LPARAM); LRESULT CALLBACK BoxProcedure (HWND hwnd, UINT, WPARAM, LPARAM); int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil) { MSG messages={0}; WNDCLASSEX wincl={0}; wincl.hInstance = hThisInstance; wincl.lpszClassName = szClassName; wincl.lpfnWndProc = WindowProcedure; wincl.style = CS_DBLCLKS; wincl.cbSize = sizeof (WNDCLASSEX); wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION); wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION); wincl.hCursor = LoadCursor (NULL, IDC_ARROW); wincl.lpszMenuName = NULL; wincl.cbClsExtra = 0; wincl.cbWndExtra = 0; wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND; if (!RegisterClassEx (&wincl)) return 0; HWND hwnd = CreateWindowEx ( 0, szClassName, "Controlwindow", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 500, 200, HWND_DESKTOP, NULL, hThisInstance, NULL ); WNDCLASSEX box={0}; box.hInstance = hThisInstance; box.lpszClassName = szBoxName; box.lpfnWndProc =BoxProcedure; box.style = CS_DBLCLKS; box.cbSize = sizeof (WNDCLASSEX); box.hIcon = LoadIcon (NULL, IDI_APPLICATION); box.hIconSm = LoadIcon (NULL, IDI_APPLICATION); box.hCursor = LoadCursor (NULL, IDC_ARROW); box.lpszMenuName = NULL; box.cbClsExtra = 0; box.cbWndExtra = 0; box.hbrBackground = (HBRUSH) COLOR_BACKGROUND; if (!RegisterClassEx (&box)) return 0; HWND picbox = CreateWindowEx ( 0, szClassName, "Picturewindow", WS_OVERLAPPEDWINDOW, 0, 0, 814, 639, HWND_DESKTOP, NULL, hThisInstance, NULL ); ShowWindow (hwnd, nFunsterStil); ShowWindow (picbox, nFunsterStil); while (GetMessage (&messages, NULL, 0, 0)) { TranslateMessage(&messages); DispatchMessage(&messages); } return messages.wParam; }
-
Wenn du Hilfe willst solltest du schon etwas ausführlicher werden - aber mir scheint, du willst uns eh nur veralbern

-
wieso ich will euch nich veralbern nur das mein programm nie in die BoxProcedure (HWND hwnd, UINT, WPARAM, LPARAM);
kommt *heul*
-
Sorry, das schien mir vorhin so

Erstellst du denn auch noch irgendwo ein Fenster dieser 2. Fensterklasse?! (du verwendest bei beiden Fenstern szClassName als Fensterklasse)
-
juhu verdammter kopierungsfehler
großeß thx @flenders