Changeset 40
- Timestamp:
- 02/02/08 18:47:27 (10 months ago)
- Location:
- trunk/helper
- Files:
-
- 3 modified
-
folderinfownd.c (modified) (1 diff)
-
ft2lib-htmlwnd.c (modified) (6 diffs)
-
helper_gcc.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/helper/folderinfownd.c
r39 r40 251 251 case WM_PRESPARAMCHANGED: 252 252 { 253 char fontName[255]; 254 ULONG len; 255 ULONG attrFound; 256 257 len=WinQueryPresParam(hwnd, 258 //len=WinQueryPresParam(WinQueryWindow(hwnd, QW_PARENT), 259 PP_FONTNAMESIZE,0,&attrFound,sizeof(fontName), 260 fontName, 0 /*QPF_NOINHERIT*/); 261 262 263 WinSetPresParam(WinWindowFromID(hwnd, FLDRINFO_WINDOWID_TEXTCTRL),PP_FONTNAMESIZE, 264 len, fontName); 265 253 #if 0 254 DosBeep(3000, 20); 255 /* Forward presentation parameters to the windows on the top */ 256 257 switch(LONGFROMMP(mp1)) 258 { 259 case PP_BACKGROUNDCOLOR: 260 SysWriteToTrapLog("PP_BACKGROUNDCOLOR\n"); 261 break; 262 case PP_FONTNAMESIZE: 263 SysWriteToTrapLog("PP_FONTNAMESIZE\n"); 264 default: 265 break; 266 }; 267 SysWriteToTrapLog("\n"); 268 #endif 269 270 if(PP_FONTNAMESIZE==LONGFROMMP(mp1)) 271 { 272 char fontName[255]; 273 ULONG len; 274 ULONG attrFound; 275 276 len=WinQueryPresParam(hwnd, 277 //len=WinQueryPresParam(WinQueryWindow(hwnd, QW_PARENT), 278 PP_FONTNAMESIZE,0,&attrFound,sizeof(fontName), 279 fontName, 0 /*QPF_NOINHERIT*/); 280 281 WinSetPresParam(WinWindowFromID(hwnd, FLDRINFO_WINDOWID_TEXTCTRL),PP_FONTNAMESIZE, 282 len, fontName); 283 } 266 284 break; 267 285 } -
trunk/helper/ft2lib-htmlwnd.c
r39 r40 1616 1616 /* Set it */ 1617 1617 WinFillRect(hps, &rcl, (LONG) lBg); 1618 // WinFillRect(hps, &rcl, 0x00FFFFFF);1619 1618 } 1620 1619 #else … … 1638 1637 case WM_PRESPARAMCHANGED: 1639 1638 { 1639 MRESULT mr; 1640 1641 if(g_oldStatic) 1642 mr=g_oldStatic( hwnd, msg, mp1, mp2); 1643 else 1644 mr=WinDefWindowProc( hwnd, msg, mp1, mp2); 1645 1646 #if 0 1647 DosBeep(3000, 20); 1648 /* Forward presentation parameters to the windows on the top */ 1649 SysWriteToTrapLog("%s:\n", __FUNCTION__); 1650 1651 switch(LONGFROMMP(mp1)) 1652 { 1653 case PP_BACKGROUNDCOLOR: 1654 SysWriteToTrapLog("PP_BACKGROUNDCOLOR\n"); 1655 break; 1656 case PP_FONTNAMESIZE: 1657 SysWriteToTrapLog("PP_FONTNAMESIZE\n"); 1658 case PP_FOREGROUNDCOLOR: 1659 SysWriteToTrapLog("%s: PP_FOREGROUNDCOLOR\n", __FUNCTION__); 1660 default: 1661 break; 1662 }; 1663 SysWriteToTrapLog("\n"); 1664 #endif 1640 1665 switch(LONGFROMMP(mp1)) 1641 1666 { … … 1664 1689 PP_FOREGROUNDCOLOR,0,&attrFound,sizeof(fg), 1665 1690 &fg, QPF_NOINHERIT)) 1666 1691 1667 1692 wndData->lForeColor=(LONG)fg; 1668 break;1693 break; 1669 1694 } 1670 1671 1695 case PP_FONTNAMESIZE: 1672 1696 { … … 1682 1706 1683 1707 WinInvalidateRect(hwnd, NULLHANDLE, TRUE); 1708 break; 1684 1709 } 1685 1710 } … … 1687 1712 break; 1688 1713 } 1689 break; 1714 return mr; 1715 // break; 1690 1716 } 1691 1717 /* Vertical slider */ … … 1911 1937 1912 1938 // Set the font 1939 /* If the font isn't set properly the code will more or less randomly grab some font. Note 1940 that by setting the font here the set font of a folder container is *not* used. */ 1913 1941 WinSetPresParam(hwnd, 1914 1942 PP_FONTNAMESIZE,(ULONG) strlen(fontName)+1, /* +1 because of terminating 0 */ -
trunk/helper/helper_gcc.c
r16 r40 18 18 */ 19 19 #define INCL_DOS 20 #define INCL_DOSDEVIOCTL 20 21 #define INCL_DOSERRORS 21 22 #define INCL_WIN … … 115 116 WinSetObjectData(hObject, command); 116 117 } 118 } 119 120 static USHORT queryShiftState(void) 121 { 122 USHORT usRc=0; 123 HFILE hf; 124 ULONG ulAction; 125 126 if (NO_ERROR==DosOpen("KBD$", &hf, &ulAction, 0, FILE_NORMAL, 127 OPEN_ACTION_OPEN_IF_EXISTS, /* fsOpenFlags */ 128 OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 129 NULLHANDLE)) 130 { 131 SHIFTSTATE ss; 132 ULONG cbDataLen = sizeof(ss); 133 134 if (NO_ERROR == DosDevIOCtl(hf, IOCTL_KEYBOARD, KBD_GETSHIFTSTATE, 135 NULL, 0, NULL, &ss, cbDataLen, &cbDataLen)) 136 { 137 usRc=ss.fsState; 138 }/* DosDevIOCtl() */ 139 DosClose(hf); 140 }/* DosOpen() */ 141 142 return usRc; 143 } 144 145 /* 146 This function returns true if the Alt and the Ctrl keys are currently pressed. 147 */ 148 BOOL SysQueryAltCtrlPressed(void) 149 { 150 /* Either Alt and Ctrl key */ 151 return ((queryShiftState() & 12)!=0); 117 152 } 118 153 … … 172 207 173 208 174 175 176 177
