resize.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef __RESIZE_H
  2. #define __RESIZE_H
  3. #ifdef _WIN32
  4. LRESULT CALLBACK resizeWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  5. #endif
  6. class resizeClass
  7. {
  8. #ifdef _WIN32
  9. friend LRESULT CALLBACK resizeWndProc(HWND wnd, UINT uMsg, WPARAM wParam, LPARAM lParam); // heh, i really need this one ;)
  10. #endif
  11. private:
  12. void drawFrame(void);
  13. void setResizeCursor(int action);
  14. int orientation(int a, int action);
  15. OSWINDOWHANDLE hWnd;
  16. OSWINDOWHANDLE resizedWindow;
  17. ifc_window *resizedWindowR;
  18. int resizeWay;
  19. RECT curRect;
  20. RECT originalRect;
  21. int cX, cY;
  22. int minWinWidth, minWinHeight;
  23. int maxWinWidth, maxWinHeight;
  24. int sugWinWidth, sugWinHeight;
  25. int screenHeight, screenWidth;
  26. bool cancelit;
  27. RECT snapAdjust;
  28. #ifdef WIN32
  29. HBRUSH oldB, brush;
  30. HPEN oldP, pen;
  31. #endif
  32. HDC dc;
  33. int mix;
  34. public:
  35. resizeClass(ifc_window *wnd, int minx, int miny, int maxx, int maxy, int sugx, int sugy);
  36. ~resizeClass();
  37. int resizeWindow(ifc_window *wnd, int way);
  38. #ifdef _WIN32
  39. LRESULT wndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  40. #endif
  41. RECT getRect(void);
  42. };
  43. #endif