|
-
March 25th, 2003, 12:32 PM
#1
Simple Dialog in SDI
Hello, my problem:
Need a dialog box to get 2 coordinates (x,y) to draw a rectangle in the main window!! I have managed to do it but only when I resize the window!
Probably a stupid question but... Thankx
-
March 25th, 2003, 12:41 PM
#2
Hi,
After closing the dialog try to invalidate the main window. Look at CWnd::InvalidateRect or SDK
Code:
BOOL InvalidateRect(
HWND hWnd, // handle to window
CONST RECT* lpRect, // rectangle coordinates
BOOL bErase // erase state
);
Regards,
Emanuel Vaduva
-
March 25th, 2003, 12:53 PM
#3
Thank you for answering but...
I have a OnOk function member of MyDialog class that calls Invalidate().
The ideia is when you press the OK button the figure is placed in the main window!
I´m still searching for a solution ( i´m a begginer in this matter)
Thankx again!!
-
March 25th, 2003, 12:58 PM
#4
If you have a pointer to the main wnd in your dialog then call invalidate in OnOK (pMainWnd->InvalidateRect(...)). Otherwise call invalidate for the main wnd after DoModal is finished.
Regards,
Emanuel Vaduva
-
March 25th, 2003, 01:31 PM
#5
Hey!!! It works!!
Thank YOU VERY MUCH!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|