I am trying to use the toolbar resource...IDR_TOOLBAR1....
Here I have declared CToolBar cToolBar; in my Dialog class "class CExoDialog : public CDialog"
In OnInitDialog Function....I have written some thing like this
Expand|Select|Wrap|Line Numbers
- cToolBar.Create(this);
- cToolBar.LoadToolBar(IDR_TOOLBAR1);
- cToolBar.ShowWindow(SW_SHOW);
- cToolBar.SetBarStyle(CBRS_ALIGN_BOTTOM | CBRS_TOOLTIPS | CBRS_FLYBY);
- RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);
But it is not compiling and giving the following error
Syntax error : missing ';' before identifier 'cToolBar'
E:\bookexample\one.cpp(204) : error C2501: 'CToolBar' : missing storage-class or type specifiers
E:\bookexample\one.cpp(204) : error C2501: 'cToolBar' : missing storage-class or type specifiers
E:\bookexample\one.cpp(279) : error C2065: 'cToolBar' : undeclared identifier
E:\bookexample\one.cpp(279) : error C2228: left of '.Create' must have class/struct/union type
E:\bookexample\one.cpp(280) : error C2228: left of '.LoadToolBar' must have class/struct/union type
E:\bookexample\one.cpp(281) : error C2228: left of '.ShowWindow' must have class/struct/union type
E:\bookexample\one.cpp(282) : error C2228: left of '.SetBarStyle' must have class/struct/union type
Error executing cl.exe.
PLease help...