⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index188.htm

📁 介绍了L C &ouml O S 2&Ecirc 在TM S320VC5402 上的移植以及在移植过程中的一些注意事项, 给出一些关键的实现代码,并在移植的基础上给出了改进堆栈设计以减少对内存需求的方
💻 HTM
字号:
<html>
<style type="text/css"><!--
.p9 {  font-family: "宋体"; font-size: 9pt}a        {text-transform: none; text-decoration: none;}
a:hover {text-decoration: underline; color: #FF0000;}
--></style>
<body background="../di2001.jpg">
<h3 align="center"><font COLOR="#AOAO99"></font></h3>
<table width="100%" border="1" cellspacing="1">
<tr><td><p align="center"><font color="#FF0000">用MFC制作弹出窗口</font></td></tr>
<tr><td><p>
</Br>
我正在试着用MFC来制作弹出窗口,我看过一些关于建立弹出窗口的文章,它们是使用 CWnd对象的。但在文档,视窗结构中是怎样实现的?<Br>
</Br>
你可以建立一个非模态对话框(使用Create函数),你可以在任何建立窗口,子窗口等。如果你一定要在文档、视窗结构中实现,你也可以用CCreateContest类。下面是建立MDI窗口的例子:<Br>
</Br>
</Br>
{<Br>
&nbsp;&nbsp;&nbsp;&nbsp;LPCTSTR lpszClassName = NULL;<Br>
&nbsp;&nbsp;&nbsp;&nbsp;CCreateContext cContext;<Br>
</Br>
&nbsp;&nbsp;&nbsp;&nbsp;cContext.m_pNewViewClass =  RUNTIME_CLASS ( CMyView )<Br>
</Br>
&nbsp;&nbsp;&nbsp;&nbsp;DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW &<Br>
~WS_THICKFRAME & ~WS_MAXIMIZEBOX;<Br>
</Br>
&nbsp;&nbsp;&nbsp;&nbsp;// TODO: Add your specialized code here and/or call the base class<Br>
</Br>
&nbsp;&nbsp;&nbsp;&nbsp;if ( CMDIChildWnd::Create(lpszClassName, lpszWindowName, dwStyle,<Br>
pParentWnd->rectDefault, pParentWnd, &cContext) )<Br>
&nbsp;&nbsp;&nbsp;&nbsp;{<Br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InitialUpdateFrame ( NULL, TRUE );<Br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CScrollView *pView = ( CScrollView* ) GetActiveView();<Br>
</Br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ( pView )<Br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pView->ResizeParentToFit ( FALSE );<Br>
</Br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return TRUE;<Br>
&nbsp;&nbsp;&nbsp;&nbsp;}<Br>
&nbsp;&nbsp;&nbsp;&nbsp;else<Br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return FALSE;<Br>
}<Br>
&nbsp;&nbsp;CCreateContext有一个成员为m_pCurrentDoc,你可以用它来将一个文档分配到相应的窗口上.<Br>
</Br>
</Br>
</p></td></tr>
</table>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -