PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Heinz Grandjean on January 20, 2010, 01:11:33 PM

Title: Sizing a window by sizing it's client area?
Post by: Heinz Grandjean on January 20, 2010, 01:11:33 PM
Hello Community,

only beeing a silent reader for some time,
I would be delighted getting answers to the folling question:
Is there an equivalent in FF concerning the DDCode:
"DIALOG SET CLIENT"

Many thanks
Heinz Grandjean
Title: Re: Sizing a window by sizing it's client area?
Post by: David Kenny on January 20, 2010, 01:47:34 PM
Heinz,

No need to be silent... ask away.

Have you tried:
Function FORM1_COMMAND1_BN_CLICKED ( _
                                   ControlIndex     As Long,  _  ' index in Control Array
                                   hWndForm         As Dword, _  ' handle of Form
                                   hWndControl      As Dword, _  ' handle of Control
                                   idButtonControl  As Long   _  ' identifier of button
                                   ) As Long
Local wide&,high&
                                 
Dialog Get Client hWndform To wide&, high&
Dialog Set Client hWndform, wide&+100, high&+10
End Function


Seems to work for me.

David
Title: Re: Sizing a window by sizing it's client area?
Post by: José Roca on January 20, 2010, 01:55:15 PM
If you use my Windows API Headers, in WinCtrl.inc there is a function called Window_SetClientSize (hwnd, nWidth, nHeight) that does the job.
Title: Re: Sizing a window by sizing it's client area?
Post by: Heinz Grandjean on January 22, 2010, 01:56:23 PM
ThankYou, David ans Jose for Your help.

David:
It is interesting that mixing DDT-Style and SDK-Style works together.
But for clarity I don't want to mix both styles.

Jose:
I now use the mentioned API and it works fine.
Thank You for providing us with that code!

Greetings
Heinz Grandjean