Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1344 lines
31 KiB

  1. // Windows CE implementations of W32 Interfaces.
  2. #ifndef GUID_NULL
  3. const GUID GUID_NULL = {
  4. 0x00000000,
  5. 0x0000,
  6. 0x0000,
  7. {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
  8. };
  9. #endif
  10. // The following function is needed only because a Windows CE dll must have at least one export
  11. __declspec(dllexport) void Useless( void )
  12. {
  13. return;
  14. }
  15. LONG ValidateTextRange(TEXTRANGE *pstrg);
  16. ATOM WINAPI CW32System::RegisterREClass(
  17. const WNDCLASSW *lpWndClass)
  18. {
  19. // On Windows CE we don't do anything with ANSI window class
  20. return ::RegisterClass(lpWndClass);
  21. }
  22. #ifndef NOANSIWINDOWS
  23. LRESULT CW32System::ANSIWndProc(
  24. HWND hwnd,
  25. UINT msg,
  26. WPARAM wparam,
  27. LPARAM lparam,
  28. BOOL fIs10Mode)
  29. {
  30. // Should never be used in WinCE
  31. AssertSz(FALSE, "BUG: Should not be called");
  32. return 0;
  33. }
  34. #endif
  35. DWORD WINAPI CW32System::GetKerningPairs(HDC hdc, DWORD ckp, KERNINGPAIR *pkp)
  36. {
  37. return 0;
  38. // return GetKerningPairsW(hdc, ckp, pkp);
  39. }
  40. extern ICustomTextOut *g_pcto;
  41. void WINAPI CW32System::REGetCharWidth(
  42. HDC hdc,
  43. WCHAR ch,
  44. INT *pdxp,
  45. UINT cpg,
  46. BOOL fCustomTextOut)
  47. {
  48. int junk;
  49. SIZE size;
  50. if (fCustomTextOut && g_pcto->GetCharWidthW(hdc, ch, ch, pdxp))
  51. return;
  52. GetTextExtentExPoint(hdc, &ch, 1, 0, NULL, &junk, &size);
  53. *pdxp = size.cx;
  54. }
  55. void WINAPI CW32System::REExtTextOut(
  56. CONVERTMODE cm,
  57. UINT uiCodePage,
  58. HDC hdc,
  59. int x,
  60. int y,
  61. UINT fuOptions,
  62. CONST RECT *prc,
  63. const WCHAR *lpString,
  64. UINT cch,
  65. CONST INT *lpDx,
  66. DWORD dwETOFlags)
  67. {
  68. if (dwETOFlags & fETOCustomTextOut)
  69. {
  70. g_pcto->ExtTextOutW(hdc, x, y, fuOptions, prc, lpString, cch, lpDx);
  71. return;
  72. }
  73. ExtTextOut(hdc, x, y, fuOptions, prc, lpString, cch, lpDx);
  74. return;
  75. }
  76. CONVERTMODE WINAPI CW32System::DetermineConvertMode( HDC hdc, BYTE tmCharSet )
  77. {
  78. AssertSz(FALSE, "BUG: Should not be called");
  79. return CVT_NONE;
  80. }
  81. void WINAPI CW32System::CalcUnderlineInfo(HDC hdc, CCcs *pcccs, TEXTMETRIC *ptm )
  82. {
  83. // Default calculation of size of underline
  84. // Implements a heuristic in the absence of better font information.
  85. SHORT dyDescent = pcccs->_yDescent;
  86. if (0 == dyDescent)
  87. {
  88. dyDescent = pcccs->_yHeight >> 3;
  89. }
  90. pcccs->_dyULWidth = max(1, dyDescent / 4);
  91. pcccs->_dyULOffset = (dyDescent - 3 * pcccs->_dyULWidth + 1) / 2;
  92. if ((0 == pcccs->_dyULOffset) && (dyDescent > 1))
  93. {
  94. pcccs->_dyULOffset = 1;
  95. }
  96. pcccs->_dySOOffset = -ptm->tmAscent / 3;
  97. pcccs->_dySOWidth = pcccs->_dyULWidth;
  98. return;
  99. }
  100. BOOL WINAPI CW32System::ShowScrollBar( HWND hWnd, int wBar, BOOL bShow, LONG nMax )
  101. {
  102. SCROLLINFO si;
  103. Assert(wBar == SB_VERT || wBar == SB_HORZ);
  104. W32->ZeroMemory(&si, sizeof(SCROLLINFO));
  105. si.cbSize = sizeof(SCROLLINFO);
  106. si.fMask = SIF_RANGE | SIF_DISABLENOSCROLL;
  107. if (bShow)
  108. {
  109. si.nMax = nMax;
  110. }
  111. ::SetScrollInfo(hWnd, wBar, &si, TRUE);
  112. return TRUE;
  113. }
  114. BOOL WINAPI CW32System::EnableScrollBar( HWND hWnd, UINT wSBflags, UINT wArrows )
  115. {
  116. BOOL fEnable = TRUE;
  117. BOOL fApi;
  118. SCROLLINFO si;
  119. Assert (wSBflags == SB_VERT || wSBflags == SB_HORZ);
  120. if (wArrows == ESB_DISABLE_BOTH)
  121. {
  122. fEnable = FALSE;
  123. }
  124. // Get the current scroll range
  125. W32->ZeroMemory(&si, sizeof(SCROLLINFO));
  126. si.cbSize = sizeof(SCROLLINFO);
  127. si.fMask = SIF_RANGE;
  128. fApi = ::GetScrollInfo(hWnd, wSBflags, &si);
  129. if (fApi && !fEnable)
  130. {
  131. si.fMask = SIF_RANGE | SIF_DISABLENOSCROLL;
  132. si.nMin = 0;
  133. si.nMax = 0;
  134. }
  135. if (fApi) ::SetScrollInfo(hWnd, wSBflags, &si, TRUE);
  136. return fApi ? TRUE : FALSE;
  137. }
  138. BOOL WINAPI CW32System::IsEnhancedMetafileDC( HDC )
  139. {
  140. // No enhanced metafile
  141. return FALSE;
  142. }
  143. UINT WINAPI CW32System::SetTextAlign(HDC hdc, UINT uAlign)
  144. {
  145. // Review :: SHould we set last error?
  146. return GDI_ERROR;
  147. }
  148. BOOL WINAPI CW32System::InvertRect(HDC hdc, CONST RECT *prc)
  149. {
  150. HBITMAP hbm, hbmOld;
  151. HDC hdcMem;
  152. int nHeight, nWidth;
  153. nWidth = prc->right-prc->left;
  154. nHeight = prc->bottom-prc->top;
  155. hdcMem = CreateCompatibleDC(hdc);
  156. hbm = CreateCompatibleBitmap(hdc, nWidth, nHeight);
  157. hbmOld = (HBITMAP) SelectObject(hdcMem, hbm);
  158. BitBlt(hdcMem, 0, 0, nWidth, nHeight, hdc, prc->left, prc->top,
  159. SRCCOPY);
  160. FillRect(hdc, prc, (HBRUSH)GetStockObject(WHITE_BRUSH));
  161. BitBlt(hdc, prc->left, prc->top, nWidth,
  162. nHeight, hdcMem, 0, 0, SRCINVERT);
  163. SelectObject(hdcMem, hbmOld);
  164. DeleteDC(hdcMem);
  165. DeleteObject(hbm);
  166. return TRUE;
  167. }
  168. HPALETTE WINAPI CW32System::ManagePalette(
  169. HDC,
  170. CONST LOGPALETTE *,
  171. HPALETTE &,
  172. HPALETTE &
  173. )
  174. {
  175. // No op for Windows CE
  176. return NULL;
  177. }
  178. BOOL WINAPI CW32System::WinLPtoDP(HDC, LPPOINT, int)
  179. {
  180. // This is not available on Win CE
  181. return 0;
  182. }
  183. BOOL WINAPI CW32System::WinDPtoLP(HDC, LPPOINT, int)
  184. {
  185. // This is not available on Win CE
  186. return 0;
  187. }
  188. long WINAPI CW32System::WvsprintfA( LONG cbBuf, LPSTR pszBuf, LPCSTR pszFmt, va_list arglist )
  189. {
  190. WCHAR wszBuf[64];
  191. WCHAR wszFmt[64];
  192. WCHAR *pwszBuf = wszBuf;
  193. WCHAR *pwszFmt = wszFmt;
  194. Assert(cbBuf < 64);
  195. while (*pszFmt)
  196. {
  197. *pwszFmt++ = *pszFmt++;
  198. if (*(pwszFmt - 1) == '%')
  199. {
  200. Assert(*pszFmt == 's' || *pszFmt == 'd' || *pszFmt == '0' || *pszFmt == 'c');
  201. if (*pszFmt == 's')
  202. {
  203. *pwszFmt++ = 'h';
  204. }
  205. }
  206. }
  207. *pwszFmt = 0;
  208. LONG cw = wvsprintf( wszBuf, wszFmt, arglist );
  209. while (*pszBuf++ = *pwszBuf++);
  210. Assert(cw < cbBuf);
  211. return cw;
  212. }
  213. int WINAPI CW32System::MulDivFunc(int nNumber, int nNumerator, int nDenominator)
  214. {
  215. #ifndef UNDER_CE
  216. if ((nNumerator && nNumerator == nDenominator) || (nDenominator && !nNumber))
  217. return nNumber;
  218. return ::MulDiv(nNumber, nNumerator, nDenominator);
  219. #else
  220. // Special handling for Win CE
  221. // Must be careful to not cause divide by zero
  222. // Note that overflow on the multiplication is not handled
  223. // Hopefully that is not a problem for RichEdit use
  224. // Added Guy's fix up for rounding.
  225. // Conservative check to see if multiplication will overflow.
  226. if (IN_RANGE(_I16_MIN, nNumber, _I16_MAX) &&
  227. IN_RANGE(_I16_MIN, nNumerator, _I16_MAX))
  228. {
  229. return nDenominator ? ((nNumber * nNumerator) + (nDenominator / 2)) / nDenominator : -1;
  230. }
  231. __int64 NNumber = nNumber;
  232. __int64 NNumerator = nNumerator;
  233. __int64 NDenominator = nDenominator;
  234. return NDenominator ? ((NNumber * NNumerator) + (NDenominator / 2)) / NDenominator : -1;
  235. #endif
  236. }
  237. void CW32System::GetFacePriCharSet(HDC hdc, LOGFONT* plf)
  238. {
  239. plf->lfCharSet = 0;
  240. }
  241. HKL CW32System::CheckChangeKeyboardLayout(
  242. BYTE bCharSet)
  243. {
  244. AssertSz(FALSE, "BUG: Should not be called");
  245. return NULL;
  246. }
  247. HKL CW32System::GetKeyboardLayout ( DWORD )
  248. {
  249. AssertSz(FALSE, "BUG: Should not be called");
  250. return NULL;
  251. }
  252. HRESULT CW32System::LoadRegTypeLib ( REFGUID, WORD, WORD, LCID, ITypeLib ** )
  253. {
  254. return E_NOTIMPL;
  255. }
  256. HRESULT CW32System::LoadTypeLib ( const OLECHAR *, ITypeLib ** )
  257. {
  258. return E_NOTIMPL;
  259. }
  260. BSTR CW32System::SysAllocString(const OLECHAR *pch)
  261. {
  262. return ::SysAllocString(pch);
  263. }
  264. BSTR CW32System::SysAllocStringLen(const OLECHAR *pch, UINT cch)
  265. {
  266. return ::SysAllocStringLen(pch, cch);
  267. }
  268. void CW32System::SysFreeString(BSTR bstr)
  269. {
  270. ::SysFreeString(bstr);
  271. }
  272. UINT CW32System::SysStringLen(BSTR bstr)
  273. {
  274. return ::SysStringLen(bstr);
  275. }
  276. void CW32System::VariantInit ( VARIANTARG * )
  277. {
  278. AssertSz(FALSE, "BUG: Should not be called");
  279. return;
  280. }
  281. void CW32System::VariantClear ( VARIANTARG * )
  282. {
  283. AssertSz(FALSE, "BUG: Should not be called");
  284. return;
  285. }
  286. HRESULT CW32System::OleCreateFromData ( LPDATAOBJECT, REFIID, DWORD, LPFORMATETC, LPOLECLIENTSITE, LPSTORAGE, void ** )
  287. {
  288. AssertSz(FALSE, "BUG: Should not be called");
  289. return 0;
  290. }
  291. HRESULT CW32System::OleCreateFromFile (
  292. REFCLSID rclsid,
  293. LPCOLESTR lpszFileName,
  294. REFIID riid,
  295. DWORD renderopt,
  296. LPFORMATETC pFormatEtc,
  297. LPOLECLIENTSITE pClientSite,
  298. LPSTORAGE pStg,
  299. LPVOID * ppvObj)
  300. {
  301. AssertSz(FALSE, "BUG: Should not be called");
  302. return S_FALSE;
  303. }
  304. void CW32System::CoTaskMemFree ( LPVOID )
  305. {
  306. AssertSz(FALSE, "BUG: Should not be called");
  307. return;
  308. }
  309. HRESULT CW32System::CreateBindCtx ( DWORD, LPBC * )
  310. {
  311. AssertSz(FALSE, "BUG: Should not be called");
  312. return 0;
  313. }
  314. HANDLE CW32System::OleDuplicateData ( HANDLE, CLIPFORMAT, UINT )
  315. {
  316. AssertSz(FALSE, "BUG: Should not be called");
  317. return NULL;
  318. }
  319. HRESULT CW32System::CoTreatAsClass ( REFCLSID, REFCLSID )
  320. {
  321. AssertSz(FALSE, "BUG: Should not be called");
  322. return 0;
  323. }
  324. HRESULT CW32System::ProgIDFromCLSID ( REFCLSID, LPOLESTR * )
  325. {
  326. AssertSz(FALSE, "BUG: Should not be called");
  327. return 0;
  328. }
  329. HRESULT CW32System::OleConvertIStorageToOLESTREAM ( LPSTORAGE, LPOLESTREAM )
  330. {
  331. AssertSz(FALSE, "BUG: Should not be called");
  332. return 0;
  333. }
  334. HRESULT CW32System::OleConvertIStorageToOLESTREAMEx ( LPSTORAGE, CLIPFORMAT, LONG, LONG, DWORD, LPSTGMEDIUM, LPOLESTREAM )
  335. {
  336. AssertSz(FALSE, "BUG: Should not be called");
  337. return 0;
  338. }
  339. HRESULT CW32System::OleSave ( LPPERSISTSTORAGE, LPSTORAGE, BOOL )
  340. {
  341. AssertSz(FALSE, "BUG: Should not be called");
  342. return 0;
  343. }
  344. HRESULT CW32System::StgCreateDocfileOnILockBytes ( ILockBytes *, DWORD, DWORD, IStorage ** )
  345. {
  346. AssertSz(FALSE, "BUG: Should not be called");
  347. return 0;
  348. }
  349. HRESULT CW32System::CreateILockBytesOnHGlobal ( HGLOBAL, BOOL, ILockBytes ** )
  350. {
  351. AssertSz(FALSE, "BUG: Should not be called");
  352. return 0;
  353. }
  354. HRESULT CW32System::OleCreateLinkToFile ( LPCOLESTR, REFIID, DWORD, LPFORMATETC, LPOLECLIENTSITE, LPSTORAGE, void ** )
  355. {
  356. AssertSz(FALSE, "BUG: Should not be called");
  357. return 0;
  358. }
  359. LPVOID CW32System::CoTaskMemAlloc ( ULONG )
  360. {
  361. AssertSz(FALSE, "BUG: Should not be called");
  362. return NULL;
  363. }
  364. LPVOID CW32System::CoTaskMemRealloc ( LPVOID, ULONG )
  365. {
  366. AssertSz(FALSE, "BUG: Should not be called");
  367. return NULL;
  368. }
  369. HRESULT CW32System::OleInitialize ( LPVOID )
  370. {
  371. AssertSz(FALSE, "BUG: Should not be called");
  372. return 0;
  373. }
  374. void CW32System::OleUninitialize ( )
  375. {
  376. AssertSz(FALSE, "BUG: Should not be called");
  377. return;
  378. }
  379. HRESULT CW32System::OleSetClipboard ( IDataObject * )
  380. {
  381. return E_NOTIMPL;
  382. }
  383. HRESULT CW32System::OleFlushClipboard ( )
  384. {
  385. AssertSz(FALSE, "BUG: Should not be called");
  386. return 0;
  387. }
  388. HRESULT CW32System::OleIsCurrentClipboard ( IDataObject * )
  389. {
  390. AssertSz(FALSE, "BUG: Should not be called");
  391. return 0;
  392. }
  393. HRESULT CW32System::DoDragDrop ( IDataObject *, IDropSource *, DWORD, DWORD * )
  394. {
  395. AssertSz(FALSE, "BUG: Should not be called");
  396. return 0;
  397. }
  398. HRESULT CW32System::OleGetClipboard ( IDataObject ** )
  399. {
  400. return E_NOTIMPL;
  401. }
  402. HRESULT CW32System::RegisterDragDrop ( HWND, IDropTarget * )
  403. {
  404. AssertSz(FALSE, "BUG: Should not be called");
  405. return 0;
  406. }
  407. HRESULT CW32System::OleCreateLinkFromData ( IDataObject *, REFIID, DWORD, LPFORMATETC, IOleClientSite *, IStorage *, void ** )
  408. {
  409. AssertSz(FALSE, "BUG: Should not be called");
  410. return 0;
  411. }
  412. HRESULT CW32System::OleCreateStaticFromData ( IDataObject *, REFIID, DWORD, LPFORMATETC, IOleClientSite *, IStorage *, void ** )
  413. {
  414. AssertSz(FALSE, "BUG: Should not be called");
  415. return 0;
  416. }
  417. HRESULT CW32System::OleDraw ( IUnknown *, DWORD, HDC, LPCRECT )
  418. {
  419. AssertSz(FALSE, "BUG: Should not be called");
  420. return 0;
  421. }
  422. HRESULT CW32System::OleSetContainedObject ( IUnknown *, BOOL )
  423. {
  424. AssertSz(FALSE, "BUG: Should not be called");
  425. return 0;
  426. }
  427. HRESULT CW32System::CoDisconnectObject ( IUnknown *, DWORD )
  428. {
  429. AssertSz(FALSE, "BUG: Should not be called");
  430. return 0;
  431. }
  432. HRESULT CW32System::WriteFmtUserTypeStg ( IStorage *, CLIPFORMAT, LPOLESTR )
  433. {
  434. AssertSz(FALSE, "BUG: Should not be called");
  435. return 0;
  436. }
  437. HRESULT CW32System::WriteClassStg ( IStorage *, REFCLSID )
  438. {
  439. AssertSz(FALSE, "BUG: Should not be called");
  440. return 0;
  441. }
  442. HRESULT CW32System::SetConvertStg ( IStorage *, BOOL )
  443. {
  444. AssertSz(FALSE, "BUG: Should not be called");
  445. return 0;
  446. }
  447. HRESULT CW32System::ReadFmtUserTypeStg ( IStorage *, CLIPFORMAT *, LPOLESTR * )
  448. {
  449. AssertSz(FALSE, "BUG: Should not be called");
  450. return 0;
  451. }
  452. HRESULT CW32System::ReadClassStg ( IStorage *pstg, CLSID * )
  453. {
  454. AssertSz(FALSE, "BUG: Should not be called");
  455. return 0;
  456. }
  457. HRESULT CW32System::OleRun ( IUnknown * )
  458. {
  459. AssertSz(FALSE, "BUG: Should not be called");
  460. return 0;
  461. }
  462. HRESULT CW32System::RevokeDragDrop ( HWND )
  463. {
  464. AssertSz(FALSE, "BUG: Should not be called");
  465. return 0;
  466. }
  467. HRESULT CW32System::CreateStreamOnHGlobal ( HGLOBAL, BOOL, IStream ** )
  468. {
  469. AssertSz(FALSE, "BUG: Should not be called");
  470. return 0;
  471. }
  472. HRESULT CW32System::GetHGlobalFromStream ( IStream *pstm, HGLOBAL * )
  473. {
  474. AssertSz(FALSE, "BUG: Should not be called");
  475. return 0;
  476. }
  477. HRESULT CW32System::OleCreateDefaultHandler ( REFCLSID, IUnknown *, REFIID, void ** )
  478. {
  479. AssertSz(FALSE, "BUG: Should not be called");
  480. return 0;
  481. }
  482. HRESULT CW32System::CLSIDFromProgID ( LPCOLESTR, LPCLSID )
  483. {
  484. AssertSz(FALSE, "BUG: Should not be called");
  485. return 0;
  486. }
  487. HRESULT CW32System::OleConvertOLESTREAMToIStorage ( LPOLESTREAM, IStorage *, const DVTARGETDEVICE * )
  488. {
  489. AssertSz(FALSE, "BUG: Should not be called");
  490. return 0;
  491. }
  492. HRESULT CW32System::OleLoad ( IStorage *, REFIID, IOleClientSite *, void ** )
  493. {
  494. AssertSz(FALSE, "BUG: Should not be called");
  495. return 0;
  496. }
  497. HRESULT CW32System::ReleaseStgMedium ( LPSTGMEDIUM pstgmed)
  498. {
  499. AssertSz(FALSE, "BUG: Should not be called");
  500. // we don't use anything other than TYMED_HGLOBAL currently.
  501. if (pstgmed && (pstgmed->tymed == TYMED_HGLOBAL)) {
  502. ::LocalFree(pstgmed->hGlobal);
  503. }
  504. return 0;
  505. }
  506. HRESULT CW32System::CoCreateInstance (REFCLSID rclsid, LPUNKNOWN pUnknown,
  507. DWORD dwClsContext, REFIID riid, LPVOID *ppv)
  508. {
  509. AssertSz(FALSE, "BUG: Should not be called");
  510. return S_FALSE;
  511. }
  512. void CW32System::FreeOle()
  513. {
  514. AssertSz(FALSE, "BUG: Should not be called");
  515. }
  516. #ifndef NOFEPROCESSING
  517. void CW32System::FreeIME()
  518. {
  519. AssertSz(FALSE, "BUG: Should not be called");
  520. }
  521. BOOL CW32System::HaveIMEShare()
  522. {
  523. AssertSz(FALSE, "BUG: Should not be called");
  524. return FALSE;
  525. }
  526. BOOL CW32System::getIMEShareObject(CIMEShare **ppIMEShare)
  527. {
  528. AssertSz(FALSE, "BUG: Should not be called");
  529. return FALSE;
  530. }
  531. LRESULT CW32System::AIMMDefWndProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam, LRESULT *plres)
  532. {
  533. AssertSz(FALSE, "BUG: Should not be called");
  534. return S_FALSE;
  535. }
  536. LRESULT CW32System::AIMMGetCodePage(HKL hKL, UINT *uCodePage)
  537. {
  538. AssertSz(FALSE, "BUG: Should not be called");
  539. return S_FALSE;
  540. }
  541. LRESULT CW32System::AIMMActivate(BOOL fRestoreLayout)
  542. {
  543. AssertSz(FALSE, "BUG: Should not be called");
  544. return S_FALSE;
  545. }
  546. LRESULT CW32System::AIMMDeactivate(void)
  547. {
  548. AssertSz(FALSE, "BUG: Should not be called");
  549. return S_FALSE;
  550. }
  551. LRESULT CW32System::AIMMFilterClientWindows(ATOM *aaClassList, UINT uSize)
  552. {
  553. AssertSz(FALSE, "BUG: Should not be called");
  554. return S_FALSE;
  555. }
  556. BOOL CW32System::ImmInitialize( void )
  557. {
  558. AssertSz(FALSE, "BUG: Should not be called");
  559. return FALSE;
  560. }
  561. void CW32System::ImmTerminate( void )
  562. {
  563. AssertSz(FALSE, "BUG: Should not be called");
  564. return;
  565. }
  566. LONG CW32System::ImmGetCompositionStringA ( HIMC, DWORD, LPVOID, DWORD )
  567. {
  568. AssertSz(FALSE, "BUG: Should not be called");
  569. return 0;
  570. }
  571. HIMC CW32System::ImmGetContext ( HWND )
  572. {
  573. AssertSz(FALSE, "BUG: Should not be called");
  574. return 0;
  575. }
  576. BOOL CW32System::ImmSetCompositionFontA ( HIMC, LPLOGFONTA )
  577. {
  578. AssertSz(FALSE, "BUG: Should not be called");
  579. return FALSE;
  580. }
  581. BOOL CW32System::ImmSetCompositionWindow ( HIMC, LPCOMPOSITIONFORM )
  582. {
  583. AssertSz(FALSE, "BUG: Should not be called");
  584. return FALSE;
  585. }
  586. BOOL CW32System::ImmReleaseContext ( HWND, HIMC )
  587. {
  588. AssertSz(FALSE, "BUG: Should not be called");
  589. return FALSE;
  590. }
  591. DWORD CW32System::ImmGetProperty ( HKL, DWORD )
  592. {
  593. AssertSz(FALSE, "BUG: Should not be called");
  594. return 0;
  595. }
  596. BOOL CW32System::ImmGetCandidateWindow ( HIMC, DWORD, LPCANDIDATEFORM )
  597. {
  598. AssertSz(FALSE, "BUG: Should not be called");
  599. return FALSE;
  600. }
  601. BOOL CW32System::ImmSetCandidateWindow ( HIMC, LPCANDIDATEFORM )
  602. {
  603. AssertSz(FALSE, "BUG: Should not be called");
  604. return FALSE;
  605. }
  606. BOOL CW32System::ImmNotifyIME ( HIMC, DWORD, DWORD, DWORD )
  607. {
  608. AssertSz(FALSE, "BUG: Should not be called");
  609. return FALSE;
  610. }
  611. HIMC CW32System::ImmAssociateContext ( HWND, HIMC )
  612. {
  613. AssertSz(FALSE, "BUG: Should not be called");
  614. return NULL;
  615. }
  616. UINT CW32System::ImmGetVirtualKey ( HWND )
  617. {
  618. AssertSz(FALSE, "BUG: Should not be called");
  619. return 0;
  620. }
  621. HIMC CW32System::ImmEscape ( HKL, HIMC, UINT, LPVOID )
  622. {
  623. AssertSz(FALSE, "BUG: Should not be called");
  624. return NULL;
  625. }
  626. BOOL CW32System::ImmGetOpenStatus ( HIMC )
  627. {
  628. AssertSz(FALSE, "BUG: Should not be called");
  629. return 0;
  630. }
  631. BOOL CW32System::ImmGetConversionStatus ( HIMC, LPDWORD, LPDWORD )
  632. {
  633. AssertSz(FALSE, "BUG: Should not be called");
  634. return FALSE;
  635. }
  636. HWND CW32System::ImmGetDefaultIMEWnd ( HWND )
  637. {
  638. AssertSz(FALSE, "BUG: Should not be called");
  639. return NULL;
  640. }
  641. BOOL CW32System::FSupportSty ( UINT, UINT )
  642. {
  643. AssertSz(FALSE, "BUG: Should not be called");
  644. return FALSE;
  645. }
  646. const IMESTYLE * CW32System::PIMEStyleFromAttr ( const UINT )
  647. {
  648. AssertSz(FALSE, "BUG: Should not be called");
  649. return NULL;
  650. }
  651. const IMECOLORSTY * CW32System::PColorStyleTextFromIMEStyle ( const IMESTYLE * )
  652. {
  653. AssertSz(FALSE, "BUG: Should not be called");
  654. return NULL;
  655. }
  656. const IMECOLORSTY * CW32System::PColorStyleBackFromIMEStyle ( const IMESTYLE * )
  657. {
  658. AssertSz(FALSE, "BUG: Should not be called");
  659. return NULL;
  660. }
  661. BOOL CW32System::FBoldIMEStyle ( const IMESTYLE * )
  662. {
  663. AssertSz(FALSE, "BUG: Should not be called");
  664. return FALSE;
  665. }
  666. BOOL CW32System::FItalicIMEStyle ( const IMESTYLE * )
  667. {
  668. AssertSz(FALSE, "BUG: Should not be called");
  669. return FALSE;
  670. }
  671. BOOL CW32System::FUlIMEStyle ( const IMESTYLE * )
  672. {
  673. AssertSz(FALSE, "BUG: Should not be called");
  674. return FALSE;
  675. }
  676. UINT CW32System::IdUlIMEStyle ( const IMESTYLE * )
  677. {
  678. AssertSz(FALSE, "BUG: Should not be called");
  679. return 0;
  680. }
  681. COLORREF CW32System::RGBFromIMEColorStyle ( const IMECOLORSTY * )
  682. {
  683. AssertSz(FALSE, "BUG: Should not be called");
  684. return 0;
  685. }
  686. #endif // #ifndef NOFEPROCESSING
  687. BOOL CW32System::GetVersion(
  688. DWORD *pdwPlatformId,
  689. DWORD *pdwMajorVersion,
  690. DWORD *pdwMinorVersion
  691. )
  692. {
  693. OSVERSIONINFO osv;
  694. osv.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
  695. *pdwPlatformId = 0;
  696. *pdwMajorVersion = 0;
  697. if (GetVersionEx(&osv))
  698. {
  699. *pdwPlatformId = osv.dwPlatformId;
  700. *pdwMajorVersion = osv.dwMajorVersion;
  701. return TRUE;
  702. }
  703. return FALSE;
  704. }
  705. BOOL WINAPI CW32System::GetStringTypeEx(
  706. LCID lcid,
  707. DWORD dwInfoType,
  708. LPCTSTR lpSrcStr,
  709. int cchSrc,
  710. LPWORD lpCharType
  711. )
  712. {
  713. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "GetStringTypeEx");
  714. return ::GetStringTypeExW(lcid, dwInfoType, lpSrcStr, cchSrc, lpCharType);
  715. }
  716. LPWSTR WINAPI CW32System::CharLower(LPWSTR pwstr)
  717. {
  718. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "CharLowerWrap");
  719. return ::CharLowerW(pwstr);
  720. }
  721. DWORD WINAPI CW32System::CharLowerBuff(LPWSTR pwstr, DWORD cchLength)
  722. {
  723. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "CharLowerBuffWrap");
  724. return ::CharLowerBuffW(pwstr, cchLength);
  725. }
  726. DWORD WINAPI CW32System::CharUpperBuff(LPWSTR pwstr, DWORD cchLength)
  727. {
  728. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "CharUpperBuffWrap");
  729. return ::CharUpperBuffW(pwstr, cchLength);
  730. }
  731. HDC WINAPI CW32System::CreateIC(
  732. LPCWSTR lpszDriver,
  733. LPCWSTR lpszDevice,
  734. LPCWSTR lpszOutput,
  735. CONST DEVMODEW * lpInitData)
  736. {
  737. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "CreateIC");
  738. return ::CreateDCW( lpszDriver, lpszDevice, lpszOutput, lpInitData);
  739. }
  740. HANDLE WINAPI CW32System::CreateFile(
  741. LPCWSTR lpFileName,
  742. DWORD dwDesiredAccess,
  743. DWORD dwShareMode,
  744. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  745. DWORD dwCreationDisposition,
  746. DWORD dwFlagsAndAttributes,
  747. HANDLE hTemplateFile
  748. )
  749. {
  750. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "CreateFile");
  751. return ::CreateFileW(lpFileName,
  752. dwDesiredAccess,
  753. dwShareMode,
  754. lpSecurityAttributes,
  755. dwCreationDisposition,
  756. dwFlagsAndAttributes,
  757. hTemplateFile);
  758. }
  759. HFONT WINAPI CW32System::CreateFontIndirect(CONST LOGFONTW * plf)
  760. {
  761. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "CreateFontIndirect");
  762. return ::CreateFontIndirectW(plf);
  763. }
  764. int WINAPI CW32System::CompareString (
  765. LCID Locale, // locale identifier
  766. DWORD dwCmpFlags, // comparison-style options
  767. LPCWSTR lpString1, // pointer to first string
  768. int cchCount1, // size, in bytes or characters, of first string
  769. LPCWSTR lpString2, // pointer to second string
  770. int cchCount2 // size, in bytes or characters, of second string
  771. )
  772. {
  773. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "CompareString");
  774. return ::CompareStringW(Locale, dwCmpFlags, lpString1, cchCount1, lpString2, cchCount2);
  775. }
  776. LRESULT WINAPI CW32System::DefWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
  777. {
  778. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "DefWindowProc");
  779. return ::DefWindowProcW(hWnd, msg, wParam, lParam);
  780. }
  781. int WINAPI CW32System::GetObject(HGDIOBJ hgdiObj, int cbBuffer, LPVOID lpvObj)
  782. {
  783. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "GetObject");
  784. return ::GetObjectW( hgdiObj, cbBuffer, lpvObj );
  785. }
  786. DWORD APIENTRY CW32System::GetProfileSection(
  787. LPCWSTR ,
  788. LPWSTR ,
  789. DWORD
  790. )
  791. {
  792. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "GetProfileSection");
  793. // Not available on Win CE
  794. return 0;
  795. }
  796. int WINAPI CW32System::GetTextFace(
  797. HDC hdc,
  798. int cch,
  799. LPWSTR lpFaceName
  800. )
  801. {
  802. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "GetTextFaceWrap");
  803. return ::GetTextFaceW( hdc, cch, lpFaceName );
  804. }
  805. BOOL WINAPI CW32System::GetTextMetrics(HDC hdc, LPTEXTMETRICW ptm)
  806. {
  807. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "GetTextMetrics");
  808. return ::GetTextMetricsW( hdc, ptm);
  809. }
  810. LONG WINAPI CW32System::GetWindowLong(HWND hWnd, int nIndex)
  811. {
  812. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "GetWindowLong");
  813. return ::GetWindowLongW(hWnd, nIndex);
  814. }
  815. DWORD WINAPI CW32System::GetClassLong(HWND hWnd, int nIndex)
  816. {
  817. AssertSz(FALSE, "BUG: Should not be called");
  818. return 0;
  819. }
  820. HBITMAP WINAPI CW32System::LoadBitmap(HINSTANCE hInstance, LPCWSTR lpBitmapName)
  821. {
  822. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "LoadBitmap");
  823. Assert(HIWORD(lpBitmapName) == 0);
  824. return ::LoadBitmapW(hInstance, lpBitmapName);
  825. }
  826. HCURSOR WINAPI CW32System::LoadCursor(HINSTANCE hInstance, LPCWSTR lpCursorName)
  827. {
  828. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "LoadCursor");
  829. Assert(HIWORD(lpCursorName) == 0);
  830. return (HCURSOR)lpCursorName;
  831. }
  832. HINSTANCE WINAPI CW32System::LoadLibrary(LPCWSTR lpLibFileName)
  833. {
  834. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "LoadLibrary");
  835. return ::LoadLibraryW(lpLibFileName);
  836. }
  837. LRESULT WINAPI CW32System::SendMessage(
  838. HWND hWnd,
  839. UINT Msg,
  840. WPARAM wParam,
  841. LPARAM lParam
  842. )
  843. {
  844. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "SendMessage");
  845. return ::SendMessageW(hWnd, Msg, wParam, lParam);
  846. }
  847. LONG WINAPI CW32System::SetWindowLong(HWND hWnd, int nIndex, LONG dwNewLong)
  848. {
  849. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "SetWindowLongWrap");
  850. return ::SetWindowLongW(hWnd, nIndex, dwNewLong);
  851. }
  852. BOOL WINAPI CW32System::PostMessage(
  853. HWND hWnd,
  854. UINT Msg,
  855. WPARAM wParam,
  856. LPARAM lParam
  857. )
  858. {
  859. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "PostMessage");
  860. return ::PostMessageW(hWnd, Msg, wParam, lParam);
  861. }
  862. BOOL WINAPI CW32System::UnregisterClass(LPCWSTR lpClassName, HINSTANCE hInstance)
  863. {
  864. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "UnregisterClass");
  865. return ::UnregisterClassW( lpClassName, hInstance);
  866. }
  867. int WINAPI CW32System::lstrcmpi(LPCWSTR lpString1, LPCWSTR lpString2)
  868. {
  869. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "lstrcmpi");
  870. return ::lstrcmpiW(lpString1, lpString2);
  871. }
  872. BOOL WINAPI CW32System::PeekMessage(
  873. LPMSG lpMsg,
  874. HWND hWnd,
  875. UINT wMsgFilterMin,
  876. UINT wMsgFilterMax,
  877. UINT wRemoveMsg
  878. )
  879. {
  880. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "PeekMessage");
  881. return ::PeekMessageW(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
  882. }
  883. DWORD WINAPI CW32System::GetModuleFileName(
  884. HMODULE hModule,
  885. LPWSTR lpFilename,
  886. DWORD nSize
  887. )
  888. {
  889. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "GetModuleFileName");
  890. // On Windows CE we will always be known as riched20.dll
  891. CopyMemory(lpFilename, TEXT("riched20.dll"), sizeof(TEXT("riched20.dll")));
  892. return sizeof(TEXT("riched20.dll"))/sizeof(WCHAR) - 1;
  893. }
  894. void CW32System::InitPreferredFontInfo()
  895. {
  896. }
  897. bool CW32System::IsDefaultFontDefined(LONG iCharRep, bool fUIFont, SHORT &iFont)
  898. {
  899. return TRUE;
  900. }
  901. bool CW32System::SetPreferredFontInfo(
  902. int idxScript,
  903. bool fUIFont,
  904. SHORT iFont,
  905. BYTE yHeight,
  906. BYTE bPitchAndFamily
  907. )
  908. {
  909. return FALSE;
  910. }
  911. bool CW32System::IsFontAvail(
  912. HDC hDC, //@parm Screen hDC
  913. int iCharRep, //@parm Character repertoire
  914. bool fUIFont, //@parm UI font?
  915. short *piFontIndex, //@parm Font Name Index (default = NULL)
  916. WCHAR *pFontName) //@parm Font Name (default = NULL)
  917. {
  918. return FALSE;
  919. }
  920. bool CW32System::GetPreferredFontInfo(
  921. int idxScript,
  922. bool fUIFont,
  923. SHORT& iFont,
  924. BYTE& yHeight,
  925. BYTE& bPitchAndFamily
  926. )
  927. {
  928. // Set reasonable values for failure case
  929. iFont = -1;
  930. yHeight = 0;
  931. bPitchAndFamily = 0;
  932. return FALSE;
  933. }
  934. BOOL CW32System::GetStringTypes(
  935. LCID lcid,
  936. LPCTSTR rgch,
  937. int cch,
  938. LPWORD lpCharType1,
  939. LPWORD lpCharType3)
  940. {
  941. for (int ich = 0; ich < cch; ich++)
  942. {
  943. if (rgch[ich] <= 0xFF)
  944. {
  945. lpCharType1[ich] = rgctype1Ansi[rgch[ich]];
  946. lpCharType3[ich] = rgctype3Ansi[rgch[ich]];
  947. }
  948. else
  949. break;
  950. }
  951. if (ich == cch)
  952. return TRUE;
  953. if(::GetStringTypeExW(lcid, CT_CTYPE1, rgch, cch, lpCharType1))
  954. return ::GetStringTypeExW(lcid, CT_CTYPE3, rgch, cch, lpCharType3);
  955. return FALSE;
  956. }
  957. void CW32System::InitSysParams(BOOL fUpdate)
  958. {
  959. // FUTURE : JMO Review this carefully. Not an issue for ebooks because they provide their own host.
  960. TRACEBEGIN(TRCSUBSYSUTIL, TRCSCOPEINTERN, "CW32System::InitSysParams");
  961. CLock lock;
  962. if (!_fSysParamsOk || fUpdate)
  963. {
  964. _fSysParamsOk = TRUE;
  965. const LONG dxSelBarDefaultSize = 8;
  966. HDC hdc = GetScreenDC();
  967. HFONT hfontOld;
  968. TEXTMETRIC tm;
  969. _xPerInchScreenDC = GetDeviceCaps(hdc, LOGPIXELSX);
  970. _yPerInchScreenDC = GetDeviceCaps(hdc, LOGPIXELSY);
  971. int cPalette = GetDeviceCaps(hdc, SIZEPALETTE);
  972. // 256 colors is where we seem to need to use the palette.
  973. if (256 == cPalette)
  974. {
  975. _fUsePalette = TRUE;
  976. }
  977. // calculate a himetric selection bar for the window's host.
  978. _dxSelBar = W32->DeviceToHimetric(dxSelBarDefaultSize, _xPerInchScreenDC);
  979. RefreshKeyboardLayout();
  980. _hSystemFont = (HFONT)GetStockObject(SYSTEM_FONT);
  981. hfontOld = SelectFont(hdc, _hSystemFont);
  982. if(hfontOld)
  983. {
  984. W32->GetTextMetrics(hdc, &tm);
  985. _dupSystemFont = (INT) tm.tmAveCharWidth;
  986. _dvpSystemFont = (INT) tm.tmHeight;
  987. _ySysFontLeading = (INT) tm.tmInternalLeading;
  988. _bCharSetSys = tm.tmCharSet;
  989. SelectFont(hdc, hfontOld);
  990. }
  991. _nScrollInset = DD_DEFSCROLLINSET;
  992. _nDragDelay = DD_DEFDRAGDELAY;
  993. _nDragMinDist = DD_DEFDRAGMINDIST;
  994. _nScrollDelay = DD_DEFSCROLLDELAY;
  995. _nScrollInterval = DD_DEFSCROLLINTERVAL;
  996. _nScrollVAmount = (WORD)(GetYPerInchScreenDC()*DEFSCROLLVAMOUNT)/100;
  997. _nScrollHAmount = (GetXPerInchScreenDC()*DEFSCROLLHAMOUNT)/100;
  998. _cxBorder = GetSystemMetrics(SM_CXBORDER); // Unsizable window border
  999. _cyBorder = GetSystemMetrics(SM_CYBORDER); // widths
  1000. _cxVScroll = GetSystemMetrics(SM_CXVSCROLL); // dimensions
  1001. _cyHScroll = GetSystemMetrics(SM_CYHSCROLL); //
  1002. _cxDoubleClk = GetSystemMetrics(SM_CXDOUBLECLK);
  1003. _cyDoubleClk = GetSystemMetrics(SM_CYDOUBLECLK);
  1004. _DCT = GetDoubleClickTime();
  1005. _sysiniflags = 0;
  1006. }
  1007. }
  1008. DWORD CW32System::AddRef()
  1009. {
  1010. return ++_cRefs;
  1011. }
  1012. DWORD CW32System::Release()
  1013. {
  1014. DWORD culRefs = --_cRefs;
  1015. return culRefs;
  1016. }
  1017. LONG WINAPI CW32System::SetWindowLongPtr(HWND hWnd, int nIndex, LONG_PTR dwNewLong)
  1018. {
  1019. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "SetWindowLongPtr");
  1020. return SetWindowLong(hWnd, nIndex, dwNewLong);
  1021. }
  1022. LONG_PTR WINAPI CW32System::GetWindowLongPtr(HWND hWnd, int nIndex)
  1023. {
  1024. TRACEBEGIN(TRCSUBSYSWRAP, TRCSCOPEINTERN, "GetWindowLongPtr");
  1025. return GetWindowLong(hWnd, nIndex);
  1026. }
  1027. void CW32System::EraseTextOut(HDC hdc, const RECT *prc)
  1028. {
  1029. ::ExtTextOutW(hdc, 0, 0, ETO_OPAQUE, prc, NULL, 0, NULL);
  1030. }
  1031. SHORT CW32System::GetPreferredFontHeight(
  1032. bool fUIFont,
  1033. BYTE bOrgCharSet,
  1034. BYTE bNewCharSet,
  1035. SHORT yOrgHeight
  1036. )
  1037. {
  1038. return yOrgHeight;
  1039. }
  1040. int CW32System::GetTextCharsetInfo(
  1041. HDC hdc, // handle to device context
  1042. LPFONTSIGNATURE lpSig, // pointer to structure to receive data
  1043. DWORD dwFlags // reserved; must be zero
  1044. )
  1045. {
  1046. ZeroMemory(lpSig, sizeof(FONTSIGNATURE));
  1047. // REMARK: this is a very weak approximation of what a font really
  1048. // offers and needs to be changed when WinCE depends on font binding.
  1049. // Perform inverse of code in GetFontSignatureFromFace():
  1050. // qwFontSig = ((fsCsb0 & 0x1FF) << 8) // Shift left since we use
  1051. // | ((fsCsb0 & 0x1F0000) << 3); // low byte for fBiDi, etc.
  1052. DWORD dw = (DWORD)FontSigFromCharRep(GetLocaleCharRep());
  1053. lpSig->fsCsb[0] = ((dw & 0x1FF00) >> 8) | ((dw & 0xF80000) >> 3);
  1054. return DEFAULT_CHARSET;
  1055. }
  1056. void CW32System::RefreshKeyboardLayout ()
  1057. {
  1058. }
  1059. HGLOBAL WINAPI CW32System::GlobalAlloc( UINT uFlags, DWORD dwBytes )
  1060. {
  1061. AssertSz(FALSE, "BUG: Should not be called");
  1062. return 0;
  1063. }
  1064. HGLOBAL WINAPI CW32System::GlobalFree( HGLOBAL hMem )
  1065. {
  1066. AssertSz(FALSE, "BUG: Should not be called");
  1067. return 0;
  1068. }
  1069. UINT WINAPI CW32System::GlobalFlags( HGLOBAL hMem )
  1070. {
  1071. AssertSz(FALSE, "BUG: Should not be called");
  1072. return 0;
  1073. }
  1074. HGLOBAL WINAPI CW32System::GlobalReAlloc( HGLOBAL hMem, DWORD dwBytes, UINT uFlags )
  1075. {
  1076. AssertSz(FALSE, "BUG: Should not be called");
  1077. return 0;
  1078. }
  1079. DWORD WINAPI CW32System::GlobalSize( HGLOBAL hMem )
  1080. {
  1081. AssertSz(FALSE, "BUG: Should not be called");
  1082. return 0;
  1083. }
  1084. LPVOID WINAPI CW32System::GlobalLock( HGLOBAL hMem )
  1085. {
  1086. AssertSz(FALSE, "BUG: Should not be called");
  1087. return 0;
  1088. }
  1089. HGLOBAL WINAPI CW32System::GlobalHandle( LPCVOID pMem )
  1090. {
  1091. AssertSz(FALSE, "BUG: Should not be called");
  1092. return 0;
  1093. }
  1094. BOOL WINAPI CW32System::GlobalUnlock( HGLOBAL hMem )
  1095. {
  1096. AssertSz(FALSE, "BUG: Should not be called");
  1097. return 0;
  1098. }
  1099. BOOL CW32System::IsForegroundFrame(
  1100. HWND hWnd)
  1101. {
  1102. return FALSE;
  1103. }
  1104. BOOL CW32System::TrackMouseLeave(HWND hWnd)
  1105. {
  1106. return FALSE;
  1107. }
  1108. // Helper function for color mixing
  1109. COLORREF CrBlend2Colors(COLORREF cr1, int nPart1, COLORREF cr2, int nPart2)
  1110. {
  1111. return 0;
  1112. }
  1113. COLORREF CW32System::GetCtlBorderColor(BOOL fMousedown, BOOL fMouseover)
  1114. {
  1115. return 0;
  1116. }
  1117. COLORREF CW32System::GetCtlBkgColor(BOOL fMousedown, BOOL fMouseover)
  1118. {
  1119. return 0x0FFFFFFL;
  1120. }
  1121. COLORREF CW32System::GetCtlTxtColor(BOOL fMousedown, BOOL fMouseover, BOOL fDisabled)
  1122. {
  1123. return 0;
  1124. }
  1125. void CW32System::DrawBorderedRectangle(
  1126. HDC hdc,
  1127. RECT *prc,
  1128. COLORREF crBorder,
  1129. COLORREF crBackground
  1130. )
  1131. {
  1132. }
  1133. void CW32System::DrawArrow(
  1134. HDC hdc,
  1135. RECT *prc,
  1136. COLORREF crArrow
  1137. )
  1138. {
  1139. }