-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMessageBoxPos.h
43 lines (36 loc) · 917 Bytes
/
MessageBoxPos.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
#pragma once
#include "stdafx.h"
class MessageBoxPos {
public:
enum MONITOR {
_PRIMARY = 1,
_MOUSE,
_MOUSE_POINTER,
_ID,
};
enum POSITION {
_CENTER = 1,
_TOP_CENTER,
_BOTTOM_CENTER,
_LEFT_CENTER,
_RIGHT_CENTER,
_XY,
_POINTER,
};
struct InformationAboutPositionOfMessageBox {
MONITOR monitor;
UINT id;
POSITION type;
POINT delta;
POINT position;
pair<int, wstring> button1;
pair<int, wstring> button2;
pair<int, wstring> button3;
};
static InformationAboutPositionOfMessageBox& MessageBoxPosition() { static thread_local InformationAboutPositionOfMessageBox mMessageBoxPosition; return mMessageBoxPosition; };
static int MessageBox(HWND _hWnd, LPCTSTR _text, LPCTSTR _caption, UINT _type);
private:
static LRESULT CALLBACK SetPosition(int _code, WPARAM _wParam, LPARAM _lParam);
static long GetDiameterX(RECT _rect);
static long GetDiameterY(RECT _rect);
};