Exemple #1
0
sResourceManager_::sResourceManager_()
{
  for(sInt i=0;i<sRFF_MAX;i++)
    SetLogFont(i,L"Arial",16);

  SetLogFont(sRFF_FIXED,L"Courier New",17);
  SetLogFont(sRFF_SYMBOL,L"Webdings",16);
}
Exemple #2
0
ON_Font& ON_Font::operator=( const LOGFONT& logfont )
{
  if ( &m_logfont == &logfont )
  {
    LOGFONT lf = logfont;
    SetLogFont(lf);
  }
  else
  {
    SetLogFont(logfont);
  }
  return *this;
}
Exemple #3
0
// --- In  : hFont - Specifies a handle to the new font.
// --- Out :
// --- Returns : No return value
// --- Effect : Sets the new tooltip font
LRESULT COXToolTipCtrl::OnSetFont(WPARAM hFont, LPARAM /*lParam */)
{
    LRESULT result = Default();

    // Get the logical font from the supplied handle
    LOGFONT lf;
    if (!GetObject((HFONT) hFont, sizeof(LOGFONT), &lf))
    {
        SetLogFont(GetSystemToolTipFont());
        return result;
    }

    SetLogFont(&lf, TRUE);

    return result;
}
Exemple #4
0
// --- In  : wFlag - System-wide parameter flag (see WM_SETTINGCHANGE).
//           lpszSection - Name of changed section or registry changes.
// --- Out :
// --- Returns :
// --- Effect : If the tooltip font has not been overriden, this updates the
//              font with the new system tooltip font
void COXToolTipCtrl::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
{
    CWnd::OnSettingChange(uFlags, lpszSection);

    if (m_bUsingSystemFont)
        SetLogFont(GetSystemToolTipFont(), TRUE);
}
Exemple #5
0
BOOL COXToolTipCtrl::Create(CWnd* pParentWnd)
{
    m_pParentWnd = pParentWnd;

    // Get the class name and create the window
    CString szClassName = AfxRegisterWndClass(CS_CLASSDC|CS_SAVEBITS,
                          LoadCursor(NULL, IDC_ARROW));

    // Create the window - just don't show it yet.
    if (!CWnd::CreateEx(WS_EX_TOPMOST, szClassName, _T(""),
                        WS_POPUP,
                        0, 0, 10, 10, // Size & position updated when needed
                        pParentWnd->GetSafeHwnd(), 0, NULL))
    {
        return FALSE;
    }

    SetLogFont(GetSystemToolTipFont(), FALSE);

    return TRUE;
}
Exemple #6
0
BOOL CToolTipEx::Create(CWnd *pParentWnd)
{
    // Get the class name and create the window
    CString szClassName = AfxRegisterWndClass(CS_CLASSDC | CS_SAVEBITS,
        LoadCursor(NULL, IDC_ARROW));

    // Create the window - just don't show it yet.
    if( !CWnd::CreateEx(WS_EX_TOPMOST, szClassName, _T(""), WS_POPUP,
       0, 0, 0, 0, pParentWnd->GetSafeHwnd(), 0, NULL))
    {
        return FALSE;
    }	

	m_DittoWindow.DoCreate(this);
	m_DittoWindow.SetCaptionColors(g_Opt.m_Theme.CaptionLeft(), g_Opt.m_Theme.CaptionRight());
	m_DittoWindow.SetCaptionOn(this, CGetSetOptions::GetCaptionPos(), true);
	m_DittoWindow.m_bDrawMinimize = false;
	m_DittoWindow.m_bDrawMinimize = false;
	m_DittoWindow.m_bDrawChevron = false;
	m_DittoWindow.m_sendWMClose = false;

    m_RichEdit.Create(_T(""), _T(""), WS_CHILD | WS_VISIBLE | WS_VSCROLL |
		WS_HSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_NOHIDESEL |
                      ES_AUTOHSCROLL, CRect(10, 10, 100, 200), this, 1);

    m_RichEdit.SetReadOnly();
    m_RichEdit.SetBackgroundColor(FALSE, GetSysColor(COLOR_INFOBK));

    SetLogFont(GetSystemToolTipFont(), FALSE);

	m_optionsButton.Create(NULL, WS_CHILD | BS_OWNERDRAW | WS_TABSTOP, CRect(0, 0, 0, 0), this, 2);
	m_optionsButton.LoadStdImageDPI(IDB_COG_16_16, IDB_COG_20_20, IDB_COG_24_24, IDB_COG_32_32, _T("PNG"));
	m_optionsButton.SetToolTipText(theApp.m_Language.GetString(_T("DescriptionOptionsTooltip"), _T("Description Options")));
	m_optionsButton.ShowWindow(SW_SHOW);

    return TRUE;
}
Exemple #7
0
ON_Font::ON_Font( const LOGFONT& logfont )
{
  Defaults();
  SetLogFont(logfont);
}