Listview with MDI
I am using this code to successfully create a listview control in an SDI program. When I try to use the same code in an MDI program, I get the following error: Cannot find window class.
I have #include'd <commctrl.h> and am linking with comctl32.lib.
Any thoughts as to what I am doing wrong? Is there something different that needs to be done when using MDI?
hListView = CreateWindowEx(WS_EX_CLIENTEDGE,
WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | LVS_REPORT |LVS_EDITLABELS,
25, 100, 475, 100,
Thanks in advance.
I think I might have found the answer. I called the InitCommonControls() function in the MDI program. The list view is now visible. I don't call the InitCommonControls() function in the SDI version, but the list view still works ok. Can anyone explain the difference?