Modeless dialog in a MDI
I've tried the Code Project, msdn & Beginning Visual C++ 6.0 and neither offered any solution.
I'm currently working on a MFC MDI map editor. I would like a floating toolbar, but dynamically change it during runtime to display information.
My best option, IMHO, was a modeless dialog box which would offer enough flexibility to add and remove buttons at will, however it's not updating correctly.
Start
However, the dialog box disappears if it's moved and the button cannot be focused.
WM_PAINT messages are arriving at my poor CDialog based class, but no luck.
Does anyone have any suggestions or tricks I haven't tried yet?
You know... screenshots don't really help here. You need to post some code in order to get a proper answer. Are you using the MDI root window as the parent of that modeless window? .. How are you processing those messages? ... etc.
look up "dialog bar" in MSDN. The concept behind a dialog bar is a "floating" dialog, which sounds like what you're looking for. It looks / acts like a toolbar, but allows for a dialog resource instead of just a row of button.
Quote:Original post by Anonymous PosterI'd love to help you, but due to the nature of MFC & my prevous work, I'd be posting a KLOC, since I don't know what code I should be copying. Copying all of it would be a mess. Tell me what you'd like me to copy and I will.
You know... screenshots don't really help here. You need to post some code in order to get a proper answer. Are you using the MDI root window as the parent of that modeless window? .. How are you processing those messages? ... etc.
My Dialog is derived from CDialog and my View Class is a custom ViewClass which has OpenGL enabled.
jeffzi
I tried the Dialog bar, it seems more like what I want. It loads just fine, but I cannot seem to recieve or send messages. OnButtonClick() & OnButtonUpdate() don't seem to recive any message.
I tried to .DoModal() my original Dialog box and my program locked up without giving focus to my original dialog box.
EDIT : Problem Solved, me and my not paying attention. I could have gotten a lot more done today if I copied and pasted the correct stuff.
Thank you anon & jeffzi.
[Edited by - Binomine on November 28, 2004 11:47:21 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement