Einzelnen Beitrag anzeigen

Benutzerbild von turboPASCAL
turboPASCAL

Registriert seit: 8. Mai 2005
Ort: Sondershausen
4.274 Beiträge
 
Delphi 6 Personal
 
#4

Re: CreateWindowEx, Parent + Child erzeugen

  Alt 12. Jul 2009, 10:45
Füge mal folgendes hinzu:

Delphi-Quellcode:
 //...
      zeromemory(@wa, sizeof(wa)); // <--<<
      with wa do begin
        lpszClassName := 'MyParent';
        lpfnWndProc := @MainWndProc;
        Style := CS_VREDRAW or CS_HREDRAW;
        hInstance := hInstance;
        hIcon := LoadIcon(0, IDI_APPLICATION);
        hCursor := LoadCursor(0, IDC_ARROW);
        hbrBackground := (COLOR_WINDOW + 1);
        lpszMenuName := nil;
        cbClsExtra := 0;
        cbWndExtra := 0;
      end;

      zeromemory(@wb, sizeof(wb)); // <--<<
      with wb do begin
        lpszClassName := 'MyChild';
        // ...
Matti
Meine Software-Projekte - Homepage - Grüße vom Rüsselmops -Mops Mopser
  Mit Zitat antworten Zitat