重载了按钮类的创建函数,有7个参数。
BOOL CMybutton::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base classreturn CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}
我想创建3个按钮,第一个参数是注册的类名称,该怎么填写第一个参数呢?多谢。
pMyButton = new CMybutton;
pMyButton->Create(这里怎么写,"",WS_CHILD|WS_VISIBLE|WS_BORDER, CRect(10,10,100,30), this, 3456);
BOOL CMybutton::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base classreturn CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}
我想创建3个按钮,第一个参数是注册的类名称,该怎么填写第一个参数呢?多谢。
pMyButton = new CMybutton;
pMyButton->Create(这里怎么写,"",WS_CHILD|WS_VISIBLE|WS_BORDER, CRect(10,10,100,30), this, 3456);
解决方案 »
- 求一服务器源代码 Winsock通讯模板,能支持多客户端的?
- CEditView 想在程序中调用函数打开一个文件,如111.txt怎么办呢
- 求:播放器图标
- 要删除被引用为外码的记录该怎么办??
- 从CEditView继承如何设置字体颜色 背景色
- 请教关于ATL中对话框的问题。急!
- 请问在哪里改应用程序图标?
- VFB的DBF和foxpro for dos、foxbase、dbase等的格式是否是一样的?
- 如何建立一个不带最大化按钮的SDI程序?
- GetProfileInt和WriteProfileInt到底有什么用?请指教
- 这样的情况,是用什么算法去处理,对于统计车道里车流辆排队的长度。
- 请教:一个进程调用另一个进程的成员函数?
这样就行
CButton内部已经给你填上了“Button”
也可以自己填,比如“测试”,等等
还有记得动态创建的按钮在对话框析构函数中一定要将其Delete,要不然会出错。