MCPcopy Create free account
hub / github.com/SFML/SFML / WindowImplWin32

Method WindowImplWin32

src/SFML/Window/Win32/WindowImplWin32.cpp:141–162  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

139{
140////////////////////////////////////////////////////////////
141WindowImplWin32::WindowImplWin32(WindowHandle handle) : m_handle(handle)
142{
143 // Set that this process is DPI aware and can handle DPI scaling
144 setProcessDpiAware();
145
146 if (m_handle)
147 {
148 // If we're the first window handle, we only need to poll for joysticks when WM_DEVICECHANGE message is received
149 if (handleCount == 0)
150 {
151 JoystickImpl::setLazyUpdates(true);
152
153 initRawMouse();
154 }
155
156 ++handleCount;
157
158 // We change the event procedure of the control (it is important to save the old one)
159 SetWindowLongPtrW(m_handle, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
160 m_callback = SetWindowLongPtrW(m_handle, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(&WindowImplWin32::globalOnEvent));
161 }
162}
163
164
165////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 3

setProcessDpiAwareFunction · 0.85
toUtf16Method · 0.80
initRawMouseFunction · 0.70

Tested by

no test coverage detected