Autor Beitrag
Flash106
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 24.06.06 12:21 
Hallo,

ich habs jetzt geschafft die Größe eines Fensters zu ermitteln und mein Formular dementsprächend anzu passen. Jetzt möchte ich das ganze andersrum machen. Ich will das das externe fenster auf eine bestimmte setzen. Ich hab setwindowrect in der api gefunden aba das gibt es wohl nicht unter d2005 ?!?!? Es gibt SetWindowRgn aba ich weis nicht wie man das benutzt... kannn mir wer helfen?? Danke!!
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 24.06.06 16:27 
Wo hast du diese Funktion gefunden? Mein aktuelles PSDK kennt sie nicht.
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 24.06.06 18:54 
auf der msdn seite. Ich habs jetzt mal mit SetWindowRgn versucht aba das klappt nicht. ich hab das handle des fensters aba wenn ich SetWindowRgn aufrufe mit den neuen paramter der größe verändert sich mein form oO ...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 24.06.06 19:00 
Meinst du das: msdn.microsoft.com/l...thods_(S-Z)_1541.asp Dann guck mal, was dadrübersteht:
Zitat:
MSDN Home > MSDN Library > Office Solutions Development > Visio 2002


Und zu SetWindowRgn:
Zitat:
The SetWindowRgn function sets the window region of a window. The window region determines the area within the window where the system permits drawing. The system does not display any portion of a window that lies outside of the window region

Da geht es um den Zeichenbereich und nicht um die Fenstergröße, kann also nicht gehen.
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 24.06.06 20:11 
gut verstehe. Welche möglichkeiten habe ich denn noch die Breite eine Fensters zuändern?? Muss doch gehen oder??
0xCC
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 150



BeitragVerfasst: Sa 24.06.06 20:24 
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Sa 24.06.06 20:39 
Das verstehe ich nicht es passiert das gleich! ICh verschiebe mein Form.. das das Fenster.. hier mal der source:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
Procedure TForm1.FormPaint(Sender: TObject);
var
  wnd: HWND;
begin
  Form1.ClientHeight := TaskbarHight - 9;
  wnd :=  FindWindow('Shell_TrayWnd'nil);
  wnd :=  FindWindowEx(wnd, 0'ReBarWindow32'nil);
  wnd :=  FindWindowEx(wnd, 0'ToolbarWindow32''toolbar');

  if wnd <> 0 then
  begin
    Form1.ParentWindow := wnd;
    SetWindowPos(wnd,HWND_TOP,0,0,10,10,SWP_SHOWWINDOW); // irgendwelche testwerte
  end;
end;


mein programm läuft in der taskleiste in einer Symbolleiste. Und ich will die Symbolleiste an die größe meines Forms anpassen. Es klappt nicht...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 25.06.06 23:49 
Ich weiß nicht, was du da machst und auch nicht wie du das machst, aber das hört sich irgendwie nach einem Suche in der Delphi-PRAXiS DESKBAND an.