提交 | 用户 | age
|
418cb3
|
1 |
#include "pch.h"
|
Q |
2 |
#include "CMyFuncKeyToolBar.h"
|
|
3 |
BEGIN_MESSAGE_MAP(CMyFuncKeyToolBar, CMFCToolBar)
|
|
4 |
ON_WM_CREATE()
|
|
5 |
ON_WM_SIZE()
|
|
6 |
END_MESSAGE_MAP()
|
df0321
|
7 |
/*
|
418cb3
|
8 |
structButton myButtons[] =
|
Q |
9 |
{
|
|
10 |
{33001,_T("11") },
|
|
11 |
{33002,_T("12") },
|
|
12 |
{33003,_T("13") },
|
|
13 |
{33004,_T("14") },
|
|
14 |
{33005,_T("15") },
|
|
15 |
{33006,_T("16") },
|
|
16 |
{33007,_T("17") },
|
|
17 |
{33008,_T("18") },
|
|
18 |
{33009,_T("19") },
|
|
19 |
{33010,_T("110") },
|
|
20 |
{33011,_T("111") },
|
|
21 |
{33012,_T("112") },
|
|
22 |
};
|
|
23 |
static int myButtonCount = sizeof(myButtons) / sizeof(structButton);
|
df0321
|
24 |
*/
|
418cb3
|
25 |
int CMyFuncKeyToolBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
|
Q |
26 |
{
|
|
27 |
if (CMFCToolBar::OnCreate(lpCreateStruct) == -1)
|
|
28 |
return -1;
|
|
29 |
CRect rect1(0, 0, 100, 24);
|
|
30 |
// TODO: 在此添加您专用的创建代码
|
df0321
|
31 |
// m_buttons[1].Create(myButtons[1].sCaption,WS_CHILD | WS_TABSTOP | WS_VISIBLE |BS_PUSHBUTTON ,rect1, this, myButtons[1].nID);
|
418cb3
|
32 |
|
Q |
33 |
CRect rect0(0, 0, 500, 48);
|
|
34 |
this->MoveWindow(rect0);
|
|
35 |
return 0;
|
|
36 |
}
|
|
37 |
|
|
38 |
|
|
39 |
void CMyFuncKeyToolBar::OnSize(UINT nType, int cx, int cy)
|
|
40 |
{
|
|
41 |
//CMFCToolBar::OnSize(nType, cx, cy);
|
|
42 |
// CRect rect0(0, 0, 500, 48);
|
|
43 |
// this->MoveWindow(rect0);
|
|
44 |
// TODO: 在此处添加消息处理程序代码
|
|
45 |
}
|