Enable the display of a true type bitmap for true type fonts.
This commit is contained in:
parent
f92bbe6c65
commit
c546462f65
|
@ -810,11 +810,9 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
BITMAP bm;
|
BITMAP bm;
|
||||||
COLORREF cr, oldText=0, oldBk=0;
|
COLORREF cr, oldText=0, oldBk=0;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
#if 0
|
|
||||||
HDC hMemDC;
|
HDC hMemDC;
|
||||||
int nFontType;
|
int nFontType;
|
||||||
HBITMAP hBitmap; /* for later TT usage */
|
HBITMAP objPrev; /* for TT usage */
|
||||||
#endif
|
|
||||||
LPDRAWITEMSTRUCT lpdi = (LPDRAWITEMSTRUCT)lParam;
|
LPDRAWITEMSTRUCT lpdi = (LPDRAWITEMSTRUCT)lParam;
|
||||||
|
|
||||||
if (lpdi->itemID == (UINT)-1) /* got no items */
|
if (lpdi->itemID == (UINT)-1) /* got no items */
|
||||||
|
@ -848,19 +846,16 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
|
||||||
GetObjectA( hBitmapTT, sizeof(bm), &bm );
|
GetObjectA( hBitmapTT, sizeof(bm), &bm );
|
||||||
TextOutA(lpdi->hDC, lpdi->rcItem.left + bm.bmWidth + 10,
|
TextOutA(lpdi->hDC, lpdi->rcItem.left + bm.bmWidth + 10,
|
||||||
lpdi->rcItem.top, buffer, strlen(buffer));
|
lpdi->rcItem.top, buffer, strlen(buffer));
|
||||||
#if 0
|
|
||||||
nFontType = SendMessageA(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
|
nFontType = SendMessageA(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L);
|
||||||
/* FIXME: draw bitmap if truetype usage */
|
if (nFontType & TRUETYPE_FONTTYPE)
|
||||||
if (nFontType&TRUETYPE_FONTTYPE)
|
|
||||||
{
|
{
|
||||||
hMemDC = CreateCompatibleDC(lpdi->hDC);
|
hMemDC = CreateCompatibleDC(lpdi->hDC);
|
||||||
hBitmap = SelectObject(hMemDC, hBitmapTT);
|
objPrev = SelectObject(hMemDC, hBitmapTT);
|
||||||
BitBlt(lpdi->hDC, lpdi->rcItem.left, lpdi->rcItem.top,
|
BitBlt(lpdi->hDC, lpdi->rcItem.left, lpdi->rcItem.top,
|
||||||
bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
|
||||||
SelectObject(hMemDC, hBitmap);
|
SelectObject(hMemDC, objPrev);
|
||||||
DeleteDC(hMemDC);
|
DeleteDC(hMemDC);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case cmb2:
|
case cmb2:
|
||||||
case cmb3:
|
case cmb3:
|
||||||
|
|
Loading…
Reference in New Issue