Reputation: 129
I have a single document MFC app, which consists of the MainFrame
(derived from CFrameWnd) and within contained CChildView
(derived form CWnd
). These are generated by the VS MFC Wizard.
In resource editor I have designed a simple UI and tagged it as IDD_CUSTOMCONTROL
with few buttons and text fields. I would like to connect it to the CChildView
without generating it as a new dialog.
What is the right way to do it? Is it possible to do it? Or should I connect the ID directly to MainFrame
?
EDIT: I have just found the right MSDN page which states which classes can have dialog id's assigned.
The scope of the question is depleted. Can/should it be closed? Or can I ask how to achieve my goal and apply the designed resource to MainFrame? (The title is now misleading).
Upvotes: 2
Views: 900
Reputation: 129
In short: No.
I have just found the right MSDN page which states which classes can have dialog id's assigned.
Classes such as
CButton
,CWnd
, orCDocument
, which do not require a dialog ID or resource ID. These classes do not use a dialog or resource ID. If you select one of these classes for your base class, the Dialog ID box and the DHTML resource ID box are dimmed.Classes such as
CDialog
,CFormView
, orCPropertyPage
, which require a dialog ID.The class
CDHtmlDialog
, which requires a dialog ID, a DHTML resource ID, and an HTML file name.
I should go with CFormView
instead as @ConstantineGeorgiou proposed in comments.
Upvotes: 1