toolbar resource from a extended dll

  • Thread starter Thread starter VickyCool4U
  • Start date Start date
V

VickyCool4U

Guest
Hi Experts,



I had created a MFC extended dll in VS 2010 professional edition, where I derive a toolbar class from CToolBar.
And try to use the same resource in another dialog based(exe) application.
my code is given as follows:-
I had exported the whole CMyToolBar class in dll application already Mytoolbar.cpp:-
CMyToolBar::CMyToolBar(void)
{
}

CMyToolBar::~CMyToolBar(void)
{
}
void CMyToolBar::create(CWnd *hHandle)
{
if(!this->CreateEx(hHandle, TBSTYLE_FLAT, WS_CHILD |
WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS |
CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!this->LoadToolBar(IDR_MYTOOLBAR))
{
TRACE0("Failed to Create Dialog Toolbar\n");
}
}
exe code:- myDialog class:-
BOOL CSampleTestAppDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
CMyToolBar toolBar;
toolBar.create(this);
}
But the resource is not loaded in the dialog class.
Can you please suggest me, what is wrong here?


Continue reading...
 

Similar threads

V
Replies
0
Views
114
VickyCool4U
V
V
Replies
0
Views
108
VickyCool4U
V
V
Replies
0
Views
137
VickyCool4U
V
Z
Replies
0
Views
107
Zebedee6
Z
Back
Top