dialog_resize_helper.h

Go to the documentation of this file.
00001 #ifndef _DIALOG_RESIZE_HELPER_H_
00002 #define _DIALOG_RESIZE_HELPER_H_
00003 
00004 BOOL GetChildWindowRect(HWND wnd,UINT id,RECT* child);
00005 
00006 class dialog_resize_helper
00007 {
00008         pfc::array_t<RECT> rects;
00009         RECT orig_client;
00010         HWND parent;
00011         HWND sizegrip;
00012         unsigned min_x,min_y,max_x,max_y;
00013 
00014 public:
00015         struct param {
00016                 unsigned short id;
00017                 unsigned short flags;
00018         };
00019 private:
00020         pfc::array_t<param> m_table;
00021 
00022         void set_parent(HWND wnd);
00023         void reset();
00024         void on_wm_size();
00025 public:
00026         inline void set_min_size(unsigned x,unsigned y) {min_x = x; min_y = y;}
00027         inline void set_max_size(unsigned x,unsigned y) {max_x = x; max_y = y;}
00028         void add_sizegrip();
00029         
00030         enum {
00031                 X_MOVE = 1, X_SIZE = 2, Y_MOVE = 4, Y_SIZE = 8,
00032                 XY_MOVE = X_MOVE|Y_MOVE, XY_SIZE = X_SIZE|Y_SIZE,
00033                 X_MOVE_Y_SIZE = X_MOVE|Y_SIZE, X_SIZE_Y_MOVE = X_SIZE|Y_MOVE,
00034         };
00035         //the old way
00036         bool process_message(HWND wnd,UINT msg,WPARAM wp,LPARAM lp);
00037 
00038         //ATL-compatible
00039         BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult);
00040 
00041         dialog_resize_helper(const param * src,unsigned count,unsigned p_min_x,unsigned p_min_y,unsigned p_max_x,unsigned p_max_y);
00042 
00043         ~dialog_resize_helper();
00044 
00045         PFC_CLASS_NOT_COPYABLE_EX(dialog_resize_helper);
00046 };
00047 
00048 #endif

Generated on Thu Aug 28 21:15:30 2008 for foobar2000 SDK by  doxygen 1.5.5