首先参阅
https://blog.csdn.net/bcbobo21cn/article/details/106287676
认识Windows公共控件库的使用;
一 创建树视图
首先用如下代码看一下,创建树视图控件是否成功返回句柄;
hTree = CreateWindow("SysTreeView32", NULL,
WS_CHILD | WS_BORDER |WS_VISIBLE | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT,
10, 20, 200, 400, hwnd, NULL, NULL, NULL);
wsprintf(szBuffer, "0x%X",hTree);
MessageBox(NULL,szBuffer,TEXT("树视图句柄"),0);