9 HWND wndChild = GetDlgItem(wnd,
id);
10 if (wndChild == NULL)
return FALSE;
11 if (!GetWindowRect(wndChild,&temp))
return FALSE;
12 if (!MapWindowPoints(0,wnd,(POINT*)&temp,2))
return FALSE;
34 unsigned count =
m_table.get_size();
36 HDWP hWinPosInfo = BeginDeferWindowPos(count);
37 for(
unsigned n=0;n<
m_table.get_size();n++)
40 const RECT & orig_rect =
rects[n];
42 GetClientRect(
parent,&cur_client);
45 unsigned dest_x = orig_rect.left, dest_y = orig_rect.top,
46 dest_cx = orig_rect.right - orig_rect.left, dest_cy = orig_rect.bottom - orig_rect.top;
61 hWinPosInfo = DeferWindowPos(hWinPosInfo, wnd,0,dest_x,dest_y,dest_cx,dest_cy,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE);
67 GetClientRect(
parent, &rc);
69 hWinPosInfo = DeferWindowPos(hWinPosInfo,
sizegrip, NULL, rc.right - (rc_grip.right - rc_grip.left), rc.bottom - (rc_grip.bottom - rc_grip.top), 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
71 EndDeferWindowPos(hWinPosInfo);
79 SetWindowLongPtr(wnd,DWLP_MSGRESULT,result);
88 case WM_GETMINMAXINFO:
91 LPMINMAXINFO
info = (LPMINMAXINFO) lParam;
92 DWORD dwStyle = GetWindowLong(hWnd, GWL_STYLE);
93 DWORD dwExStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
96 r.left = 0; r.right =
max_x;
97 r.top = 0; r.bottom =
max_y;
98 MapDialogRect(hWnd,&r);
99 AdjustWindowRectEx(&r, dwStyle, FALSE, dwExStyle);
100 info->ptMaxTrackSize.x = r.right - r.left;
101 info->ptMaxTrackSize.y = r.bottom - r.top;
105 r.left = 0; r.right =
min_x;
106 r.top = 0; r.bottom =
min_y;
107 MapDialogRect(hWnd,&r);
108 AdjustWindowRectEx(&r, dwStyle, FALSE, dwExStyle);
109 info->ptMinTrackSize.x = r.right - r.left;
110 info->ptMinTrackSize.y = r.bottom - r.top;
119 for(n=0;n<
m_table.get_size();n++) {
136 sizegrip = CreateWindowEx(0, WC_SCROLLBAR, _T(
""), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | SBS_SIZEGRIP | SBS_SIZEBOXBOTTOMRIGHTALIGN,
137 0, 0, CW_USEDEFAULT, CW_USEDEFAULT,
138 parent, (HMENU)0, NULL, NULL);
142 GetClientRect(
parent, &rc);
144 SetWindowPos(
sizegrip, NULL, rc.right - (rc_grip.right - rc_grip.left), rc.bottom - (rc_grip.bottom - rc_grip.top), 0, 0, SWP_NOZORDER | SWP_NOSIZE);
BOOL GetChildWindowRect(HWND wnd, UINT id, RECT *child)
void info(const char *p_message)
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)
void set_size(t_size p_size)
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
void set_parent(HWND wnd)
BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)