I'm trying to create a modeless dialog box using MFC and am having some
success, however, it lacks the 'exact' operation I want.
Basically, I've used AppStudio to create the dialog (Pop-up style) and gone
through the steps to make it a modeless dialog. The problem is that it can be
moved anywhere on the screen ... beyond the confines of the parent FrameWnd.
What I'd like is to have it remain WITHIN the confines of the FrameWnd. I've
tried the following, and none seem to work:
1. Changed the style to Child versus Popup.
Effect: The Dialog window itself isn't displayed, but as the user tabs
between fields(controls) the controls are visible ... where
did the dialog itself go?
2. While overiding the CMyDialog::Create() function, the example I was
following said to call the base class's Create() function
CDialog::Create() with the Dialog ID number. This Create function will
take two parameters, the second one is a CWnd * that points to the
window who owns the dialog. It has a default value of NULL which
uses the parent frame window. I tried using a pointer to CMyView as
the parent, and now the dialog shows, the controls are functioning,
however, the dialog has no color in the title bar and within the dialog
If any of you have had a similar problem, or insight into how one (namely me)
could resolve this, please let me know.
Thanks in advance,