本文整理汇总了C++中UT_Win32LocaleString::length方法的典型用法代码示例。如果您正苦于以下问题:C++ UT_Win32LocaleString::length方法的具体用法?C++ UT_Win32LocaleString::length怎么用?C++ UT_Win32LocaleString::length使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UT_Win32LocaleString
的用法示例。
在下文中一共展示了UT_Win32LocaleString::length方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreatePen
/*
Draws the Format button with an arrow
*/
void AP_Win32Dialog_Styles::_onDrawButton(LPDRAWITEMSTRUCT lpDrawItemStruct, HWND hWnd)
{
UINT uiState = lpDrawItemStruct->itemState;
HPEN hPen;
HPEN pOldPen;
HDC hdc = lpDrawItemStruct->hDC;
int nWidth;
int nHeight;
int x, xEnd, xStart;
int y;
POINT p;
const char* pText;
HWND hParent;
LONG lData;
UT_Win32LocaleString str;
const XAP_StringSet * pSS = m_pApp->getStringSet();
pText= pSS->getValue(AP_STRING_ID_DLG_Styles_ModifyFormat);
nWidth = lpDrawItemStruct->rcItem.right - lpDrawItemStruct->rcItem.left;
nHeight = lpDrawItemStruct->rcItem.bottom - lpDrawItemStruct->rcItem.top;
// set the pen color
if (uiState&ODS_DISABLED)
hPen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_GRAYTEXT));
else
hPen = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNTEXT));
pOldPen = (HPEN) SelectObject(hdc, hPen);
// draw the border of the button
if(uiState&ODS_SELECTED)
DrawFrameControl(hdc, &lpDrawItemStruct->rcItem, DFC_BUTTON, DFCS_BUTTONPUSH|DFCS_PUSHED);
else
DrawFrameControl(hdc, &lpDrawItemStruct->rcItem, DFC_BUTTON, DFCS_BUTTONPUSH);
// Draw arrow
y = nHeight/2;
xStart = (nWidth/6)*5;
for (int i=0; i<4; i++)
{
x = xStart + i;
xEnd = xStart + 7 - i;
::MoveToEx(hdc, x, y, &p);
::LineTo(hdc, xEnd, y);
y++;
}
str.fromUTF8(pText);
ExtTextOutW(hdc, (nWidth/6)*1, ((nHeight/4)), 0, NULL, str.c_str(), str.length(), NULL);
// Clean Up
SelectObject(hdc, pOldPen);
DeleteObject(hPen);
}