Jeff.
Edit controls have never needed a call to InitCommonControls and if they
tried to change that, it would break a lot of existing code.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
>
><je...@jeffreyshepard.com> wrote in message
>news:1161022922.1...@h48g2000cwc.googlegroups.com...
>> Does anyone know whether or not Microsoft changed CreateWindow() for
>> EDIT controls to now require InitCommonControls() to be called first? I
>> used to be able to just create an EDIT control without initializing the
>> common controls. Now, it appears I need to init them first. Anyone know
>> about this?
>
> Edit controls have never needed a call to InitCommonControls and if they
>tried to change that, it would break a lot of existing code.
I've noticed that DialogBoxIndirectParam() will now fail to display
buttons and text if InitCommonControls[ex]() has not been called.
It is an unfortunate fact that several thousand unhappy clients have
experienced this.
Its quite mystifying when a empty dialog box pops up and just sits
there, no text, no button, no close window [X] just a space where
the message "Do you wish to activate the new update now?" would have
appeared.
and the user.. confused, unable to kill the app.
from what I have observed...
This behaviour became widespread in the first week of October
it did not affect people on w9x, or win2K not did it affect
XP users that had not done Windows Update.
*/ unmatched closing comment
As you are presumably aware, with Windows XP you have a choice between the
classic look for your controls or the "visual styles" introduced with XP.
You get the visual styles by adding a manifest to your project.
The code for the controls with the visual styles is in version 6 of
ComCtl32.dll. In a break with the past, this .dll includes all of the
controls (including edit controls), not just the "common" controls.
Whether you need to call InitCommonControls for an edit control seems to
vary (depending on what version of XP it is, whether you are running as an
administrator...). However, it never does any harm to call
InitCommonControls, so I always do so.
--
John Carson
> On Mon, 16 Oct 2006 14:26:05 -0400, "Gary Chanson" <gcha...@No.Spam.mvps.org> wrote:
>
> > Edit controls have never needed a call to InitCommonControls and if they
> >tried to change that, it would break a lot of existing code.
>
>
> from what I have observed...
> This behaviour became widespread in the first week of October
> it did not affect people on w9x, or win2K not did it affect
> XP users that had not done Windows Update.
>
For whatever it is worth, I can confirm that there is a problem.
(Also, I should thank this thread for pointing me in the right
direction for solving it.)
About that time, in several apps, the About Box stopped appearing. The
strange thing was that it didn't happen in all apps, and I couldn't
see the difference. I have spent a fair amount of time with the
debugger the last couple weeks. I suspected that it might be related
to one of the Updates -- simply because of the timing of the problem.
So I broke a computer down to a clean system -- and confirmed that the
problem only occurred after Updates were installed.
Then I happened to see these messages -- and it dawned on me that the
apps where there was *not* a problem were those with toolbars, status
bars, or other common controls. So I added a call to
InitCommonControlsEx to the WM_CREATE handler in the offending apps.
This solved the problem.
However, what I had found with the debugging effort was strange
behavior. I should probably outline the details of that in a new
thread.
Gary is certainly right that this situation would break a lot of code.
The saving thing is probably that most applications written for XP
would tend to include a toolbar and/or status bar (thus including a
call to InitCommon Controls).
At any rate, thanks again for this thread. It has put an end to what
was becoming very frustrating.
Bill