Home > Software engineering > MFC document program how to dynamically loaded more different template document view
MFC document program how to dynamically loaded more different template document view
Time:09-19
Now I need to implement the following functions: 1, establish multiple document application based on CFORMVIEW class
Figure 1 wizard directly generated by the application (button4 I add on CFORMVIEW controls)
Figure 2 wizard generated resources 2, I create a CFORMVIEW, whose resources view below
Figure 3 new CFORMVIEW resources (for - button2 - button4 to add new CFORMVIEW controls) 3, I need to implement the following functions: May click button4 in figure 2, dynamic open CFORMVIEW, in figure 3 (similar to the function of the menu bar of the "new" button to achieve, just create a new layer button in the menu bar is shown in figure 1 will always open the documents in the view class, now want to open the document view class in figure 3) Concrete is a what kind of way of thinking, build new document template? And then how to call? In which class? CXXAPP class InitInstance () implementation program a run will appear CFORMVIEW selection dialog open?) Have the code better, can add words best WeChat chat, have small red envelopes and attended, ha ha, thank you all for the great god show me the novice,
CodePudding user response:
CXXAPP class default InitInstance () after creating a document template is not preserved, you can save and then direct call document template OpenDocumentFile (NULL), another button will, of course, but also mapping ID to your CXXAPP class so that you can access your saved document template,