GordonFreeman
April 16th, 2005, 05:14 PM
----------------------------------------------------------------------------------------------------
// m_hWnd is the main window handle
hListView = CreateWindow
(WC_LISTVIEW,"List",
WS_VISIBLE | WS_CHILD,0,0,
200,200,m_hWnd,NULL, (HINSTANCE)GetWindowLong(m_hWnd,GWL_HINSTANCE),
NULL);
SetWindowLong(hListView,GWL_STYLE,LVS_REPORT);
LV_COLUMN col;
col.mask = LVCF_WIDTH;
col.cx = 50;
SendMessage(hListView,LVM_INSERTCOLUMN,0,(LPARAM)&col);
// ... insert other columns
-----------------------------------------------------------------------------------------------------
I tried to create a list view which looks like the Outlook Express' message list
but it seems it doesn't work,the listview isn't visible...what's the error? :(
// m_hWnd is the main window handle
hListView = CreateWindow
(WC_LISTVIEW,"List",
WS_VISIBLE | WS_CHILD,0,0,
200,200,m_hWnd,NULL, (HINSTANCE)GetWindowLong(m_hWnd,GWL_HINSTANCE),
NULL);
SetWindowLong(hListView,GWL_STYLE,LVS_REPORT);
LV_COLUMN col;
col.mask = LVCF_WIDTH;
col.cx = 50;
SendMessage(hListView,LVM_INSERTCOLUMN,0,(LPARAM)&col);
// ... insert other columns
-----------------------------------------------------------------------------------------------------
I tried to create a list view which looks like the Outlook Express' message list
but it seems it doesn't work,the listview isn't visible...what's the error? :(