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

📄 subject_27308.htm

📁 vc
💻 HTM
字号:
<p>
序号:27308 发表者:Tonni 发表日期:2003-01-10 10:34:22
<br>主题:菜鸟专用问题!
<br>内容:我现在要输入多个信息,输入的数据都是都一样,只是名称不一样,<BR>通过对话框来输入,这样我就要使用多个的对话框,但我又不想使用多个对话框,<BR>而只是改动标题栏的信息,我该怎么做?谢谢
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:爱丽思 回复日期:2003-01-10 10:53:11
<br>内容:改动对话框的标题<BR>或者不用标题,在对话框里设置不同的提示说明就可以了<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:天花乱坠 回复日期:2003-01-10 11:00:26
<br>内容:SetWindowText<BR>The SetWindowText function changes the text of the specified window's title bar (if it has one). If the specified window is a control, the text of the control is changed. However, SetWindowText cannot change the text of a control in another application.<BR><BR>BOOL SetWindowText(<BR>&nbsp;&nbsp;HWND hWnd,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // handle to window or control<BR>&nbsp;&nbsp;LPCTSTR lpString&nbsp;&nbsp; // address of string<BR>);<BR> <BR>Parameters<BR>hWnd <BR>Handle to the window or control whose text is to be changed. <BR>lpString <BR>Pointer to a null-terminated string to be used as the new title or control text. <BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:Tonni 回复日期:2003-01-10 11:08:49
<br>内容:谢谢两位,加了两个成员变量保存标题,和那个Static边框(不知道叫什么名字:),重载了构造函数,及OnInitDialog,问题解决!<BR><BR>BOOL SendAttDlg::OnInitDialog() <BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;CDialog::OnInitDialog();<BR>&nbsp;&nbsp;&nbsp;&nbsp;if(!m_strCaption.IsEmpty())<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;SetWindowText(m_strCaption);<BR>&nbsp;&nbsp;&nbsp;&nbsp;if(!m_strBorder.IsEmpty())<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((CStatic*)this-&gt;GetDlgItem(IDC_STATIC_BORDER))-&gt;SetWindowText(m_strCaption);<BR>&nbsp;&nbsp;&nbsp;&nbsp;return TRUE;&nbsp;&nbsp;// return TRUE unless you set the focus to a control<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// EXCEPTION: OCX Property Pages should return FALSE<BR>}<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

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