Posts: 2
Threads: 2
Joined: Jun 2014
I need to create a tall window with a lot of controls, I've got the resizing down at runtime, but at design-time, the dialog window is small, how can I enlarge it at design-time, so I can get a accurate preview instead of resizing the window every time I run the script.
Posts: 12,140
Threads: 142
Joined: Dec 2002
The current Dialog Editor version cannot create dialogs that are too big for the Dialog Editor window, because there are no scrollbars.
Posts: 12,140
Threads: 142
Joined: Dec 2002
This function scrolls the client area of the dialog in the Dialog Editor when you drag it with the middle mouse button.
Create new function, paste this code, and paste the trigger string in the Trigger field above macros. The function will run automatically when need.
Function
dialog_editor_scroll
Trigger
!ca"Dialog Editor" "QM_DE_class"
int hwnd=TriggerWindow
if(!hwnd) hwnd=win("Dialog Editor" "QM_DE_class")
int c=child("" "#32770" hwnd 0x0 "style=0x8000000 0x8000000")
POINT p pp; int mbPressed
rep
,0.05
,if(hwnd!=win) if(IsWindow(hwnd)) continue; else ret
,ifk- (4); mbPressed=0; continue
,xm p
,if !mbPressed
,,mbPressed=1
,else
,,if(!memcmp(&p &pp sizeof(p))) continue
,,ScrollWindowEx(c p.x-pp.x p.y-pp.y 0 0 0 0 SW_SCROLLCHILDREN)
,,InvalidateRect c 0 1
,pp=p
It is not perfect:
When saving, saves the current scrolled position. To save normal position, before saving need to scroll (middle-drag) back to the normal position, and click Save (Apply in old versions).
Ignores grid.