foobar2000 SDK  2015-08-03
dialog_resize_helper.h
Go to the documentation of this file.
1 #ifdef _WIN32
2 
3 #ifndef _DIALOG_RESIZE_HELPER_H_
4 #define _DIALOG_RESIZE_HELPER_H_
5 
6 BOOL GetChildWindowRect(HWND wnd,UINT id,RECT* child);
7 
9 {
12  HWND parent;
13  HWND sizegrip;
14  unsigned min_x,min_y,max_x,max_y;
15 
16 public:
17  struct param {
18  unsigned short id;
19  unsigned short flags;
20  };
21 private:
23 
24  void set_parent(HWND wnd);
25  void reset();
26  void on_wm_size();
27 public:
28  inline void set_min_size(unsigned x,unsigned y) {min_x = x; min_y = y;}
29  inline void set_max_size(unsigned x,unsigned y) {max_x = x; max_y = y;}
30  void add_sizegrip();
31 
32  enum {
33  X_MOVE = 1, X_SIZE = 2, Y_MOVE = 4, Y_SIZE = 8,
36  };
37  //the old way
38  bool process_message(HWND wnd,UINT msg,WPARAM wp,LPARAM lp);
39 
40  //ATL-compatible
41  BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult);
42 
43  dialog_resize_helper(const param * src,unsigned count,unsigned p_min_x,unsigned p_min_y,unsigned p_max_x,unsigned p_max_y);
44 
46 
48 };
49 
50 #endif // _DIALOG_RESIZE_HELPER_H_
51 
52 #endif // _WIN32
void set_min_size(unsigned x, unsigned y)
void set_max_size(unsigned x, unsigned y)
BOOL GetChildWindowRect(HWND wnd, UINT id, RECT *child)
typedef BOOL(WINAPI *pPowerSetRequest_t)(__in HANDLE PowerRequest
pfc::array_t< param > m_table
bool process_message(HWND wnd, UINT msg, WPARAM wp, LPARAM lp)
dialog_resize_helper(const param *src, unsigned count, unsigned p_min_x, unsigned p_min_y, unsigned p_max_x, unsigned p_max_y)
pfc::array_t< RECT > rects
PFC_CLASS_NOT_COPYABLE_EX(dialog_resize_helper)
BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)