Macros

给我一支烟!请所有烦恼都能过往如云烟!

导航

win32下ListControl的使用

 LVCOLUMN listCol;
  switch(umsg)
  {
     case WM_INITDIALOG:
      {
   hTableList = GetDlgItem(hwnd,IDC_LISTDATA);
   
   memset(&listCol, 0, sizeof(LVCOLUMN));
   listCol.mask = LVCF_TEXT|LVCF_WIDTH|LVCF_SUBITEM;
   listCol.pszText = "文件名称";
   listCol.cx = 0x110;
   SendMessage(hTableList,LVM_INSERTCOLUMN,0,(LPARAM)&listCol); // Insert/Show the coloum
   listCol.pszText = "修改日期";
   listCol.cx = 0x90;
   SendMessage(hTableList,LVM_INSERTCOLUMN,1,(LPARAM)&listCol); // Insert/Show the coloum
   listCol.pszText = "文件大小";
   listCol.cx = 0x53;
   SendMessage(hTableList,LVM_INSERTCOLUMN,2,(LPARAM)&listCol); // Insert/Show the coloum

   CenterDlgInParent(hwnd);
   break;
   }

我还是只小菜鸟。所以大家不要笑话哈!

posted on 2007-07-06 10:56  Macros  阅读(914)  评论(0)    收藏  举报