Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parent and Child dialog painting problem

0 views
Skip to first unread message

daniel kaplan

unread,
Jan 31, 2005, 1:09:46 PM1/31/05
to
sorry if this is considered reposting, but i replied with a new problem to
an old post that it's either too long, or perhaps too old, or perhaps people
got sick of me being lost ;-) but what happened was the solution to my
first problem worked, but also introduced a new problem.

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

Frank Hickman [MVP]

unread,
Jan 31, 2005, 2:07:29 PM1/31/05
to
"daniel kaplan" <nos...@nospam.com> wrote in message
news:11071950...@nntp.acecape.com...

Have you tried using adding the WS_CLIPSIBLINGS style?

--
============
Frank Hickman
Microsoft MVP
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.

daniel kaplan

unread,
Jan 31, 2005, 2:29:56 PM1/31/05
to
"Frank Hickman [MVP]" <fhickman_NOSP@M_noblesoft.com> wrote in message
news:ugWXqh8B...@TK2MSFTNGP12.phx.gbl...
>

>>>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


Norman Bullen

unread,
Jan 31, 2005, 11:27:22 PM1/31/05
to
daniel kaplan wrote:

Put the WS_CLIPSIBLINGS style on the Tab control.

Norm

--
--
To reply, change domain to an adult feline.

daniel kaplan

unread,
Feb 1, 2005, 10:14:17 AM2/1/05
to
"Norman Bullen" <no...@BlackKittenAssociates.com.INVALID> wrote in message
news:KyDLd.3085$Nn...@newsread1.news.pas.earthlink.net...

> 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


Frank Hickman [MVP]

unread,
Feb 1, 2005, 1:29:24 PM2/1/05
to
"daniel kaplan" <nos...@nospam.com> wrote in message
news:11072708...@nntp.acecape.com...

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.

0 new messages