我觉得应该可以的,MFC毕竟是Win32的包装么,但具体怎么实现有没有人试过,讲讲该怎么做?
解决方案 »
- 如何拦截远程消息?
- 改变控件字体的大小(二)
- 请教高手 ADO连接SQL Server 问题 --m_pConnection.CreateInstance(__uuidof(Connection));
- 在使用MSDN的时候,为何没有sample详细介绍和代码下载的地方?
- vc如何在二叉树搜索一个符合条件的叶子结点?请看我的搜索函数有什么问题?
- 我想用API设计一个简单的关机程序,需要请教大家(我是菜鸟)
- 请问在VC++6.0中,由程序中另外启动一个应用程序用什么函数?
- 请问:如何在一个窗口中调用其他窗口的函数(在线等待)
- 大家是不是经常加班或者是单休啊
- 请问有人看过《c++编程思想》这本书吗?
- 讨论一下内网和外网的通讯问题,懂这个的大侠来看看
- 请问一个有关CListCtrl的问题
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/treeview/treeview.asp
// CreateATreeView - creates a tree-view control.
// Returns the handle to the new control if successful,
// or NULL otherwise.
// hwndParent - handle to the control's parent window.
// lpszFileName - name of the file to parse for tree-view items.HWND CreateATreeView(HWND hwndParent, LPSTR lpszFileName)
{
RECT rcClient; // dimensions of client area
HWND hwndTV; // handle to tree-view control // Ensure that the common control DLL is loaded.
InitCommonControls(); // Get the dimensions of the parent window's client area, and create
// the tree-view control.
GetClientRect(hwndParent, &rcClient);
hwndTV = CreateWindowEx(0,
WC_TREEVIEW,
"Tree View",
WS_VISIBLE | WS_CHILD | WS_BORDER | TVS_HASLINES,
0,
0,
rcClient.right,
rcClient.bottom,
hwndParent,
(HMENU)ID_TREEVIEW,
g_hinst,
NULL); // Initialize the image list, and add items to the control.
// InitTreeViewImageLists and InitTreeViewItems are application-
// defined functions.
if (!InitTreeViewImageLists(hwndTV) ||
!InitTreeViewItems(hwndTV, lpszFileName))
{
DestroyWindow(hwndTV);
return FALSE;
}
return hwndTV;
}
打开一个相似的窗口(别人已做好的程序),然后用spy++查看,最后CreateWindowEx,把从spy++中获取到的参数填入CreateWindowEx的相应字段,就做好了。
其实可能需要调用一些初始化函数,如楼上说的InitCommonControls();等。
msdn2.microsoft.com/en-us/library/8etzzkb6.aspx