Mercurial > dwindows
comparison win/dw.c @ 1988:197f9463efa8
Win: Fix building on Windows XP with SDK 7.1.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 16 Sep 2019 00:16:36 +0000 |
parents | 21811c9e2eaf |
children | 0e354f2edb16 |
comparison
equal
deleted
inserted
replaced
1987:21811c9e2eaf | 1988:197f9463efa8 |
---|---|
3718 SetRect(&rc, 0, 0, cx, cy); | 3718 SetRect(&rc, 0, 0, cx, cy); |
3719 | 3719 |
3720 /* If we are in full dark mode, or we have custom colors selected... | 3720 /* If we are in full dark mode, or we have custom colors selected... |
3721 * we will draw the status window ourselves... otherwise DrawStatusText() | 3721 * we will draw the status window ourselves... otherwise DrawStatusText() |
3722 */ | 3722 */ |
3723 if((_DW_DARK_MODE_ALLOWED == 2 && _DW_DARK_MODE_ENABLED) || | 3723 if( |
3724 #ifdef AEROGLASS | |
3725 (_DW_DARK_MODE_ALLOWED == 2 && _DW_DARK_MODE_ENABLED) || | |
3726 #endif | |
3724 (cinfo && cinfo->fore != -1 && cinfo->fore != DW_CLR_DEFAULT && | 3727 (cinfo && cinfo->fore != -1 && cinfo->fore != DW_CLR_DEFAULT && |
3725 cinfo->back !=- -1 && cinfo->back != DW_CLR_DEFAULT)) | 3728 cinfo->back !=- -1 && cinfo->back != DW_CLR_DEFAULT)) |
3726 { | 3729 { |
3727 ULONG fore = (cinfo && (cinfo->fore != -1 && cinfo->fore != DW_CLR_DEFAULT)) ? _internal_color(cinfo->fore) : DW_RGB_TRANSPARENT; | 3730 ULONG fore = (cinfo && (cinfo->fore != -1 && cinfo->fore != DW_CLR_DEFAULT)) ? _internal_color(cinfo->fore) : DW_RGB_TRANSPARENT; |
3728 ULONG back = (cinfo && (cinfo->back != -1 && cinfo->back != DW_CLR_DEFAULT)) ? _internal_color(cinfo->back) : DW_RGB_TRANSPARENT; | 3731 ULONG back = (cinfo && (cinfo->back != -1 && cinfo->back != DW_CLR_DEFAULT)) ? _internal_color(cinfo->back) : DW_RGB_TRANSPARENT; |
6855 * text: The text to be display by the static text widget. | 6858 * text: The text to be display by the static text widget. |
6856 * id: An ID to be used with dw_window_from_id() or 0L. | 6859 * id: An ID to be used with dw_window_from_id() or 0L. |
6857 */ | 6860 */ |
6858 HWND API dw_radiobutton_new(char *text, ULONG id) | 6861 HWND API dw_radiobutton_new(char *text, ULONG id) |
6859 { | 6862 { |
6863 ColorInfo *cinfo; | |
6860 HWND tmp = CreateWindow(BUTTONCLASSNAME, | 6864 HWND tmp = CreateWindow(BUTTONCLASSNAME, |
6861 UTF8toWide(text), | 6865 UTF8toWide(text), |
6862 WS_CHILD | BS_AUTORADIOBUTTON | | 6866 WS_CHILD | BS_AUTORADIOBUTTON | |
6863 WS_CLIPCHILDREN | WS_VISIBLE, | 6867 WS_CLIPCHILDREN | WS_VISIBLE, |
6864 0,0,0,0, | 6868 0,0,0,0, |
6869 | 6873 |
6870 /* Disable visual styles by default */ | 6874 /* Disable visual styles by default */ |
6871 if(_SetWindowTheme) | 6875 if(_SetWindowTheme) |
6872 _SetWindowTheme(tmp, L"", L""); | 6876 _SetWindowTheme(tmp, L"", L""); |
6873 | 6877 |
6874 ColorInfo *cinfo = calloc(1, sizeof(ColorInfo)); | 6878 cinfo = calloc(1, sizeof(ColorInfo)); |
6875 cinfo->fore = cinfo->back = -1; | 6879 cinfo->fore = cinfo->back = -1; |
6876 cinfo->pOldProc = SubclassWindow(tmp, _BtProc); | 6880 cinfo->pOldProc = SubclassWindow(tmp, _BtProc); |
6877 SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo); | 6881 SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo); |
6878 dw_window_set_font(tmp, DefaultFont); | 6882 dw_window_set_font(tmp, DefaultFont); |
6879 dw_window_set_color(tmp, DW_CLR_DEFAULT, DW_RGB_TRANSPARENT); | 6883 dw_window_set_color(tmp, DW_CLR_DEFAULT, DW_RGB_TRANSPARENT); |