Mercurial > dwindows
comparison win/dw.c @ 1750:1de7daad85a3
Updated readme, removed debug message and committed fixes for ANSI builds on Windows.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 13 Jun 2012 20:50:17 +0000 |
parents | ff9a51706715 |
children | eeec5ceec7a5 |
comparison
equal
deleted
inserted
replaced
1749:ff9a51706715 | 1750:1de7daad85a3 |
---|---|
1974 #ifdef UNICODE | 1974 #ifdef UNICODE |
1975 WCHAR uc[2] = { 0 }; | 1975 WCHAR uc[2] = { 0 }; |
1976 | 1976 |
1977 uc[0] = (WCHAR)mp1; | 1977 uc[0] = (WCHAR)mp1; |
1978 utf8 = WideToUTF8(uc); | 1978 utf8 = WideToUTF8(uc); |
1979 dw_debug("UTF8 %s\n", utf8); | |
1980 #endif | 1979 #endif |
1981 | 1980 |
1982 if(GetAsyncKeyState(VK_SHIFT) & 0x8000) | 1981 if(GetAsyncKeyState(VK_SHIFT) & 0x8000) |
1983 special |= KC_SHIFT; | 1982 special |= KC_SHIFT; |
1984 if(GetAsyncKeyState(VK_CONTROL) & 0x8000) | 1983 if(GetAsyncKeyState(VK_CONTROL) & 0x8000) |
6245 tmp = CreateWindowEx(0L, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | TBSTYLE_AUTOSIZE | CCS_NORESIZE | | 6244 tmp = CreateWindowEx(0L, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | TBSTYLE_AUTOSIZE | CCS_NORESIZE | |
6246 CCS_NOPARENTALIGN | CCS_NODIVIDER, 0, 0, 100, 30, DW_HWND_OBJECT, (HMENU)id, DWInstance, NULL); | 6245 CCS_NOPARENTALIGN | CCS_NODIVIDER, 0, 0, 100, 30, DW_HWND_OBJECT, (HMENU)id, DWInstance, NULL); |
6247 | 6246 |
6248 /* Disable visual styles by default */ | 6247 /* Disable visual styles by default */ |
6249 if(_SetWindowTheme) | 6248 if(_SetWindowTheme) |
6250 _SetWindowTheme(tmp, TEXT(""), TEXT("")); | 6249 _SetWindowTheme(tmp, L"", L""); |
6251 | 6250 |
6252 /* Insert the single bitmap and button into the toolbar */ | 6251 /* Insert the single bitmap and button into the toolbar */ |
6253 SendMessage(tmp, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0); | 6252 SendMessage(tmp, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0); |
6254 SendMessage(tmp, TB_SETBUTTONSIZE, 0, MAKELPARAM(bmi.bmWidth, bmi.bmHeight)); | 6253 SendMessage(tmp, TB_SETBUTTONSIZE, 0, MAKELPARAM(bmi.bmWidth, bmi.bmHeight)); |
6255 SendMessage(tmp, TB_SETPADDING, 0, 0); | 6254 SendMessage(tmp, TB_SETPADDING, 0, 0); |
7627 { | 7626 { |
7628 SetWindowLong(handle, GWL_STYLE, (style & DW_BS_NOBORDER) ? (currentstyle | thisstyle) : (currentstyle & ~thisstyle)); | 7627 SetWindowLong(handle, GWL_STYLE, (style & DW_BS_NOBORDER) ? (currentstyle | thisstyle) : (currentstyle & ~thisstyle)); |
7629 | 7628 |
7630 /* Enable or disable visual themese */ | 7629 /* Enable or disable visual themese */ |
7631 if(_SetWindowTheme) | 7630 if(_SetWindowTheme) |
7632 _SetWindowTheme(handle, (style & DW_BS_NOBORDER) ? NULL : TEXT(""), (style & DW_BS_NOBORDER) ? NULL : TEXT("")); | 7631 _SetWindowTheme(handle, (style & DW_BS_NOBORDER) ? NULL : L"", (style & DW_BS_NOBORDER) ? NULL : L""); |
7633 | 7632 |
7634 return; | 7633 return; |
7635 } | 7634 } |
7636 } | 7635 } |
7637 #endif | 7636 #endif |