News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

CreateWindowEx Failing with invalid class

Started by Infro_X, April 01, 2005, 06:11:41 AM

Previous topic - Next topic

Infro_X


.data
ListView DB "SysListView32",0
.code
invoke CreateWindowEx,NULL,addr ListView,NULL,LVS_LIST | LVS_SINGLESEL | LVS_SHOWSELALWAYS |  \
LVS_SORTASCENDING | LVS_AUTOARRANGE | WS_BORDER | WS_TABSTOP | WS_CHILD | WS_VISIBLE,0,0,0,0,[hDlg],NULL,[hInst],NULL

fails with the error code ERROR_CANNOT_FIND_WND_CLASS
it will succeeded if i change the class to EDIT or BUTTON, anyone? (i've ran into this problem before, but have to clue as to how i fixed it last time, and it doesn't matter where i call the code from it seems to always fail

hutch--

You do have to load the common control library to use the common controls.


    LOCAL icce:INITCOMMONCONTROLSEX
   
    mov icce.dwSize, SIZEOF INITCOMMONCONTROLSEX
    mov icce.dwICC,  ICC_LISTVIEW_CLASSES
    invoke InitCommonControlsEx,ADDR icce


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

Infro_X

note to self,
golink kernel32.dll user32.dll advapi32.dll COMCTL32.DLL %1.res %1.rc
(was wondering why it stopped working in RadASM after i took out GetOpenFile dialog.)
;)
Thanks hutch