Category : user-interface

Here is a portion of WinUser.h #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400) #define WM_MOUSEWHEEL 0x020A #endif #if (_WIN32_WINNT >= 0x0500) #define WM_XBUTTONDOWN 0x020B #define WM_XBUTTONUP 0x020C #define WM_XBUTTONDBLCLK 0x020D #endif #if (_WIN32_WINNT >= 0x0600) #define WM_MOUSEHWHEEL 0x020E #endif #if (_WIN32_WINNT >= 0x0600) #define WM_MOUSELAST 0x020E #elif (_WIN32_WINNT >= 0x0500) #define WM_MOUSELAST 0x020D #elif ..

Read more

I have a class derived from QGraphicsItem. If I change the transform origin position (setTransformOriginPoint()) of a rotated item (rotation() != 0), the item will change its scene position (it makes sense since the rotation angle stays the same when the transform origin point is updated). How to fix scene position of an item while ..

Read more

I am curious as to how I can make the following code actually work. I currently have an event system in place but it is using the observer pattern. I want my window events to work as such : window win("Engine"); win.on_event(KEY_PRESSED, []{ // key pressed }); win.on_event(KEY_RELEASED, []{ // key released }); win.on_event(MOUSE_CLICKED, []{ ..

Read more

I try to change the default color of the button in my UI. Here is my CallBacl function LRESULT CALLBACK WindowProcedure(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { switch (msg) { case WM_COMMAND: switch (wp) { case FILE_MENU_NEW: MessageBeep(MB_ICONINFORMATION); break; } break; case WM_CREATE: AddMenus(hWnd); AddControls(hWnd); break; case WM_CTLCOLOREDIT: { if (hEdit == (HWND)lp) ..

Read more