A big problem for command bar system |
Post Reply |
Author | |
lab_zj
Newbie Joined: 19 August 2004 Status: Offline Points: 13 |
Post Options
Thanks(0)
Posted: 14 September 2004 at 11:40pm |
I have created a toolbar,a font combobox and font-size combobox placed in it,then I place this toolbar into a dialog,when I show this dialog,the problem appeared: the selection change of font and font-size combobox no effect to my CRichEditCtrl.certainly,I have placed notify receiver that receive notify send from font and font-size combobox,BUT I have founded the notify receiver never called by dialog.Ok,then I read the source code of commandbar,I find this two combobox send it's notify to AfxGetMainWnd() finally,and not it's direct parent/owner(this dialog),SO,I can't receive notify from toolbar's combobox. Who can give me some suggestions to solve this problem? thanks.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Add to your dialog (code from CXTPFrameWndBase) virtual BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult) UINT nID = (UINT)pNMHDR->idFrom; AFX_NOTIFY notify; return TBase::OnWndMsg(message, wParam, lParam, pResult); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
lab_zj
Newbie Joined: 19 August 2004 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
thank you very much,this problem I have solved by following method: 1. add message entry ON_MESSAGE(WM_XTP_COMMAND,OnXTPMsg) 2. LRESULT CMyDialog::OnXTPMsg(WPARAM wParam,LPARAM lParam) {
} then all command message from toolbar can be processed in general method. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |