Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

Win32 API // C++ // Controls

Started by yummy_potatoes Jan 29, 2004 at 8:58 AM 5 replies 1.1k views
Original Post
yummy_potatoes
yummy_potatoes
Arg. I''m having difficulties getting my control to display, any ideas?
            HWND hFolderView = CreateWindowEx(
                WS_EX_CLIENTEDGE,    /* Extended possibilites for variation */
                "LISTBOX",           /* Classname */
                "Folder View",       /* Title Text */
                WS_CHILD | WS_VISIBLE |
                LBS_MULTICOLUMN,
                0,
                0,
                100,
                100,
                hwnd,
                (HMENU)ID_FOLDER_VIEW,
                GetModuleHandle(NULL),
                NULL
            );
This is returning NULL.
"I once thought I was wrong, but then I was mistaken." - A4
kuphryn
kuphryn
What is hwnd?

Kuphryn
SiCrane
SiCrane
What does GetLastError() say?
yummy_potatoes
yummy_potatoes
hwnd is passed to me through my winproc and getlasterror tells me invalid handle... I''ve tried my global hwnd too, still no go
"I once thought I was wrong, but then I was mistaken." - A4
SiCrane
SiCrane
That "LISTBOX" string is looking suspicious to me. Did you try WC_LISTBOX or "ListBox" instead?
yummy_potatoes
yummy_potatoes
ahh initcommoncontrols... forgot all about it, thanks a bundle
"I once thought I was wrong, but then I was mistaken." - A4

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.