|
-
May 20th, 1999, 08:12 AM
#2
Re: Insert a ToolBar in a Dialog based app
If you embed a CToolBar object as a member of the dialogue class, then add a handler for the WM_CREATE message, then in the OnCreate() method it generates add these lines (stolen from CMainFrame as generated by AppWizard):
--- if (!m_wndToolBar.Create(this) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
---
(where IDR_MAINFRAME is a toolbar resource).
This should work. Does it help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|