Sizing a window by sizing it's client area?

Started by Heinz Grandjean, January 20, 2010, 01:11:33 PM

Previous topic - Next topic

Heinz Grandjean

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

David Kenny

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

José Roca

If you use my Windows API Headers, in WinCtrl.inc there is a function called Window_SetClientSize (hwnd, nWidth, nHeight) that does the job.

Heinz Grandjean

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