11-08-2014, 09:38 AM
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"
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.
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
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.