More about InitCommonControls and dialog boxes
- From: William H. Haggett <whaggett@xxxxxxxxx>
- Date: Fri, 20 Oct 2006 10:56:14 -0400
Here are a few more details about the problem which *appears* to have
been caused by one of the recent Updates.
Dialog boxes (About Boxes and otherwise) no longer appear -- in
applications where there was previously no problem. This problem only
occurs after recent Updates have been installed. Also, it only occurs
on XP, and where there is a manifest for comctrl32.dll version 6.
Whatever the problem may be, it can be resolved by including a call to
InitCommonControls[Ex] somewhere in the application's initialization
-- even if that would not otherwise be needed. (However, that does not
do much good for what is already out there.)
This is probably related to what was discussed in the thread "EDIT
controls now require InitCommonControls?" However, the behavior I
experienced was a little strange.
Calls to DialogBox (or any of the related procedures) return -1 -- an
error. However, an immediately following call to GetLastError returns
0 -- no error.
If one puts breakpoints on the DialogProcedure, it is seen that
WM_INITDIALOG is never sent to it. The first message it receives is
WM_SETFONT. However, the sequence of messages which usually follows,
ending with WM_INITDIALOG, does not happen. Instead it next receives
WM_DESTROY, and that is the end of the dialog box.
So it is not only a matter of controls not being shown. Nothing is
shown.
It probably wouldn't hurt to start putting in a call to
InitCommonControls[Ex], regardless of the need for it. Still, with all
the existing code that is probably now broken (including a few of the
SDK samples), Microsoft will probably come up with some kind of fix.
Thanks and good luck,
Bill
.
- Follow-Ups:
- Re: More about InitCommonControls and dialog boxes
- From: John Carson
- Re: More about InitCommonControls and dialog boxes
- Prev by Date: Re: Combo Box in Dialog
- Next by Date: Re: OpenThemeData/CloseThemeData not recycling handles
- Previous by thread: Toolbar's Imagelist not displayed
- Next by thread: Re: More about InitCommonControls and dialog boxes
- Index(es):
Relevant Pages
|