InitCommonControlsEx() test on memory dialog.

Started by hutch--, March 19, 2011, 01:15:41 AM

Previous topic - Next topic

hutch--

I am sorry to wear you folks out but I am trying to get a consistent grasp of how the function InitCommonControleEx() across different language versions of Windows. I do my testing on multiple US English versions of Windows and cannot reproduce an error (they all work fine).

The system with these dialogs needs to be able to run a manifest file to use the XP and later interface for controls and to do this at least some of the InitCommonControls() capacity is necessary. I need to be able to use the extended version so that all of the later common controls can be enabled so I have tried this technique out.


  ; ------------------------------
  ; uncomment the styles you need.
  ; ------------------------------
    mov icce.dwSize, SIZEOF INITCOMMONCONTROLSEX            ; set the structure size
    xor eax, eax                                            ; set EAX to zero
;     or eax, ICC_ANIMATE_CLASS
;     or eax, ICC_BAR_CLASSES
;     or eax, ICC_COOL_CLASSES
;     or eax, ICC_DATE_CLASSES
;     or eax, ICC_HOTKEY_CLASS
;     or eax, ICC_INTERNET_CLASSES
;     or eax, ICC_LISTVIEW_CLASSES
;     or eax, ICC_PAGESCROLLER_CLASS
;     or eax, ICC_PROGRESS_CLASS
;     or eax, ICC_TAB_CLASSES
;     or eax, ICC_TREEVIEW_CLASSES
;     or eax, ICC_UPDOWN_CLASS
;     or eax, ICC_USEREX_CLASSES
;     or eax, ICC_WIN95_CLASSES
    mov icce.dwICC, eax
    invoke InitCommonControlsEx,ADDR icce                   ; initialise the common control library
  ; --------------------------------------


Now on my US English Windows versions this still enables the later interface even though all of the flags are commented out. What I need to know is if this technique works on the different language versions that have behaved differently to the US versions that I use.

If I can get a consistent layout I can build the template and tweak the documentation so that it is a lot easier to understand.

At the risk of imposing on you, could a number of members who run non US English versions of Windows test the attached file and let me know BOTH if it starts correctly and what language version of Windows is being run.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

jj2007

On Win XP SP2 Italian, I see a simple dialog with OK, Cancel and a blue I.

Quote from: dedndave on March 18, 2011, 01:03:08 PM
yikes !

how about.....
ICC_FLAGS = ICC_WIN95_CLASSES
ICC_FLAGS = ICC_FLAGS or ICC_ANIMATE_CLASS
ICC_FLAGS = ICC_FLAGS or ICC_BAR_CLASSES
...
        INVOKE  InitCommonControlsEx,offset icc

total size ~ 18 bytes

Quote from: hutch-- on March 18, 2011, 02:07:49 PM
Dave,

The assumption that the size matters is one we don't share

I start getting worried, Hutch. Is that the first step of turning this into a .Not forum? Have you got an attractive offer by BloatSoftTM?

P.S.: Always assuming that you meant code size, of course.

hutch--

Thanks JJ,

Italian version displays dialog while all the styles are commented out.

RE: Efficiency in terms of code size, the answer is simple, OR the required styles together to get 4 bytes. The list of OR instructions is to make testing them simpler. Go the other way and we may end up as a DOT.DOS forum.  :bg
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

hutch--

The following posting on this topic were of such moment that they deserved a new topic in the LAB so that the sheer profundity of trying to save a few bytes could be appreciated by all.  :dazzled:
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Antariy

Version from archive in the first post works fine on my XP SP2. It is English version, but language settings are Russian. As Jochen mentioned - OK and Cancel buttons. And 32bit alpha blended icon i.

hutch--

Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php