Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Sun, 10 Dec 2006 10:05:41 -0800
If you also want to keep Z-order, you'll need another SetWindowPos.
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:5jhbn2t55j2lnnr50uq87m8eeqftdiprul@xxxxxxxxxx
That ;is exactly one of the problems I've seen; and Default() really does
pass the
WM_SETTEXT to the base class, which gets the drawing wrong. It also can
produce annoying
flicker as the wrong text is displayed, the area is invalidated, and the
right text is
displayed.
There's a cheat I do, when I'm feeling lazy. I place a CStatic down and
use it as a
frame. Then I
c_Frame.GetWindowRect(&r);
ScreenToClient(&r);
c_MyControl.Create(...., r, c_Frame.GetDlgCtrlID(), this);
c_Frame.DestroyWindow();
it adds just a few lines to the OnInitDialog, lets me place the control
easily, and just
replaces it at runtime by a control of the same size and ID, but derived
from my desired
class. Much easier than having to define new window classes so I can name
them and then
figure out the hex values for the style bits.
joe
.
- References:
- Distorted dialog title bar after SetWindowPos in OnInitDialog
- From: Wolfram Roesler
- Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
- From: Joseph M . Newcomer
- Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
- From: Wolfram Roesler
- Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
- From: Joseph M . Newcomer
- Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
- From: David Ching
- Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
- From: Joseph M . Newcomer
- Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
- From: David Ching
- Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
- From: Joseph M . Newcomer
- Distorted dialog title bar after SetWindowPos in OnInitDialog
- Prev by Date: Re: BatClass.h
- Next by Date: Re: Vector error !!!Help
- Previous by thread: Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
- Next by thread: Re: Distorted dialog title bar after SetWindowPos in OnInitDialog
- Index(es):
Relevant Pages
|