Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Limiting the minimum size of dialog.
#1
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
#2
This works, but is very glitchy looking.

Function FTP_Text
Trigger CSa     Help - how to add the trigger to the macro
Code:
Copy      Help
,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
#3
Function FTP_Text
Code:
Copy      Help
,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.
#4
Crazy error!

Exception 0xC0000005. Access violation. Cannot read memory at 0x26401E8. In qm.exe at 0x468194 (0x400000+0x68194).
#5
Did you change WM_SIZE to WM_SIZING?
#6
Ha ha...I didn't notice that change.

Thanks...works like a charm Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)