예제 #1
0
void CRollLabel::OnPaint()
{
	CPaintDC dc(this);
	
	DWORD dwLayout;
	GetProcessDefaultLayout(&dwLayout);
	if (LAYOUT_RTL & dwLayout) 
		dc.SetLayout(LAYOUT_RTL);

	dc.SetBkMode(TRANSPARENT);
	CFont *pOldFont = dc.SelectObject(&m_ftText);
	dc.SetTextColor(m_crText);

	if (m_bRollTimer)
	{
		dc.TextOut(m_nCurXPos, m_nCurYPos, m_strText);
	}
	else
	{
		UINT uFormat = DT_VCENTER|DT_SINGLELINE;
		if (m_nTextAlign == ELCRLABEL_TEXT_ALIGN_LEFT)
			uFormat |= DT_LEFT;
		else if (m_nTextAlign == ELCRLABEL_TEXT_ALIGN_CENTER)
			uFormat |= DT_CENTER;
		else if (m_nTextAlign == ELCRLABEL_TEXT_ALIGN_RIGHT)
			uFormat |= DT_RIGHT;
		dc.DrawText(m_strText, m_rcClient, uFormat);
	}

	dc.SelectObject(pOldFont);
}
예제 #2
0
BOOL CBlendSelectWnd::Create(CRect rc, CWnd* pParentWnd, UINT nID, DWORD dwStyle)
{
	//if hwnd already exist - return TRUE;
	if (GetSafeHwnd())
		return TRUE;

	m_dwWidth = rc.Width();
	m_dwHeight = rc.Height();

	int nGap = 4;

	m_rcBtnClose.right = m_dwWidth - nGap;
	m_rcBtnClose.top = nGap;
	m_rcBtnClose.left = m_rcBtnClose.right - 16;
	m_rcBtnClose.bottom = m_rcBtnClose.top + 16;

	DWORD dwStyleEx = WS_EX_TOPMOST | WS_EX_TOOLWINDOW | WS_EX_LAYERED;

	DWORD dwLayout;
	GetProcessDefaultLayout(&dwLayout);
	if (LAYOUT_RTL & dwLayout) {
		dwStyleEx |= WS_EX_LAYOUTRTL;
	}

	LPCTSTR pszClassName = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW);

	if (!CreateEx(dwStyleEx, pszClassName, NULL, dwStyle, rc, pParentWnd, nID))
		return FALSE;

	SetOwner(pParentWnd);

	return TRUE;
}
예제 #3
0
void CNumberLimitEdit::ReportErrorMsg()
{
	CString strMsg, strTitle;
	strMsg.Format(m_nErrMsgID, m_nMin, m_nMax);	

	UINT nType = MB_OK;

	DWORD dwLayout = 0;
	GetProcessDefaultLayout(&dwLayout);
	if (dwLayout == LAYOUT_RTL) {
		nType |= MB_RTLREADING | MB_RIGHT;
	}
	
	MessageBox(strMsg, m_strTitle, nType);
}
예제 #4
0
파일: bidi.c 프로젝트: AndreRH/wine
/******************************************************************************
 *                    GetProcessDefaultLayout [USER.1001]
 *
 * Gets the default layout for parentless windows.
 * Right now, just returns 0 (left-to-right).
 *
 * RETURNS
 *    Success: Nonzero
 *    Failure: Zero
 */
BOOL16 WINAPI GetProcessDefaultLayout16( DWORD *pdwDefaultLayout )
{
    FIXME( "( %p ): no BiDi16\n", pdwDefaultLayout );
    return GetProcessDefaultLayout( pdwDefaultLayout );
}