> CMainFrame *pWnd = (CMainFrame*)AfxGetMainWnd(); > hIcon = pWnd->GetToolbarIcon(ID_FILE_NEW); > > The GetToolbarIcon asserts on m_wndToolBar.CommandToIndex(uID). The > ASSERT(this) fails. > > Seems like the toolbar or not yet created or something at the time I need > the handle to the icon.
Sounds like the dlg is appearing before the main frame has gone through OnCreate(), which is where m_wndToolBar becomes real... -- Jason Teagle [EMAIL PROTECTED] _______________________________________________ msvc mailing list [EMAIL PROTECTED] See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
