-
October 6th, 2005, 03:59 AM
#1
Is it somehow possible to have a toolbar at the bottom of my cdialog?
Is it somehow possible to have a toolbar at the bottom of my cdialog?
I added the toolbar, but docking is not possible in cdialogs, it seems.
-
October 6th, 2005, 04:14 AM
#2
Re: Is it somehow possible to have a toolbar at the bottom of my cdialog?
See here
PS: Please search on Google and CG prior to posting a new question.
Har Har
-
October 6th, 2005, 05:45 AM
#3
Re: Is it somehow possible to have a toolbar at the bottom of my cdialog?
yes with the help of CCS_BOTTAM style you can.just specify this style at the time of creation of a toolbar
Code:
CreateWindowEx(0,TOOLBARCLASSNAME, (LPSTR) NULL,
WS_CHILD|WS_OVERLAPPEDWINDOW| WS_VISIBLE | TBSTYLE_TOOLTIPS |
TBSTYLE_FLAT|TBSTYLE_REGISTERDROP|TBSTYLE_SEP|TBSTYLE_LIST|TBSTYL
E_ALTDRAG| WS_BORDER|TBSTYLE_REGISTERDROP|CCS_BOTTOM , 10, 0,
20, 30, m_hWnd,(HMENU) NULL, _Module.GetResourceInstance(), NULL);
-
October 6th, 2005, 08:48 AM
#4
Re: Is it somehow possible to have a toolbar at the bottom of my cdialog?
Hi,
I'm trying like in the example and with the CCS_BOTTOM style, but I can't get it done.
Code:
m_Toolbar.Create(this);
m_Toolbar.LoadToolBar(IDR_PRECALCULATION_TOOLBAR);
m_Toolbar.GetToolBarCtrl().ModifyStyle(CCS_TOP,CCS_BOTTOM);
m_Toolbar.ModifyStyle(CCS_TOP,CCS_BOTTOM);
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST,0,reposDefault);
I also don't know _Module, what is it and how to use it?
Thanks,
timv
-
October 6th, 2005, 10:41 AM
#5
Re: Is it somehow possible to have a toolbar at the bottom of my cdialog?
Originally Posted by timv
Is it somehow possible to have a toolbar at the bottom of my cdialog?
It is generally possible - but not recommended. Toolbars are designed to live in normal frame windows, not dialog boxes. Even if you get the docking done, you will have a lot of other issues (like command UI updating and command routing not working). Why don't you use an SDI window instead?
Also see this FAQ.
-
October 6th, 2005, 12:10 PM
#6
Re: Is it somehow possible to have a toolbar at the bottom of my cdialog?
Do this:
Code:
m_Toolbar.Create(this,WS_CHILD | WS_VISIBLE | CBRS_BOTTOM);
m_Toolbar.LoadToolBar(IDR_TOOLBAR1);
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST,0,reposDefault);
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
|