Hi, how i can resize my dlg ?
Greets Red Forginforcer
Greets Red Forginforcer
Hi, how i can resize my dlg ?
Greets Red Forginforcer
Dont you do any research on a topic you ask here yourself?
Red,
Here is a tip, get the window handle of the dialog, (first parameter passed to dialog proc) and use the API "MoveWindow" to change its size.
You can also use the API SetWindowPos but its a bit harder to use.
Regards,
hutch@movsd.com
Here is a tip, get the window handle of the dialog, (first parameter passed to dialog proc) and use the API "MoveWindow" to change its size.
You can also use the API SetWindowPos but its a bit harder to use.
Regards,
hutch@movsd.com
thanks for your help. I didn't know thats this function also do that.
But, I also replace the Dlg.
INVOKE GetWindowRect, hDlg, ADDR tempRec
INVOKE SetWindowRgn, hDlg,tempRec, 1
Thats my current code.
How I can give tempRec new values ?
Greets Red Forginforcer
But, I also replace the Dlg.
INVOKE GetWindowRect, hDlg, ADDR tempRec
INVOKE SetWindowRgn, hDlg,tempRec, 1
Thats my current code.
How I can give tempRec new values ?
Greets Red Forginforcer
mov DWORD PTR, 200 ;left
mov DWORD PTR, 200 ;top
mov DWORD PTR, 200 ;right
mov DWORD PTR, 200 ;bottom
btw you should be using the api MoveWindow and not SetWindowRgn.
mov DWORD PTR, 200 ;top
mov DWORD PTR, 200 ;right
mov DWORD PTR, 200 ;bottom
btw you should be using the api MoveWindow and not SetWindowRgn.
Red,
I made you the suggestion with the two functions for a reason, they are the two that CAN change a window size, the one you are trying to use is wrong.
With this code,
INVOKE GetWindowRect, hDlg, ADDR tempRec
INVOKE SetWindowRgn, hDlg,tempRec, 1
The second "invoke" has an error, you should use ADDR with tempRec on both lines.
The suggestion by roticv is fine but you can address a LOCAL rect structure directly with code like,
Regards,
hutch@movsd.com
I made you the suggestion with the two functions for a reason, they are the two that CAN change a window size, the one you are trying to use is wrong.
With this code,
INVOKE GetWindowRect, hDlg, ADDR tempRec
INVOKE SetWindowRgn, hDlg,tempRec, 1
The second "invoke" has an error, you should use ADDR with tempRec on both lines.
The suggestion by roticv is fine but you can address a LOCAL rect structure directly with code like,
mov rct.left, 100
mov rct.top, 150
mov rct.right, 75
mov rct.bottom, 125
Regards,
hutch@movsd.com