essentially it goes like this:
i have a modal dialog box with a tab control. then i haev multiple modeless
dialog boxes that i display within the tab control. originally my problem
was that the TAB key, wouldn't stay within the child dialog, but would go
to the parent. and solutions to that froze the app when an edit field in
the modeless dialog got focus. through some peoples help, i set the modal
box to have WS_EX_CONTROLPARENT, and the modeless to have DS_CONTROL. this
fixed the problem with the TAB key except that now i have a paiting problem,
sort of.
now my child modeless dialogs don't get painted OVER the tab control. if
an edit field gets focus, it gets painted, so tabbing paints parts of the
child dialog.
i have tried everything, including setting the TAB control to be the parent
of my child dialogs, but that just brings back the freezing problem.
at the very bottom i have included the TEXT for the parent and ONE of the
modeless, in case anyone sees something obvious that i haev missed. thanks.
faniel
IDD_SETTINGS DIALOGEX 0, 0, 304, 210
STYLE DS_MODALFRAME | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTROLPARENT
CAPTION "Settings"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Close",IDCLOSE,225,187,72,16
CONTROL
"Tab1",IDC_TABS,"SysTabControl32",TCS_FOCUSNEVER,7,7,290,
170,WS_EX_TRANSPARENT
END
IDD_IDNO DIALOGEX 0, 0, 280, 150
STYLE DS_SETFOREGROUND | DS_CONTROL | WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Please enter your ACME User ID and Password. If you
don't have a ACME ID please click here.",
IDC_STATIC,4,6,177,31
PUSHBUTTON "Get User ID",IDC_GETUSERID,213,6,58,15,0,
WS_EX_STATICEDGE
LTEXT "User ID",IDC_STATIC,15,44,93,17,SS_CENTERIMAGE
EDITTEXT IDC_USERID,25,68,108,16,ES_AUTOHSCROLL
LTEXT "Password",IDC_STATIC,15,91,93,17,SS_CENTERIMAGE
EDITTEXT IDC_PASSWORD,25,115,108,16,ES_PASSWORD | ES_AUTOHSCROLL
PUSHBUTTON "OK",IDOK,213,128,58,15
END
Have you tried using adding the WS_CLIPSIBLINGS style?
--
============
Frank Hickman
Microsoft MVP
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.
>>>Have you tried using adding the WS_CLIPSIBLINGS style?
yes i apoloigize...my next attempt was the following:
IDD_IDNO DIALOGEX 0, 0, 280, 150
STYLE DS_SETFOREGROUND | DS_CONTROL | WS_CHILD | WS_VISIBLE |
WS_CLIPSIBLINGS
it cured nothing
Put the WS_CLIPSIBLINGS style on the Tab control.
Norm
--
--
To reply, change domain to an adult feline.
> Put the WS_CLIPSIBLINGS style on the Tab control.
>
well the resource editor doesn't offer it, so i put it in manually by ORing
it with TCS_FOCUSNEVER
that just nade the modeless one not show up at all!
while i never used a tab control, people tell me this is how you handle it
(with modeless child dialogs) somewhere there has to be some standard
solution that i am missing
This is not the method I would use...especially if I was using MFC. If your
not using MFC, take a look at the PropertySheet API. If you are or can use
MFC, look at using CPropertySheet/CPropertyPage.