Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

CreateWindowEx liefert kein Handle

  Alt 14. Okt 2007, 17:14
Hi,

Sorry das ich nerve aber bevor ich hier irgendwas kaputt mache muss ich meine Wut in Form dieses Threads loswerden.

Ich erstelle mit CreateWindowEx ein Fenster:

Delphi-Quellcode:
var
  WindowClass: TWndClassEx = (style: 0;
                              lpfnWndProc: @WndProcDispatch;
                              cbClsExtra: 0;
                              cbWndExtra: 4;
                              hIcon: 0;
                              hCursor: 0;
                              lpszMenuName: nil;
                              hIconSm: 0;
                              );
begin
  WindowClass.cbSize := SizeOf(TWndClassEx);
  WindowClass.lpszClassName := 'wnd';
  WindowClass.hInstance := SysInit.hInstance;
  WindowClass.hbrBackground := GetSysColorBrush(COLOR_BTNFACE);
  RegisterClassEx(WindowClass);
end;
Delphi-Quellcode:
FHandle := CreateWindowEx(0,WindowClass.lpszClassname,WindowClass.lpszClassName,
                            WS_CAPTION or WS_SYSMENU or WS_SIZEBOX or WS_MAXIMIZEBOX or WS_MINIMIZEBOX,
                            FLeft,FTop,FWidth,FHeight,HWND_DESKTOP,0,hInstance,nil);
So und ich in FHandle steht nachher ne 0. GetLastError sagt das alles in Ordnung ist. Generell ist überall alles in Ordnung außer das ich kein Handle kriege. Und vor ner verdammten (sry) halben Stunde gings noch und ich hab doch gar nix gemacht man

Also ich könnt ja an die Decke springen. Jetzt da quasi alle meine Probleme gelöst waren geht nix mehr

HELFT MIR -.-

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat