#include <stdio.h>
#include <windows.h>
#include <CommCtrl.h>
#include "resource.h"
#pragma comment(lib,"comctl32.lib")
HINSTANCE g_hInst;
HWND g_hMainWnd;
HWND hListView;
void InsertListviewItem(int nPos, WCHAR * wszStr,WCHAR * wszSecond, WCHAR * wszThrid);
void CreateListView();
INT_PTR CALLBACK DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_INITDIALOG:
g_hMainWnd = hWnd;
CreateListView();
break;
case WM_COMMAND:
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_CLOSE:
PostQuitMessage(0);
break;
default:
return FALSE;
}
return TRUE;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
g_hInst = hInstance;
g_hMainWnd = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_CLIENT_DIALOG), GetDesktopWindow(), DlgProc);
if (g_hMainWnd == 0)
{
return -1;
}
RECT wndRect;
GetWind
win32 listview控件添加图标
最新推荐文章于 2024-09-20 21:27:38 发布
本文介绍如何在 Win32 程序中使用 Listview 控件添加图标,通过步骤和示例代码详细阐述实现过程,帮助开发者提升用户界面的视觉效果。
摘要由CSDN通过智能技术生成