Windows CommonControls failed to initialize properly.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows CommonControls failed to initialize properly.

Wayne Johnston
Migrating from VA 7.5.1 to 8.5.1, I got our client application working great, even when packaged.  However there's an error in the standard output (Transcript):
"Windows CommonControls failed to initialize properly."

Our client executable is a renamed nodialog.exe, and placing a similarly-renamed nodialog.exe.manifest in the runtime bin (or start-in) directory doesn't help.  I don't see any visual change, but the error message is still there.  Our product hadn't used a manifest before.

Dependency Walker shows COMCTL32.DLL as a requirement, but does not indicate a problem picking it up.  It shows the full path as

c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af

though it’s the same as in C:\Windows\SysWOW64.

However, Process Explorer shows my client executable as having two different comctl32.dll’s loaded.  One is version 5.82.7601.17514 (the above).  The other is 6.10.7601.17514, in

C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2

Interestingly, in a development environment I only get the latter version of the file loaded.  I am ignorant of what this all means.  Should I just ignore this error?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/uNd3bjtfda8J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Windows CommonControls failed to initialize properly.

Wayne Johnston
I should have pointed out that this was on Windows 7, but the same error message is seen on Windows XP.  On XP, I see that only a 6.0.2900.6028 version of comctl32.dll is loaded.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/5CEHM--RWrIJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Windows CommonControls failed to initialize properly.

John O'Keefe-3
Wayne -
 
The message is produced because the loaded (5.82) CommonControls DLL doesn't support all the controls used by VA Smalltalk. The 5.82 version of CommonControls is the default version used by Windows. Windows will only use the 6.x version if it is identified in a manifest file.
 
So, please double-check that you have a file named <myruntimeexename>.exe.manifest in the same directory as <myruntimeexename>.exe.
 
John
On Thursday, August 30, 2012 8:56:45 AM UTC-4, Wayne Johnston wrote:
I should have pointed out that this was on Windows 7, but the same error message is seen on Windows XP.  On XP, I see that only a 6.0.2900.6028 version of comctl32.dll is loaded.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/Z_PunxEM5EgJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Windows CommonControls failed to initialize properly.

Wayne Johnston
Thanks John, you are right of course.

However, in this application (and a similar one currently on 8.0.0), I don't think we don't want to run with the newer common controls.  Or at least it introduces a problem.  As a user tabs through multiple drop-down lists, or multiple checkboxes, there is no indication of which one currently has focus.  Without the manifest, checkbox labels have the light box drawn around them when they have focus, and drop-downs go shaded.  Here is an example of the checkbox problem (labels are truncated in this image) - you wouldn't know it but the 2nd one is the one with focus.

And here are some drop-down lists where again it's the second one with focus but you can't tell.

My solution is to not run with the manifest - meaning ignore this message "Windows CommonControls failed to initialize properly."

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/auHWKJP3jIAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Windows CommonControls failed to initialize properly.

Wayne Johnston
Another application on VA 8.0.2 here has seen the above bad effect of the newer common controls via the manifest.  So have others seen the problem?  Is it a VA problem or Windows?  Or could it be something specific to our applications?  Or has it been settled that it's good to not indicate which widget has focus?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/tvNB78MirG0J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Windows CommonControls failed to initialize properly.

John O'Keefe-3
Wayne -
 
You can thank Windows for this behavior. I will quote from my favorite Windows blog -- The Old New Thing.
 
To support our goal of greater simplicity, we plan to suppress keyboard navigation indicators by default. Don't be frightened...

The idea is to reduce visual noise in Windows, namely focus indicators and access key underlines in menus and windows. Aesthetically, these things are distracting and intimidating. Functionally, they're only useful when you're navigating by keyboard. They don't add significant value when you're just using the mouse. In fact, they're often redundant.

Why now? Every good thing must start somewhere. Windows will look cleaner and simpler.

What's so bad about the way things are? Access key underlines are largely underutilized and are often redundant with Ctrl+ shortcuts within the same menu. There's no indication that you have to type the Alt key to use these shortcuts. Plus, it's just odd to see characters underlined within text all over your display. Focus rectangles lack graphic integrity, and they're often redundant with the highlight on selected items or the default button.

Of course, the keyboard indicators will come back when there is any demonstration of keyboard navigation by the user. The indicators will appear and disappear appropriately. Finally, if you don't like the behavior at all, you can disable it from the Display control panel.

For what it's worth, this is one of the things I [the interface designer] came to Microsoft to fix.

Starting with Windows 2000, keyboard indicators such as underlined accelerators and focus rectangles (collectively known as "keyboard cues") are hidden by default, and are revealed only when you start using the keyboard. You can control this behavior from the Desktop Control Panel, under Appearance, Effects, "Hide underlined letters for keyboard navigation until I press the Alt key".

Note that this setting actually controls both underlined letters and focus rectangles, even though the text describes only one of the effects. Underlines are hidden until you press the Alt key, and focus rectangles are hidden until you either press the Alt key or press the Tab key.

Here's how it works.

