Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Zitat von »"C++ Lerner"«
Also die exe in scr zu ändern schaff ich noch
C-/C++-Quelltext |
|
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 |
#include <windows.h> int WINAPI WinMain (HINSTANCE hI, HINSTANCE hPrI, PSTR szCmdLine, int iCmdShow) { char AppName[] = "Das Fenster"; WNDCLASS Class; Class.style = CS_HREDRAW | CS_VREDRAW; Class.lpfnWndProc = WndProc; Class.cbClsExtra = 0; Class.cbWndExtra = 0; Class.hInstance = hI; Class.hCursor = LoadCursor (NULL, IDC_ARROW); Class.hbrBackground = (HBRUSH) GetStockObject (BLACK_BRUSH); Class.lpszMenuName = NULL; Class.lpszClassName = AppName; RegisterClass(&Class); HWND Window = CreateWindow (AppName, "", WS_SYSMENU | WS_THICKFRAME, 0, 0, 200, 100, NULL, NULL, hI, NULL); ShowWindow(Window,iCmdShow); UpdateWindow(Window); } |
Zitat
The WndProc is the function you write to receive all input directed at your window. You will have already told Windows to call this function with messages by supplying a pointer to this function in the class structure (it is a callback function).
Werbeanzeige