diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2018-12-27 00:30:07 +0100 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2018-12-27 00:30:07 +0100 |
| commit | 922a90bc7d5ab7d7d8210ebc94534abdd05cab30 (patch) | |
| tree | b2d5326dac1d99e2daf8c275fb580a1bc5dc3acf /widgetfactory.c | |
| parent | 641789a1c653f46bacfb9dad0a2fde50ac360a5f (diff) | |
dpi debug code in widget factory
Diffstat (limited to 'widgetfactory.c')
| -rw-r--r-- | widgetfactory.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/widgetfactory.c b/widgetfactory.c index b0d503b..94c063f 100644 --- a/widgetfactory.c +++ b/widgetfactory.c @@ -31,7 +31,7 @@ handleMessage(void *closure, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) SetTextColor(hdcStatic, RGB(0,0,0)); SetBkColor(hdcStatic, RGB(0,255,0)); return (LRESULT)green; - } else if (id == ID_LBL3) { + } /*else if (id == ID_LBL3) { SetTextColor(hdcStatic, RGB(255,255,255)); SetBkColor(hdcStatic, RGB(0,0,255)); return (LRESULT)blue; @@ -39,7 +39,7 @@ handleMessage(void *closure, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) SetTextColor(hdcStatic, RGB(0,0,0)); SetBkColor(hdcStatic, RGB(255,255,255)); return (LRESULT)white; - } + }*/ } return ALF_DefWindowProc(hwnd, msg, wparam, lparam); @@ -52,6 +52,11 @@ wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCm (void)lpCmdLine; (void)nCmdShow; + BOOL (*pSetProcessDpiAware)(void); + pSetProcessDpiAware = (BOOL (*)(void))GetProcAddress(GetModuleHandle(L"user32.dll"), "SetProcessDPIAware"); + if (pSetProcessDpiAware) + pSetProcessDpiAware(); + red = CreateSolidBrush(RGB(255,0,0)); green = CreateSolidBrush(RGB(0,255,0)); blue = CreateSolidBrush(RGB(0,0,255)); @@ -94,6 +99,8 @@ wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCm ALF_RecalculateLayout(win); ALF_SetDefaultButton(win, ID_B1); + //EnableWindow(ALF_WidgetHwndById(win, ID_LBL3), FALSE); + ALF_ResizeWindow(win, 1, 1); ALF_ShowModal(win); |