There are three UI state mesages: WM_CHANGEUISTATE, WM_QUERYUISTATEand WM_UPDATEUISTATE. The third one is, in my opinion, a misnomer. It really should be called something like WM_UISTATECHANGED since it is a notification that something has happened, not a message that you send to cause something to happen.

When a dialog box or menu is displayed via a mouse click, keyboard cues are hidden; if the dialog box or menu was displayed via a keypress, then keyboard cues are visible. This decision is made by sending a WM_CHANGEUISTATE message to the root window with the UIS_INITIALIZE flag. This is done automatically by the dialog manager, but if you're doing your own custom windows, you'll have to send it yourself.

The WM_CHANGEUISTATE message bubbles up to the top-level window, which changes the window UI state accordingly, then broadcasts a WM_UPDATEUISTATE message to all its child windows to notify them that the state has changed. (Of course, if the WM_CHANGEUISTATE message has no effect—for example, hiding something that is already hidden—then the WM_UPDATEUISTATE message is optimized out since the entire operation is a no-op.)

When a window that draws keyboard cues receives a WM_UPDATEUISTATE message, it typically invalidates itself so that the cues can be redrawn/erased, depending on the new state.

At drawing time, a window that draws keyboard cues can use the WM_QUERYUISTATE message to determine which keyboard cues are visible and which are hidden, and draw its content accordingly. If focus rectangles are hidden, then the window should skip the call to the DrawFocusRect function. If keyboard underlines are hidden, then the window suppresses underlines in its text drawing. If the window uses the DrawText function, it can pass the DT_HIDEPREFIX flag to suppress the underlines. If you are responding to the WM_DRAWITEM message, then you should check for the ODS_NOACCEL and ODS_NOFOCUSRECT flags to determine you should draw an underline accelerator or a focus rectangle.

Finally, during execution you may discover that the user has used the keyboard to perform navigation within your control. For example, the listview control may have noticed that the user has used the arrow keys to change the selected item. When this happens, the control sends itself a WM_CHANGEUISTATE specifying which keyboard cues should be revealed. As noted above, the WM_CHANGEUISTATE message eventually causes all the windows in the window tree to receive a WM_UPDATEUISTATE message if their states need to change.

The IsDialogMessage function sends WM_CHANGEUISTATE messages as appropriate, so dialog boxes and anybody else who uses IsDialogMessage gets keyboard-cues tracking for free.

So, in Windows 7 you could try going to Ease of Access Center on the Control Panel, selecting Make the keyboard easier to use, and check the Underline keyboard shortcuts and access keys box. If this doesn't help, let me know.
 
John
 

Another application on VA 8.0.2 here has seen the above bad effect of the newer common controls via the manifest.  So have others seen the problem?  Is it a VA problem or Windows?  Or could it be something specific to our applications?  Or has it been settled that it's good to not indicate which widget has focus?

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/3F9ZLIklgH0J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Windows CommonControls failed to initialize properly.

Wayne Johnston
Thanks John!  You are correct, of course.

I had seen "Manifest file changes some GUI appearance on Windows" in the migration guide, but it only mentioned shortcut keys, and I didn't realize it would have the above effects too.

We believe we have users who do things fast by not reaching for the mouse.  We don't want to say in our user's guide "On Windows 7, there are many screens which will look slightly different.  And for those of you who like to use the keyboard who don't like Microsoft's decision to not show you (by default) which drop-down or checkbox has focus, go into the Ease of Access Center...".  

So I think we are going to continue to run without the manifest, and our application will continue to look and act the same.  Hopefully this unconventional(?) route will work for the foreseeable future.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/woJkN5GyL0gJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Windows CommonControls failed to initialize properly.

John O'Keefe-3
Wayne -

Yes, it should work as long as you don't need/want any of the CommonControls function added since version 5.82 (unfortunately I haven't found a complete list of the changes between 5.82 and 6.0) and don't mind the message on the Transcript.

We assume that we are running with Version 6.0 or higher of CommonControls. We usually see customers with your original problem -- run time doesn't match development time because the manifest file is missing. I had considered solving this problem by linking the manifest into the .EXE, but I have stepped back from doing this based on your feedback.

The Migration Guide didn't mention the lose of the focus rectangle because I was not aware of it -- I will see that the page is updated.

John

On Wednesday, September 12, 2012 12:31:46 PM UTC-4, Wayne Johnston wrote:
Thanks John!  You are correct, of course.

I had seen "Manifest file changes some GUI appearance on Windows" in the migration guide, but it only mentioned shortcut keys, and I didn't realize it would have the above effects too.

We believe we have users who do things fast by not reaching for the mouse.  We don't want to say in our user's guide "On Windows 7, there are many screens which will look slightly different.  And for those of you who like to use the keyboard who don't like Microsoft's decision to not show you (by default) which drop-down or checkbox has focus, go into the Ease of Access Center...".  

So I think we are going to continue to run without the manifest, and our application will continue to look and act the same.  Hopefully this unconventional(?) route will work for the foreseeable future.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/7OlHGC6_gbQJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.