Home » programming

使用MFC在一对话框中嵌入另一对话框

By: Zhiqiang Ma On: Jun 10, 2009 Views: 50 No Comment Print Email
Tags: ,

使用MFC在一对话框中嵌入另一对话框
代码如下:

static MyInDlg inDlg; // 需嵌入的对话框
inDlg.Create( IDD_DIALOG, AfxGetApp()->m_pMainWnd);
CRect rc; // 嵌入对话框在原对话框中的位置
//GetClientRect(&rc);
rc.left = 150;
rc.top = 0;
rc.bottom = 200;
rc.right = 350;
inDlg.MoveWindow( rc ); // 设置位置
inDlg.ShowWindow( SW_SHOW ); // 将对话框显示出来

对嵌入对话框设置如下:
Style: Child
Border: none

Read more:

Digg del.icio.us Stumble Techorati Facebook Newsvine Reddit Twitter
Mixx LinkedIn Google Bookmark Yahoo Bookmark MySpace LiveJournal Blogger RSS feed
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.