Re: Modeless dialog problems
- From: r_z_aret@xxxxxxxxxxxx
- Date: Tue, 04 Jul 2006 14:26:43 -0500
On Tue, 4 Jul 2006 00:35:02 -0700, suamikim
<suamikim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
You are right, i use C++ with mfc, but i thought that this is a pure
eVC-newsgroup, so i didn't lost a word about it...?
The group is _primarily_ for C/C++ and eVB. But folks using C# and
VB.NET do show up. Also, some of the C/C++ users use MFC, and some
(like me) don't.
BTT:
I've allready solved my second problem, with the resizing of the dialog:
With some testing i figured out, that the resizing allways appeared after
the OnPaint-Message arrived, so i just catch the OnPaint-Message and allways
set the Window-Position (with the desired size) in the following way:
SetWindowPos(&CWnd::wndTop, 0, 26, 240, 23, NULL);
I don't handle WM_PAINT messages much. But calling SetWindowPos in
your handler (OnPaint function) makes me nervous about infinite loops,
or at least extra "ringing".
If I remember and understand your original description, the dialog
boxes are resized when activated (not your words, but my
interpretation of your words). If so, then you should at least try
calling SetWindowPos in your response to WM_ACTIVATE (OnActivate
function?).
I'm not really sure, if thats the best way, to solve my problem, but at the
moment it works just fine, so i can't find any reason to try smth. else.
I also solved my 1. problem, but in a really weired way (which i don't
really want to describe, unless someone is really interested in it), so i
would be grateful, to find a better solution:
"I don't follow your details, but I have a few dialog boxes that show
popup menus. Not as nice as a _real_ menu, but good enough."
The problem aren't the "normal" popup-menus. The problems start with the
toolbar Popups, which i partially implement by myself in the OnCreate-Routine
of my MainFrame. So to see them in the new Dialog, i have to implement and
catch the messages from the new menu, there too (what i actually do at the
moment, as long as i don't find a better solution).
I hope, that explanation is clearer now, cause i really don't know, how to
describe it any better (even in my native language, german, i think, i
couldn't do it any better...).
"Resize all secondary menus so the menu on the primary dialog shows,
and then modify that menu as each dialog shows."
Oops!! Dialog boxes, not menus. As in "resize all secondary dialog
boxes so the menu on the primary dialog shows."
That sounds good, but unfortunately i don't know how to resize the secondary
menus and what i have to modify at them? I hope, you can help me here any
further, cause that solution sounds just fine for me, if it works.
My correction should help.
Thanks, regards,
mike
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com
.
- References:
- Modeless dialog problems
- From: suamikim
- Re: Modeless dialog problems
- From: r_z_aret
- Modeless dialog problems
- Prev by Date: Re: ARM processor support
- Next by Date: Re: development tools for Windows Mobile 5
- Previous by thread: Re: Modeless dialog problems
- Next by thread: Re: Modeless dialog problems
- Index(es):
Relevant Pages
|