RE: Controls won't get resized in deep window hierarchies
"Nenad Stefanovic" <[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <001601c9c0da$486df8e0$d949eaa0$@com> |
This is pretty strange problem. Based on the description, it seems to me that it is related to the stack size. Just for fun, I tried that on Vista 32-bit - I was able to get ~30 levels deep. I was also able to go much further by posting a custom message on 20-th level, and in handler for that message do the same as WM_SIZE handler would do. So, you can do the same - you'll need to change some of the classes that you have. Now, after saying all this, I have to note that if you have more than 15 level deep hierarchy, you should consider redesigning your app. I know that splitters, panes, etc. can easily add depth levels, but over 15 sounds a bit extreme. Cheers, Nenad From: [email protected] [mailto:[email protected]] On Behalf Of Catalin Rotaru Sent: Thursday, April 16, 2009 1:35 PM To: [email protected] Subject: [wtl] Controls won't get resized in deep window hierarchies We have an application with a complex hierarchy of Splitters, Pannels and Resizable dialog-views. Recently we noticed that on 64-bit Vista resizing the main frame would fail to resize the inner-most windows or controls. A bit of research got me to this: http://blogs.msdn.com/alejacma/archive/2008/11/20/controls-won-t-get-resized -once-the-nesting-hierarchy-of-windows-exceeds-a-certain-depth-x64.aspx Turns out that recursive calls WM_SIZE must not exceed a certain depth which on x64 is not very large. It's a known bug. An awful one. Yet another reason to make me want to switch to a HWND-free framework, and to never have to deal with the problems and limitations Microsoft has in Windows' controls. Anyway, the question is now: what to do? Anybody had encountered this problem before? Suggestions of a workaround? I can't exactly change my hierarchy thus I need a way to deliver the WM_SIZE messages non-recursively. But they are triggered by main frame resizes and the recursive calls are in CDialogResize, Splitter and Panel. So I am at a loss. Any suggestions are GREATLY appreciated. Thanks, Cata [Non-text portions of this message have been removed] ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wtl/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/wtl/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/