Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Larger Custom Dialog at Design Time
#1
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.
#2
The current Dialog Editor version cannot create dialogs that are too big for the Dialog Editor window, because there are no scrollbars.
#3
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"     Help - how to add the trigger to the macro
Code:
Copy      Help
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.


Forum Jump:


Users browsing this thread: 1 Guest(s)