1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| #include "pch.h"
| #include "CMyFuncKeyToolBar.h"
| BEGIN_MESSAGE_MAP(CMyFuncKeyToolBar, CMFCToolBar)
| ON_WM_CREATE()
| ON_WM_SIZE()
| END_MESSAGE_MAP()
| /*
| structButton myButtons[] =
| {
| {33001,_T("11") },
| {33002,_T("12") },
| {33003,_T("13") },
| {33004,_T("14") },
| {33005,_T("15") },
| {33006,_T("16") },
| {33007,_T("17") },
| {33008,_T("18") },
| {33009,_T("19") },
| {33010,_T("110") },
| {33011,_T("111") },
| {33012,_T("112") },
| };
| static int myButtonCount = sizeof(myButtons) / sizeof(structButton);
| */
| int CMyFuncKeyToolBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
| {
| if (CMFCToolBar::OnCreate(lpCreateStruct) == -1)
| return -1;
| CRect rect1(0, 0, 100, 24);
| // TODO: ÔÚ´ËÌí¼ÓÄúרÓõĴ´½¨´úÂë
| // m_buttons[1].Create(myButtons[1].sCaption,WS_CHILD | WS_TABSTOP | WS_VISIBLE |BS_PUSHBUTTON ,rect1, this, myButtons[1].nID);
|
| CRect rect0(0, 0, 500, 48);
| this->MoveWindow(rect0);
| return 0;
| }
|
|
| void CMyFuncKeyToolBar::OnSize(UINT nType, int cx, int cy)
| {
| //CMFCToolBar::OnSize(nType, cx, cy);
| // CRect rect0(0, 0, 500, 48);
| // this->MoveWindow(rect0);
| // TODO: ÔÚ´Ë´¦Ìí¼ÓÏûÏ¢´¦Àí³ÌÐò´úÂë
| }
|
|