- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to draw a curve and text in the MDI window. Its ok, but I have a problem during repetitive and continuous resizings of the MDI window by using edges or the corner. The drawing comes out of the client window.
I have the same problem during continuous moving of the MDI window.
I have the same problem during continuous moving of the MDI window.
I use the following instruction to redraw the MDI window :
case (WM_SIZE)
ret = InvalidateRect (hWnd, NULL_RECT, .TRUE.)
case (WM_SIZE)
ret = InvalidateRect (hWnd, NULL_RECT, .TRUE.)
Please would you mind indicating me the instruction which enables to redraw only, when the left mouse button is up, after having exit the moving or sizing loop?
Moreover, please what is the instruction which disables the resize of MDI window, when the user drags the edge or corner window.
I use Compaq Visual FORTRAN 6.6.
Thank you for your help.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's difficult to tell offhand what went wrong. Actually, I think it's pretty tricky to get (re)painting right in a Win32 application -- not terribly difficult, but there is a lot of places where a wrong set of styles or wrong approach could make difference. I can offer just a general advice, in order of tries:
1) always use WS_CLIPCHILDREN style for everything -- doesn't hurt, and makes repainting work more logical
2) use WS_CLIPSIBLINGS for child windows -- same as 1)
3) Use double-buffering. Specify NULL for hbrBackground in window class.
4) Don't use both CS_VREDRAW.OR.CS_HREDRAW and WM_SIZE handling. Use one or another.
You can disable resize of MDI window by removing styles like WS_BORDER or WS_THICKFRAME from the window styles (you can use WS_EX_DLGFRAME instead if you dislike the crippled look). Also, handling WM_GETMINMAXINFO is another way to go.
Jugoslav
![](/skins/images/8B6E2C8F64F54CBD7F7262AA46F575DA/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page