本文整理汇总了C++中ExtTextOut函数的典型用法代码示例。如果您正苦于以下问题:C++ ExtTextOut函数的具体用法?C++ ExtTextOut怎么用?C++ ExtTextOut使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ExtTextOut函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DisplayRecording
void DisplayRecording(int RecNum, int MaxPlayer)
{
#ifdef _WINDOWS
HDC hdc;
HFONT hFO;
char *text;
text = new char[10];
IDirectDrawSurface_GetDC(DX.DDSRender,&hdc);
hFO=(HFONT)SelectObject(hdc,hGFont);
SetTextColor(hdc,RGB(0,255,0));
if (bTransparent)
SetBkMode(hdc,TRANSPARENT);
else SetBkColor(hdc,RGB(0,0,0));
if (RecNum <= MaxPlayer)
{
sprintf(text,"Player %d\0",RecNum);
ExtTextOut(hdc,2,PSXDisplay.DisplayMode.y-24,0,NULL,text,8,NULL);
}
else if (RecNum == MaxPlayer+1)
ExtTextOut(hdc,2,PSXDisplay.DisplayMode.y-24,0,NULL,"None\0",4,NULL);
else
ExtTextOut(hdc,2,PSXDisplay.DisplayMode.y-24,0,NULL,"All\0",3,NULL);
SelectObject(hdc,hFO);
IDirectDrawSurface_ReleaseDC(DX.DDSRender,hdc);
delete text;
#endif
}
示例2: PaintRectBG
//
// Draw a rectangle in a single colour. Depending on the run-direction (left/right),
// the rectangle's position may need to be mirrored within the run before output
//
static
void PaintRectBG(USPDATA *uspData, ITEM_RUN *itemRun, HDC hdc, int xpos, RECT *rect, ATTR *attr)
{
RECT rc = *rect;
// rectangle must be mirrored within the run for RTL scripts
if(itemRun->analysis.fRTL)
{
int rtlOffset = xpos*2 + itemRun->width - rc.right - rc.left;
OffsetRect(&rc, rtlOffset, 0);
}
// draw selection highlight + add to clipping region
if(attr->sel)
{
SetBkColor(hdc, uspData->selBG);
ExtTextOut(hdc, 0, 0, ETO_OPAQUE|ETO_CLIPPED, &rc, 0, 0, 0);
ExcludeClipRect(hdc, rc.left, rc.top, rc.right, rc.bottom);
}
// draw normal background
else
{
SetBkColor(hdc, attr->bg);
ExtTextOut(hdc, 0, 0, ETO_OPAQUE|ETO_CLIPPED, &rc, 0, 0, 0);
}
}
示例3: DisplayInput
void DisplayInput(short P1, short P2)
{
#ifdef _WINDOWS
const unsigned short Order[] = {0x80, 0x10, 0x20, 0x40, 0x8, 0x1, 0x8000, 0x4000, 0x2000, 0x1000, 0x400, 0x400, 0x800, 0x800, 0x100, 0x100, 0x200, 0x200};
HDC hdc;
HFONT hFO;
IDirectDrawSurface_GetDC(DX.DDSRender,&hdc);
hFO=(HFONT)SelectObject(hdc,hGFont);
SetTextColor(hdc,RGB(0,255,0));
if (bTransparent)
SetBkMode(hdc,TRANSPARENT);
else SetBkColor(hdc,RGB(0,0,0));
ExtTextOut(hdc,2,PSXDisplay.DisplayMode.y-12,0,NULL,szInputBuf,36,NULL);
for (int i = 0; i < 18; i++)
{
if (P1&Order[i])
{NULL;} else szInputBuf[i] = ' ';
}
for (int i = 0; i < 18; i++)
{
if (P2&Order[i])
{} else szInputBuf[i+18] = ' ';
}
SetTextColor(hdc,RGB(0,255,255));
SetBkMode(hdc,TRANSPARENT);
ExtTextOut(hdc,2,PSXDisplay.DisplayMode.y-12,0,NULL,szInputBuf,36,NULL);
SelectObject(hdc,hFO);
IDirectDrawSurface_ReleaseDC(DX.DDSRender,hdc);
#endif
}
示例4: DisplayAnalog
void DisplayAnalog(PadDataS padd1, PadDataS padd2)
{
#ifdef _WINDOWS
HDC hdc;
HFONT hFO;
char tempstr[128];
IDirectDrawSurface_GetDC(DX.DDSRender,&hdc);
hFO=(HFONT)SelectObject(hdc,hGFont);
SetTextColor(hdc,RGB(0,255,0));
if (bTransparent)
SetBkMode(hdc,TRANSPARENT);
else SetBkColor(hdc,RGB(0,0,0));
int n = 1;
if (padd2.controllerType !=4)
{
sprintf(tempstr,"%03d %03d %03d %03d",padd2.leftJoyX, padd2.leftJoyY, padd2.rightJoyX, padd2.rightJoyY);
ExtTextOut(hdc,PSXDisplay.DisplayMode.x-90,PSXDisplay.DisplayMode.y-12,0,NULL,tempstr,lstrlen(tempstr),NULL);
n++;
}
if (padd1.controllerType !=4)
{
sprintf(tempstr,"%03d %03d %03d %03d",padd1.leftJoyX, padd1.leftJoyY, padd1.rightJoyX, padd1.rightJoyY);
ExtTextOut(hdc,PSXDisplay.DisplayMode.x-90,PSXDisplay.DisplayMode.y-(n*12),0,NULL,tempstr,lstrlen(tempstr),NULL);
}
SelectObject(hdc,hFO);
IDirectDrawSurface_ReleaseDC(DX.DDSRender,hdc);
#endif
}
示例5: SelectObject
BOOL
_DC::DrawText(FONTDef pFont, int x, int y, int flag, _Rect rcClipRect, std::string* pszText, float fStretchCX, float fStretchCY){
if( !context_ || !pFont )
return FALSE;
_Font font;
LOGFONT lf;
font.Attach(pFont);
font.GetLogFont(&lf);
font.Detach();
lf.lfWidth = (lf.lfWidth * fStretchCX);
lf.lfHeight = (lf.lfHeight * fStretchCY);
_Font fontNew;
if( fontNew.CreateFontIndirect(&lf) ){
FONTDef pFontOld = SelectObject(fontNew);
ExtTextOut(x, y, flag, rcClipRect, pszText->c_str());
SelectObject(pFontOld);
fontNew.DeleteObject();
}
else{
FONTDef pFontOld = SelectObject(pFont);
ExtTextOut(x, y, flag, rcClipRect, pszText->c_str());
SelectObject(pFontOld);
}
return FALSE;
}
示例6: draw_captions
void draw_captions(HDC hdc, WORD t)
{
int i;
char szdata[100];
SetBkColor (hdc, PALETTERGB(0,0,100));
SetTextColor (hdc, PALETTERGB(255,255,255));
SetBkMode(hdc, TRANSPARENT);
SelectObject(hdc, DRAW.scaleFont);
/*
switch (objects[t]->type)
{
case OB_EVAL:
strncpy(szdata, ((EVALOBJ *) objects[t])->expression,12);
szdata[12]='.';szdata[13]='.';szdata[14]=0;
break;
case OB_COMPARE:
switch (((COMPAREOBJ *) objects[t])->method)
{
case 0: strcpy(szdata, "A>B"); break;
case 1: strcpy(szdata, "A>=B"); break;
case 2: strcpy(szdata, "A<B"); break;
case 3: strcpy(szdata, "A<=B"); break;
case 4: strcpy(szdata, "A=B"); break;
}
break;
default: strcpy(szdata, objects[t]->tag);
break;
}*/
strcpy(szdata, objects[t]->tag);
ExtTextOut(hdc, SX+objects[t]->xPos+3,SY+objects[t]->yPos+2, 0, NULL,szdata, strlen(szdata), NULL ) ;
SetBkColor (hdc, PALETTERGB(0,128,128));
SetTextColor (hdc, PALETTERGB(100,255,200));
SelectObject (hdc, DRAW.brush_yellow);
for (i=0;i<objects[t]->inports;i++)
{
RoundRect(hdc, SX+objects[t]->xPos, SY+objects[t]->yPos+CON_START-4+i*CON_HEIGHT,
SX+objects[t]->xPos+CON_MAGNETIC, SY+objects[t]->yPos+CON_START-4+i*CON_HEIGHT+CON_MAGNETIC,
10, 10);
if (!objects[t]->in_ports[i].in_name[0]) wsprintf(szdata,"%d",i+1); else strcpy(szdata,objects[t]->in_ports[i].in_name);
ExtTextOut(hdc, SX+objects[t]->xPos+12,SY+objects[t]->yPos-4+CON_START+i*CON_HEIGHT, 0, NULL,szdata, strlen(szdata), NULL ) ;
}
SelectObject (hdc, DRAW.brush_orange);
for (i=0;i<objects[t]->outports;i++)
{
RoundRect(hdc, SX+objects[t]->xPos+objects[t]->width-CON_MAGNETIC, SY+objects[t]->yPos+CON_START-4+i*CON_HEIGHT,
SX+objects[t]->xPos+objects[t]->width, SY+objects[t]->yPos+CON_START-4+i*CON_HEIGHT+CON_MAGNETIC,
10, 10);
if (!objects[t]->out_ports[i].out_name[0]) wsprintf(szdata,"%d",i+1); else strcpy(szdata,objects[t]->out_ports[i].out_name);
SetTextAlign(hdc,TA_RIGHT);
ExtTextOut(hdc, SX+objects[t]->xPos+objects[t]->width-CON_MAGNETIC-4, SY+objects[t]->yPos-4+CON_START+i*CON_HEIGHT, 0, NULL,szdata, strlen(szdata), NULL ) ;
SetTextAlign(hdc,TA_LEFT);
}
}
示例7: max
void CCandidateWindow::_DrawList(_In_ HDC dcHandle, _In_ UINT iIndex, _In_ RECT *prc)
{
int pageCount = 0;
int candidateListPageCnt = _pIndexRange->Count();
int cxLine = _TextMetric.tmAveCharWidth;
int cyLine = max(_cyRow, _TextMetric.tmHeight);
int cyOffset = (cyLine == _cyRow ? (cyLine-_TextMetric.tmHeight)/2 : 0);
RECT rc;
for (;
(iIndex < _candidateList.Count()) && (pageCount < candidateListPageCnt);
iIndex++, pageCount++)
{
CCandidateListItem* pItemList = _candidateList.GetAt(iIndex);
rc.top = prc->top + pageCount * cyLine;
rc.bottom = rc.top + cyLine;
rc.left = prc->left + PageCountPosition * cxLine;
rc.right = prc->left + StringPosition * cxLine;
// Number Font Color And BK
SetTextColor(dcHandle, CANDWND_NUM_COLOR);
SetBkColor(dcHandle, GetSysColor(COLOR_3DHIGHLIGHT));
ExtTextOut(dcHandle, PageCountPosition * cxLine, pageCount * cyLine + cyOffset, ETO_OPAQUE, &rc, pItemList->_FindKeyCode.Get(), (DWORD) pItemList->_FindKeyCode.GetLength(), NULL);
rc.left = prc->left + StringPosition * cxLine;
rc.right = prc->right;
// Candidate Font Color And BK
if (_currentSelection != iIndex)
{
SetTextColor(dcHandle, _crTextColor);
SetBkColor(dcHandle, GetSysColor(COLOR_3DHIGHLIGHT));
}
else
{
SetTextColor(dcHandle, CANDWND_SELECTED_ITEM_COLOR);
SetBkColor(dcHandle, CANDWND_SELECTED_BK_COLOR);
}
ExtTextOut(dcHandle, StringPosition * cxLine, pageCount * cyLine + cyOffset, ETO_OPAQUE, &rc, pItemList->_ItemString.Get(), (DWORD)pItemList->_ItemString.GetLength(), NULL);
}
for (; (pageCount < candidateListPageCnt); pageCount++)
{
rc.top = prc->top + pageCount * cyLine;
rc.bottom = rc.top + cyLine;
rc.left = prc->left + PageCountPosition * cxLine;
rc.right = prc->left + StringPosition * cxLine;
FillRect(dcHandle, &rc, (HBRUSH)(COLOR_3DHIGHLIGHT+1));
}
}
示例8: PaintListFolderWindow
int PaintListFolderWindow(HWND hwnd, LISTWINDOW_INFO *lpListWindowInfo)
{
DIRECTORY_INFO *lpDirectoryInfo;
char textbuffer[255];
HDC hdc;
PAINTSTRUCT psPaint;
RECT clientRect;
RECT textRect;
HFONT hLargeFont;
HFONT hSmallFont;
lpDirectoryInfo=&lpListWindowInfo->directoryInfo; //get the pointer to the directory info block
hdc = BeginPaint(hwnd, &psPaint);
GetClientRect(hwnd, &clientRect);
SetBkColor(hdc, RGB_ZINNY_DARKBLUE);
SetTextColor(hdc, RGB(255, 255, 255));
hLargeFont = CreateFont(
MulDiv(14, GetDeviceCaps(hdc, LOGPIXELSY), 72),
0,0,0,FW_BOLD,
FALSE,FALSE,FALSE,
DEFAULT_CHARSET,OUT_OUTLINE_PRECIS,
CLIP_DEFAULT_PRECIS,ANTIALIASED_QUALITY, VARIABLE_PITCH|FF_SWISS,"Arial");
hSmallFont = CreateFont(
MulDiv(8, GetDeviceCaps(hdc, LOGPIXELSY), 72),
0,0,0,FW_BOLD,
FALSE,FALSE,FALSE,
DEFAULT_CHARSET,OUT_OUTLINE_PRECIS,
CLIP_DEFAULT_PRECIS,NONANTIALIASED_QUALITY, VARIABLE_PITCH|FF_SWISS,"Arial");
SelectObject(hdc,hLargeFont);
textRect.top=0; textRect.bottom=30;
textRect.left=0; textRect.right=clientRect.right;
ExtTextOut(hdc, 5,5, ETO_OPAQUE, &textRect, lpDirectoryInfo->directoryName, strlen(lpDirectoryInfo->directoryName), NULL);
SelectObject(hdc,hSmallFont);
sprintf(textbuffer, "(%i file%s found)", lpDirectoryInfo->numberOfFiles, (lpDirectoryInfo->numberOfFiles==1)?"":"s");
textRect.top=30; textRect.bottom=clientRect.bottom;
textRect.left=0; textRect.right=clientRect.right;
ExtTextOut(hdc, 5,30, ETO_OPAQUE, &textRect, textbuffer, strlen(textbuffer), NULL);
DeleteObject(hSmallFont);
DeleteObject(hLargeFont);
EndPaint (hwnd, &psPaint);
return 0;
}
示例9: SetBkColor
BOOL CImeView::DisplayCandStrings(HWND hwnd, LPCANDIDATELIST lpCandList)
{
HDC hdc; // Storage for device context handle.
LPSTR lpStr; // Storage for LP to a string.
DWORD dwNumPerPage; // Storage for num per page
DWORD dwStartIndex; // Storage for candidate index
DWORD dwEndIndex; // Storage for candidate index
RECT rect; // Storage for client rect.
int y; //
DWORD dwBackColor; // Storage for background color value
DWORD dwTextColor;
char buf[255];
dwNumPerPage = (!lpCandList->dwPageSize ) ?
DEFAULT_CAND_NUM_PER_PAGE :
lpCandList->dwPageSize;
dwStartIndex = lpCandList->dwPageStart;
dwEndIndex = dwStartIndex + dwNumPerPage;
dwEndIndex = ( dwEndIndex >= lpCandList->dwCount ) ?
lpCandList->dwCount : dwEndIndex;
hdc = ::GetDC(hwnd);
// Draw Background
dwBackColor = SetBkColor(hdc, RGB(0xc0 ,0xc0, 0xc0));
::GetClientRect(hwnd, &rect);
ExtTextOut( hdc, 0, 0, ETO_OPAQUE, &rect, NULL, 0, 0);
// Draw Selection
rect.top = rect.top + ( lpCandList->dwSelection - dwStartIndex ) *
m_charHeight;
rect.bottom = rect.top + m_charHeight;
SetBkColor(hdc, RGB(0x00, 0x00, 0x80));
ExtTextOut( hdc, 0, rect.top, ETO_OPAQUE, &rect, NULL, 0, 0);
SetBkMode( hdc, TRANSPARENT );
dwTextColor = GetTextColor(hdc);
for (y = 0 ; dwStartIndex < dwEndIndex; dwStartIndex++, y++ ) {
lpStr = (LPSTR) lpCandList + lpCandList->dwOffset[dwStartIndex];
if ( dwStartIndex == lpCandList->dwSelection )
SetTextColor(hdc, RGB(255, 255, 255));
else
SetTextColor(hdc, dwTextColor);
wsprintf(buf, "%d :%s", y + 1, lpStr);
TextOut(hdc, 2, y * m_charHeight, buf, lstrlen(buf));
}
SetTextColor( hdc, dwTextColor );
SetBkColor( hdc, dwBackColor );
::ReleaseDC( hwnd, hdc );
return TRUE;
}
示例10: DrawCandLine
void DrawCandLine(HDC hDC, LPUIPRIV lpUIPriv, DWORD dwIndex, BOOL fSelected)
{
LPCANDIDATELIST lpCandList = lpUIPriv->lpCandList;
DWORD dwStart, dwEnd;
int i;
RECT rcCandLine;
TCHAR szCandStr[2] = {0};
RECT rcAccel;
TCHAR szAccelStr[2] = {0};
dwStart = lpCandList->dwPageStart;
dwEnd = dwStart + lpCandList->dwPageSize;
dwEnd = dwEnd > lpCandList->dwCount ? lpCandList->dwCount : dwEnd;
if (dwIndex > dwEnd) {
return;
}
i = dwIndex - dwStart;
if (fSelected) {
SetBkColor(hDC, g_sImeUIG.crHighlight);
SetTextColor(hDC, g_sImeUIG.crHighlightText);
} else {
SetBkColor(hDC, g_sImeUIG.crWindow);
SetTextColor(hDC, g_sImeUIG.crWindowText);
}
rcCandLine.left = lpUIPriv->rcCandText.left;
rcCandLine.right = lpUIPriv->rcCandText.right;
rcAccel.top = rcCandLine.top = g_sImeUIG.nCandDy[i] - CAND_LINEGAP;
rcAccel.bottom = rcCandLine.bottom = g_sImeUIG.nCandDy[i + 1];
rcAccel.left = 0; rcAccel.right = rcCandLine.left;
szCandStr[0] = *(LPCTSTR)((LPBYTE)lpCandList + lpCandList->dwOffset[dwIndex]);
ExtTextOut(hDC, g_sImeUIG.nCandDx, g_sImeUIG.nCandDy[i],
ETO_OPAQUE, &rcCandLine, szCandStr, 1, NULL);
if (!g_sImeUIG.bAutoCandAccel || !IsSIPOn()) {
szAccelStr[0] = (TCHAR)(TEXT('1') + i);
ExtTextOut(hDC, 3, g_sImeUIG.nCandDy[i], ETO_OPAQUE, &rcAccel, szAccelStr, 1, NULL);
}
return;
}
示例11: drawOutlineText
void drawOutlineText(HDC hdc,int x,int y,const TCHAR * textBuffer,COLORREF color )
{
size_t len = _tcslen(textBuffer);
SetTextColor(hdc, RGB_BLACK);
ExtTextOut( hdc,x -1, y -1, ETO_OPAQUE, NULL, textBuffer , len, NULL );
ExtTextOut( hdc,x +1, y +1, ETO_OPAQUE, NULL, textBuffer , len, NULL );
ExtTextOut( hdc,x -1, y , ETO_OPAQUE, NULL, textBuffer , len, NULL );
ExtTextOut( hdc,x , y +1, ETO_OPAQUE, NULL, textBuffer , len, NULL );
SetTextColor(hdc, color);
ExtTextOut( hdc,x , y , ETO_OPAQUE, NULL, textBuffer , len, NULL );
}
示例12: TooltipCustDraw
int TooltipCustDraw(LPNMTTCUSTOMDRAW lpttcd) {
if (lpttcd->nmcd.dwDrawStage == CDDS_PREPAINT) {
if (gfstate & GFS_UIGRADIENT) {
DrawGradientFill(lpttcd->nmcd.hdc, &lpttcd->nmcd.rc, gradclr1, gradclr2);
} else {
SetBkColor(lpttcd->nmcd.hdc, 0);
FillRect(lpttcd->nmcd.hdc, &lpttcd->nmcd.rc, hBrushclr);
}
//ImageList_DrawEx(lvwIML, 16, lpttcd->nmcd.hdc, lpttcd->nmcd.rc.left + 6, lpttcd->nmcd.rc.top + 6,
// 36, 18, CLR_DEFAULT, CLR_DEFAULT, ILD_NORMAL);
DrawIconEx(lpttcd->nmcd.hdc, lpttcd->nmcd.rc.left + 6, lpttcd->nmcd.rc.top + 6,
hTooltipTmp, 36, 18, 0, NULL, DI_NORMAL);
SetBkMode(lpttcd->nmcd.hdc, TRANSPARENT);
HGDIOBJ hOld = SelectObject(lpttcd->nmcd.hdc, hFontBold);
ExtTextOut(lpttcd->nmcd.hdc, lpttcd->nmcd.rc.left + 50, lpttcd->nmcd.rc.top + 6,
ETO_CLIPPED, &lpttcd->nmcd.rc, pszTooltipTitle, strlen(pszTooltipTitle), NULL);
SelectObject(lpttcd->nmcd.hdc, hFont);
lpttcd->nmcd.rc.left += 6;
lpttcd->nmcd.rc.top += 26;
DrawText(lpttcd->nmcd.hdc, pszTooltipText, strlen(pszTooltipText), &lpttcd->nmcd.rc, 0);
SelectObject(lpttcd->nmcd.hdc, hOld);
return CDRF_SKIPDEFAULT;
}
return CDRF_DODEFAULT;
}
示例13: GetTextExtentPoint
void Statistics::DrawYLabel(HDC hdc, RECT rc, TCHAR *text) {
SIZE tsize;
GetTextExtentPoint(hdc, text, _tcslen(text), &tsize);
int x = max(0,rc.left-tsize.cx);
int y = rc.top;
ExtTextOut(hdc, x, y, 0, NULL, text, _tcslen(text), NULL);
}
示例14: OutBasket_OnDrawItem
/* This function draws one item in the out-basket list.
*/
void FASTCALL OutBasket_OnDrawItem( HWND hwnd, const DRAWITEMSTRUCT FAR * lpDrawItem )
{
if( lpDrawItem->itemID != -1 )
if( lpDrawItem->itemAction == ODA_FOCUS )
DrawFocusRect( lpDrawItem->hDC, (LPRECT)&lpDrawItem->rcItem );
else {
HFONT hOldFont;
HWND hwndList;
OBINFO obinfo;
TEXTMETRIC tm;
COLORREF tmpT;
COLORREF tmpB;
COLORREF T;
COLORREF B;
HBRUSH hbr;
LPOB lpob;
RECT rc;
hwndList = GetDlgItem( hwnd, IDD_LIST );
lpob = (LPOB)ListBox_GetItemData( hwndList, lpDrawItem->itemID );
Amob_GetObInfo( lpob, &obinfo );
rc = lpDrawItem->rcItem;
hOldFont = SelectFont( lpDrawItem->hDC, hOutBasketFont );
if( lpDrawItem->itemState & ODS_SELECTED )
{
T = crHighlightText;
B = crHighlight;
}
else
{
T = (obinfo.obHdr.wFlags & OBF_OPEN) ? crIgnoredTopic : crOutBaskText;
B = crOutBaskWnd;
}
hbr = CreateSolidBrush( B );
tmpT = SetTextColor( lpDrawItem->hDC, T );
tmpB = SetBkColor( lpDrawItem->hDC, B );
rc.left = 0;
rc.right = 32;
FillRect( lpDrawItem->hDC, &rc, hbr );
if( obinfo.obHdr.wFlags & OBF_KEEP )
Amuser_DrawBitmap( lpDrawItem->hDC, rc.left, rc.top, 16, 16, hbmpOutBasket, 1 );
if( obinfo.obHdr.wFlags & OBF_HOLD )
Amuser_DrawBitmap( lpDrawItem->hDC, rc.left + 16, rc.top, 16, 16, hbmpOutBasket, 0 );
if( obinfo.obHdr.wFlags & OBF_ACTIVE )
Amuser_DrawBitmap( lpDrawItem->hDC, rc.left + 16, rc.top, 16, 16, hbmpOutBasket, 2 );
if( obinfo.obHdr.wFlags & OBF_SCRIPT )
Amuser_DrawBitmap( lpDrawItem->hDC, rc.left + 16, rc.top, 16, 16, hbmpOutBasket, 4 );
if( obinfo.obHdr.wFlags & OBF_ERROR )
Amuser_DrawBitmap( lpDrawItem->hDC, rc.left + 16, rc.top, 16, 16, hbmpOutBasket, 3 );
rc.left = rc.right;
rc.right = lpDrawItem->rcItem.right;
Amob_Describe( lpob, lpTmpBuf );
GetTextMetrics( lpDrawItem->hDC, &tm );
ExtTextOut( lpDrawItem->hDC, rc.left, rc.top, ETO_OPAQUE, &rc, lpTmpBuf, strlen( lpTmpBuf ), NULL );
SelectFont( lpDrawItem->hDC, hOldFont );
SetTextColor( lpDrawItem->hDC, tmpT );
SetBkColor( lpDrawItem->hDC, tmpB );
DeleteBrush( hbr );
}
}
示例15: create_mf
static HMETAFILE create_mf(void)
{
RECT rect = {0, 0, 100, 100};
HDC hdc = CreateMetaFile(NULL);
ExtTextOut(hdc, 0, 0, ETO_OPAQUE, &rect, "Test String", strlen("Test String"), NULL);
return CloseMetaFile(hdc);
}