Posts: 1,000
Threads: 253
Joined: Feb 2008
How do you set up a dialog that can be resized to have a limit on the smallest you can make the dialog?
i.e. dialog will not go any smaller than 200 x 200.
Thanks,
Jimmy Vig
Posts: 1,000
Threads: 253
Joined: Feb 2008
This works, but is very glitchy looking.
Function
FTP_Text
Trigger
CSa
,case WM_SIZE
,int x y cx cy
,GetWinXY hDlg x y cx cy
,if cx<400
,,MoveWindow hDlg x y 400 400 1
,if cy<400
,,MoveWindow hDlg x y 400 400 1
Posts: 11,924
Threads: 138
Joined: Dec 2002
Function
FTP_Text
,case WM_SIZING
,RECT& r=+lParam
,if(r.right-r.left<400) r.right=r.left+400
,if(r.bottom-r.top<400) r.bottom=r.top+400
Actually need more code to make all correct. Read about WM_SIZING in MSDN library.
Posts: 1,000
Threads: 253
Joined: Feb 2008
Crazy error!
Exception 0xC0000005. Access violation. Cannot read memory at 0x26401E8. In qm.exe at 0x468194 (0x400000+0x68194).
Posts: 11,924
Threads: 138
Joined: Dec 2002
Did you change WM_SIZE to WM_SIZING?
Posts: 1,000
Threads: 253
Joined: Feb 2008
Ha ha...I didn't notice that change.
Thanks...works like a charm