embedded propertysheet in a dialogbar: how to make ON_UPDATE_COMMAND_UI work
-
I've constructed a propertysheet with a working ON_UPDATE_COMMAND_UI system. I've constructed a dialogbar with a working ON_UPDATE_COMMAND_UI system. I've constructed a dialogbar with an embedded propertysheet. Now how do I construct a dialogbar with an embedded propertysheet _AND_ still have ON_UPDATE_COMMAND_UI working in the propertysheet? CMyDialogbar has a CMyPropertySheet member which assume the position of a placeholder control in the dialogbar. The problem seems to be that the idle message does not cascade on from CMyDialogbar into the CMyPropertySheet. Any ideas? Regards, David.
-
I've constructed a propertysheet with a working ON_UPDATE_COMMAND_UI system. I've constructed a dialogbar with a working ON_UPDATE_COMMAND_UI system. I've constructed a dialogbar with an embedded propertysheet. Now how do I construct a dialogbar with an embedded propertysheet _AND_ still have ON_UPDATE_COMMAND_UI working in the propertysheet? CMyDialogbar has a CMyPropertySheet member which assume the position of a placeholder control in the dialogbar. The problem seems to be that the idle message does not cascade on from CMyDialogbar into the CMyPropertySheet. Any ideas? Regards, David.
>The problem seems to be that the idle message does not cascade on from CMyDialogbar into the CMyPropertySheet. Any ideas? Try handling it yourself. afx_msg LRESULT OnKickIdle(WPARAM,LPARAM); ... ON_MESSAGE(WM_KICKIDLE,OnKickIdle) ... LRESULT CMyDialog::OnKickIdle(WPARAM wp, LPARAM lCount) { UpdateDialogControls(this, TRUE); // the dialog // try pMyPropertySheet->UpdateDialogControls(this, TRUE); // or UpdateDialogControls(pMyPropertySheet, TRUE); // or pMyPropertySheet->UpdateDialogControls(pMyPropertySheet, TRUE); // or ::SendMessage(pMyPropertySheet->GetSafeHandle(), WM_KICKIDLE, wp, lp); return 0; } One might work (I am not sure if this is the right way to do this or if it still works - WM_KICKIDLE is/was internal MFC message). Try it... There might be an extra include for the WM_KICKIDLE that is needed... Good luck! H.