怎么改变MainFrame的背景色?
我看到一个例子是这样的,但有点不懂:
Create a new class derived from CWnd. Let's call it CMDIClient.
Add a member variable of CMDIClient to your CMDIFrameWnd derived class, in this case CMainFrame:
#include "MDIClient.h"
class CMainFrame : public CMDIFrameWnd
{
...
protected:
CMDIClient m_wndMDIClient;
}
Override CMDIFrameWnd::OnCreateClient in your CMainFrame class and subclass the existing client window that CMDIFrameWnd owns:
bool CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if ( CMDIFrameWnd::OnCreateClient(lpcs, pContext) )
{
m_wndMDIClient.SubclassWindow(m_hWndMDIClient);
return TRUE;
}
else
return FALSE;
}
问题是::::
m_wndMDIClient.SubclassWindow(m_hWndMDIClient); 这个是什么意思,m_hWndMDIClient是什么变量?大家有没有更好的解决的办法?
随便问一下,有什么书是关于介绍写界面方面的书?写界面感觉好难。
Create a new class derived from CWnd. Let's call it CMDIClient.
Add a member variable of CMDIClient to your CMDIFrameWnd derived class, in this case CMainFrame:
#include "MDIClient.h"
class CMainFrame : public CMDIFrameWnd
{
...
protected:
CMDIClient m_wndMDIClient;
}
Override CMDIFrameWnd::OnCreateClient in your CMainFrame class and subclass the existing client window that CMDIFrameWnd owns:
bool CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if ( CMDIFrameWnd::OnCreateClient(lpcs, pContext) )
{
m_wndMDIClient.SubclassWindow(m_hWndMDIClient);
return TRUE;
}
else
return FALSE;
}
问题是::::
m_wndMDIClient.SubclassWindow(m_hWndMDIClient); 这个是什么意思,m_hWndMDIClient是什么变量?大家有没有更好的解决的办法?
随便问一下,有什么书是关于介绍写界面方面的书?写界面感觉好难。
...全文
相关推荐
改变listctrl列表中某行的颜色
wx.SOLID) dc.SetBrush(wx.Brush(color)) dc.DrawRectangle(rect) dc.SetTextForeground('white') # 设置文本颜色为白色,确保在背景色上清晰可见
mfc的常用方法 [转]
Change Dialog Icon- **代码示例**: - 删除原图标资源 ID 为 IDR_MAINFRAME。 - 添加新图标资源 ID 为 IDR_MAINFRAME。
VC++ 个性化日历控件代码
可以通过`CMonthCalCtrl`的成员函数来改变字体大小、类型等属性。 3. **显示样式**: - 日历控件默认显示当前月份的日历。
修改单文档应用程序的外观(图标,标题,背景,鼠标)
在VC++中,开发单文档应用程序(Single Document Interface, SDI)时,有时我们需要自定义应用程序的外观,包括改变窗口的图标、标题、背景色以及鼠标指针样式,以实现个性化或者符合产品需求的设计
表格制作.pdf
例如,当为menu边框设置链接时,可以选择目标为"mainframe",实现框架间的交互。这些技术在教育中的应用广泛,无论是教学资料整理还是学生作业,都能提高信息展示的清晰度和效率。


界面
