Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::string GetFlagString(const unsigned int flags)
- {
- std::string str;
- if (flags & SWP_DRAWFRAME) /*SWP_FRAMECHANGED*/
- str += " SWP_DRAWFRAME or SWP_FRAMECHANGED ";
- if (flags & SWP_HIDEWINDOW)
- str += " SWP_HIDEWINDOW";
- if (flags & SWP_NOACTIVATE)
- str += " SWP_NOACTIVATE";
- if (flags & SWP_NOCOPYBITS)
- str += " SWP_NOCOPYBITS ";
- if (flags & SWP_NOMOVE)
- str += " SWP_NOMOVE ";
- if (flags & SWP_NOOWNERZORDER) /*SWP_NOREPOSITION*/
- str += " SWP_NOOWNERZORDER or SWP_NOREPOSITION";
- if (flags & SWP_NOREDRAW)
- str += " SWP_NOREDRAW ";
- if (flags & SWP_NOSENDCHANGING)
- str += " SWP_NOSENDCHANGING ";
- if (flags & SWP_NOSIZE)
- str += " SWP_NOSIZE ";
- if (flags & SWP_NOZORDER)
- str += " SWP_NOZORDER ";
- if (flags & SWP_SHOWWINDOW)
- str += " SWP_SHOWWINDOW ";
- return str;
- }
- void dbgPrintPosition(const int x, const int y, const int w, const int h, const int flags)
- {
- std::cout << "position = (" << x << ", = " << y;
- std::cout << "), size = (" << w << ", " << h << ")," << std::endl;
- if (flags)
- {
- std::cout << "flags = " << GetFlagString(flags);
- }
- std::cout << std::endl;
- }
- void dbgPrintPositionCurrent()
- {
- RECT r = {0};
- GetWindowRect(m_hWnd, &r);
- dbgPrintPosition(r.left, r.top, r.right - r.left, r.bottom - r.top, 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement