// DialogBarEx.cpp : implementation file // #include "stdafx.h" //#include "DialogbarDemo.h" #include "DialogBarEx.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDialogBarEx /* Class written by Sharad Kelkar drssk@ad1.vsnl.net.in This is freeware without any kind of restriction on usage and distribution. */ #define WM_INITDIALOGBAR WM_USER + 1 BEGIN_MESSAGE_MAP(CDialogBarEx, CDialogBar) //{{AFX_MSG_MAP(CDialogBarEx) ON_MESSAGE(WM_INITDIALOGBAR , InitDialogBarHandler ) ON_WM_CREATE() ON_WM_DESTROY() //}}AFX_MSG_MAP END_MESSAGE_MAP() CDialogBarEx::CDialogBarEx() { } CDialogBarEx::~CDialogBarEx() { } // Note from Sharad Kelkar // We have manualy added entry ON_MESSAGE(WM_INITDIALOGBAR , InitDialogBarHandler) // as there is not automatic help from Class Wizard ///////////////////////////////////////////////////////////////////////////// // CDialogBarEx message handlers int CDialogBarEx::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDialogBar::OnCreate(lpCreateStruct) == -1) return -1; // TODO: Add your specialized creation code here // --------- // We post WM_INITDIALOGBAR message here to dialog bar PostMessage(WM_INITDIALOGBAR , 0 , 0 ); return 0; } LRESULT CDialogBarEx::InitDialogBarHandler(WPARAM wParam, LPARAM lParam) { UpdateData(FALSE); OnInitDialogBar() ; return S_OK; } // Notes from Sharad Kelkar // OnInitDialogBar is Just empty function it is // expected to be overriden from derived class void CDialogBarEx::OnInitDialogBar() { // TODO // Add your custom initialization code here. } void CDialogBarEx::OnDestroy() { Destory(); CDialogBar::OnDestroy(); // TODO: Add your message handler code here } void CDialogBarEx::Destory() { }