Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须在带有多个选项卡的对话框窗口中使用 CRichEditCtrl 控件,这些选项卡可能显示相同的文件。
我怎样才能同步他们的编辑?
如果您使用CPropertySheetandCPropertyPage来支持多选项卡,您可以覆盖CPropertyPage::OnSetActiveand CPropertyPage::OnKillActive。设置当前文本OnKillActive并为将要处于活动状态的其他选项卡设置相同的文本(在 中OnSetActive)。
CPropertySheet
CPropertyPage
CPropertyPage::OnSetActive
CPropertyPage::OnKillActive
OnKillActive
OnSetActive