CShellTreeCtrl死活创建不出来,高手来支个招吧。谢谢
会思考的草 2006-07-18 03:34:28 用的是CodeProject上的免费CShellTreeCtrl,地址:
http://www.codeproject.com/treectrl/shelltreectrl.asp
我的步骤:
创建了一个MFC Extension DLL,添加类CShellTreeBar。OnCreate里这一行一跑就出错:
if(!m_wndShellTree.Create(this, IDC_SZBARCTRL_SHELLTREE))
{
TRACE0("Unable to create Shell Tree Control!");
return -1;
}
出错时的callstack(死在ntdll里):
NTDLL! 7c921230()
_CrtDbgReport(int 2, const char * 0x5f4d0cf0 THIS_FILE, int 320, const char * 0x00000000, const char * 0x00000000) line 353
AfxAssertFailedLine(const char * 0x5f4d0cf0 THIS_FILE, int 320) line 39 + 20 bytes
CWnd::Attach(HWND__ * 0x00290d32) line 320 + 24 bytes
_AfxCbtFilterHook(int 3, unsigned int 2690354, long 1208340) line 546
USER32! 77d318f4()
USER32! 77d4f5e7()
NTDLL! 7c92eae3()
USER32! 77d24d31()
USER32! 77d261b3()
USER32! 77d3a92e()
USER32! 77d3a294()
USER32! 77d65fbb()
USER32! 77d66060()
USER32! 77d50577()
USER32! 77d5052f()
__crtMessageBoxA(const char * 0x00127bbc, const char * 0x102579a0 `string', unsigned int 73746) line 65
CrtMessageWindow(int 2, const char * 0x5f4d0cf0 THIS_FILE, const char * 0x00128cf0, const char * 0x00000000, const char * 0x0012ad14) line 520 + 22 bytes
_CrtDbgReport(int 2, const char * 0x5f4d0cf0 THIS_FILE, int 320, const char * 0x00000000, const char * 0x00000000) line 419 + 76 bytes
AfxAssertFailedLine(const char * 0x5f4d0cf0 THIS_FILE, int 320) line 39 + 20 bytes
CWnd::Attach(HWND__ * 0x00210cec) line 320 + 24 bytes
_AfxCbtFilterHook(int 3, unsigned int 2165996, long 1228360) line 546
USER32! 77d318f4()
USER32! 77d4f5e7()
NTDLL! 7c92eae3()
USER32! 77d201f7()
USER32! 77d1ff83()
OLE32! 769dee8c()
OLE32! 769af031()
SHELL32! 7d5c17ca()
SHELL32! 7d5d0ba1()
SHELL32! 7d5bf498()
SHELL32! 7d5bf9a2()
SHELL32! 7d5bf96c()
SHELL32! 7d5bf931()
SHELL32! 7d5bf709()
SHELL32! 7d5d0adf()
SHELL32! 7d5c638f()
SHELL32! 7d5d108c()
SHELL32! 7d5d088b()
SHELL32! 7d601398()
SHELL32! 7d5fc01a()
SHELL32! 7d5fb093()
SHELL32! 7d60133f()
CShellTreeCtrl::InitializeControl() line 129 + 67 bytes
CShellTreeCtrl::PreSubclassWindow() line 117
_AfxCbtFilterHook(int 3, unsigned int 1772682, long 1237124) line 548
USER32! 77d318f4()
USER32! 77d4f5e7()
NTDLL! 7c92eae3()
USER32! 77d201f7()
USER32! 77d20291()
CWnd::CreateEx(unsigned long 512, const char * 0x1002f4cc `string', const char * 0x1002f4dc `string', unsigned long 1342177287, int 0, int 0, int 0, int 0, HWND__ * 0x001d0cee, HMENU__ * 0x00000066, void * 0x00000000) line 705 + 54 bytes
CWnd::CreateEx(unsigned long 512, const char * 0x1002f4cc `string', const char * 0x1002f4dc `string', unsigned long 1342177287, const tagRECT & {top=0 bottom=0 left=0 right=0}, CWnd * 0x00375554 {CShellTreeBar hWnd=???}, unsigned int 102, void * 0x00000000) line 674
CShellTreeCtrl::Create(CWnd * 0x00375554 {CShellTreeBar hWnd=???}, unsigned int 102, unsigned long 7) line 58
CShellTreeBar::OnCreate(tagCREATESTRUCTA * 0x0012eba0) line 48 + 22 bytes