handle Toolbar button event in MFC Extended DLL

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

VickyCool4U

Guest
I had created a 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);
}

I want to handle the toolbar button click event, so I need to provide the button click functionality in the DLL. Can anybody guide me for the same?

Continue reading...
 

Similar threads

Back
Top