1
0

oswnd.cpp 508 B

1234567891011121314151617181920212223242526272829303132
  1. #include <precomp.h>
  2. #include "oswnd.h"
  3. int OSWnd::onInit()
  4. {
  5. OSWND_PARENT::onInit();
  6. onSetVisible(isVisible());
  7. return 1;
  8. }
  9. void OSWnd::onSetVisible(int show)
  10. {
  11. #ifdef WIN32
  12. ShowWindow(getOSHandle(), show ? SW_NORMAL : SW_HIDE);
  13. #endif
  14. }
  15. int OSWnd::onResize()
  16. {
  17. OSWND_PARENT::onResize();
  18. #ifdef WIN32
  19. if (getOSHandle())
  20. {
  21. RECT r;
  22. getClientRect(&r);
  23. SetWindowPos(getOSHandle(), NULL, r.left, r.top, r.right - r.left, r.bottom - r.top, SWP_NOZORDER | SWP_NOACTIVATE);
  24. }
  25. #endif
  26. return 1;
  27. }