呵呵,是win32汇编。这个是例子,加上代码。
啊,找到我自已C写的,很简单的了哦。
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
TCHAR szHello[MAX_LOADSTRING];
LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
HWND hwndTree;
LV_ITEM lvitem;
LV_COLUMN lvcol;
switch (message)
{
case WM_CREATE:
hwndTree=CreateWindowEx(NULL,"SyslistView32",NULL,
LVS_REPORT|WS_CHILD|WS_VISIBLE,
0,0,700,300,hWnd,NULL,((LPCREATESTRUCT) lParam)->hInstance,NULL);
//SendMessage(hwndTree,LVM_SETTEXTCOLOR,0,(LPARAM)(RGB(0,1,255))) ;
SendMessage(hwndTree,LVM_SETBKCOLOR,0,(LPARAM)(RGB(0,200,255))) ;
lvcol.mask=LVCF_TEXT|LVCF_WIDTH;
lvcol.pszText="品 名";
lvcol.iSubItem=0;
lvcol.cx=150;
SendMessage(hwndTree,LVM_INSERTCOLUMN
,0,(LPARAM)(&lvcol));
lvcol.mask=LVCF_TEXT|LVCF_WIDTH;
lvcol.pszText="品 名";
lvcol.iSubItem=0;
lvcol.cx=150;
SendMessage(hwndTree,LVM_INSERTCOLUMN
,0,(LPARAM)(&lvcol));
lvcol.mask=LVCF_TEXT|LVCF_WIDTH;
lvcol.pszText="品 名";
lvcol.iSubItem=0;
lvcol.cx=150;
SendMessage(hwndTree,LVM_INSERTCOLUMN
,0,(LPARAM)(&lvcol));
lvcol.mask=LVCF_TEXT|LVCF_WIDTH;
lvcol.pszText="品 名";
lvcol.iSubItem=0;
lvcol.cx=150;
SendMessage(hwndTree,LVM_INSERTCOLUMN
,0,(LPARAM)(&lvcol));
//SendMessage(hwndTree,LVM_SETITEM, 0,(LPARAM)(&lvcol));