开发者

Insert an UI into another MFC Dialog

开发者 https://www.devze.com 2023-03-08 10:59 出处:网络
I have one MFC application (exe) that contains two panes in its main UI. This application loads another DLL that also contains one dialog. How can I programatically place a Dialog defined into the DLL

I have one MFC application (exe) that contains two panes in its main UI. This application loads another DLL that also contains one dialog. How can I programatically place a Dialog defined into the DLL, and put it into (within) the pane of the MFC application? The question is not how to programatically retrieve the dialog from the DLL but how to put this dialog 'on the top' (within, inside) of one UI pane that belongs to the application?

My goal is to customize the UI of the application with dialog(s) retrieved from开发者_C百科 a dll and give the user the feeling that these dialogs all belong to one application UI. Thanks for any hint.


I have some applications with this feature, often with a tab control to alternate between windows.

First I set a frame in the container window, invisible to the user. The frame is just a placeholder to where the dialog window will be.

Then I make an instance of the dialog window as a global variable in the container class, I create the dialog window as a modeless window (using Create(), not DoModal()), move the window to the same RECT of the frame control, and call ShowWindow() to show the window.


Am I understanding you correctly that you don't want the dialogs to appear as dialogs, but rather as content of another window, or as a pane?

In other words, you want to get rid of the dialog's title bar and embed the dialog's content into another window, is that right?

That is possible. You would need to create the dialog without the title bar (change the window style) and make sure that you create the dialog's window as a childwindow of the window where you want the content to go. I can explain this further but I first would like to know if I'm understanding you correctly.

0

精彩评论

暂无评论...
验证码 换一张
取 消