Can a function call a afx_msg function??? [modified]
-
afx_msg void OnSize(UINT nID, int intWidth, int intHeight); This function to change the position of all items on a dialog. Can i call this function by another function to redraw the dialog? If not, does it have another method to re-posit all items? Thx Another Questions: How to set Picture control from invisible to visible? how to get the width and the heigth of a dialog? -- modified at 0:13 Monday 14th August, 2006
-
afx_msg void OnSize(UINT nID, int intWidth, int intHeight); This function to change the position of all items on a dialog. Can i call this function by another function to redraw the dialog? If not, does it have another method to re-posit all items? Thx Another Questions: How to set Picture control from invisible to visible? how to get the width and the heigth of a dialog? -- modified at 0:13 Monday 14th August, 2006
(1)you want to use
WM_SIZE
for redraw a window (2)SeeShowWindow(SW_*)
(3)SeeGetWindowRect(...)
andScreenToClient
_**
**_
WhiteSky
-
afx_msg void OnSize(UINT nID, int intWidth, int intHeight); This function to change the position of all items on a dialog. Can i call this function by another function to redraw the dialog? If not, does it have another method to re-posit all items? Thx Another Questions: How to set Picture control from invisible to visible? how to get the width and the heigth of a dialog? -- modified at 0:13 Monday 14th August, 2006
If you have handle to that window, use SendMessage()for sending message to that window. Which eventually calls OnSize on that window. i.e.
SendMessage(hWnd,WM_SIZE,wParam,lParam);
Prasad Notifier using ATL
-
(1)you want to use
WM_SIZE
for redraw a window (2)SeeShowWindow(SW_*)
(3)SeeGetWindowRect(...)
andScreenToClient
_**
**_
WhiteSky
But how to call onSize function? And also how to set the picture control to visible?? thx a lot
-
But how to call onSize function? And also how to set the picture control to visible?? thx a lot
use
SendMessage(...)
this method send messages to window and seeWM_SIZE
nWidth=LOWORD
andheight=HIWORD
_**
**_
WhiteSky