Re: Controls won't get resized in deep window hierarchies

"domehead100" <[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
--- In [email protected], Catalin Rotaru <catalin.rotaru@...> wrote:
>
> 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
>

I might suggest taking a look at a signals/slots library such as sigslot:

http://sigslot.sourceforge.net/

I've begun using this library more and more in the past weeks/months and have found it simple to use and quite powerful.  It's more limited than some other signal/slot implementations, but it is also exceptionally simple to use and understand.  Using signals/slots, perhaps you could wire up a signal to replace WM_SIZE and add OnSize slots to your various classes to react to the size signal.

I have no idea if/how sigslot works on x64.  I did have to change line 419 in sigslot.h from:

typedef sender_set::const_iterator const_iterator;

to

typedef typename sender_set::const_iterator const_iterator;

to get it to compile on newer versions of Visual Studio.

Best of luck,

~Mike




------------------------------------

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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.