-
Notifications
You must be signed in to change notification settings - Fork 0
/
mywindow.h
58 lines (51 loc) · 1.29 KB
/
mywindow.h
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
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef _MY_WINDOW_H_
#define _MY_WINDOW_H_
#include <windows.h>
class Rebar;
class ToolBar;
#define WINDOWCLASSNAME "MyWindow"
#define WindowTile "windows sdk¿ò¼Ü"
class MyWindow
{
public:
MyWindow(HINSTANCE hinstance,int rebarheight);
~MyWindow(){
};
bool CreateMyWindow(DWORD dwExStyle,LPCSTR lpClassName,
LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,
int idMenu,int idIcon);
int EnterMsgLoop();
void SetMyWindowIcons(int id_icon);
void SetWindowCaption(LPSTR szCaption);
HWND GetMyWindow()
{
return _hwnd;
}
HINSTANCE GetInstance()
{
return _hInstance;
}
int OnMsgCreate(HWND hwnd,LPARAM lparam);
int OnMsgSize(WPARAM wparam,LPARAM lparam);
int OnMsgNotify(HWND hwnd,int id,LPNMHDR pnmh);
int OnMsgEnterRidl();
int OnMsgEnterMenuLoop();
int OnMsgExitMenuLoop();
int OnMsgPopMenu(int id);
void PopMenu(int i);
private:
int _rbheight;
HWND _hwnd;
HINSTANCE _hInstance;
Rebar* _pRebar;
ToolBar* _pToolBar_Test;
ToolBar* _pToolbarMenu;
HMENU _hMenu;
HMENU __hCurPopSubMenu;
int _nPressed;
public:
bool _isInMenuLoop;
static LRESULT CALLBACK MessageProc(int code,WPARAM wParam,LPARAM lParam);
static HRESULT CALLBACK MyWinProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
};
#endif