bool CLogWnd::Write(const TCHAR* lpszText, UINT_PTR type /*= 0*/) { UNREFERENCED_PARAMETER(type); if (!IsWindow(m_hWnd)) ASSERTRETURN(false); m_strText += FixLineEnds(lpszText); if (!m_edit.SetText(m_strText)) ASSERTRETURN(false); PostMessage(m_edit, WM_VSCROLL, SB_BOTTOM); return true; }
bool CToolBarTreeView::Create(HWND hWndParent, DWORD style, DWORD exStyle) { if (!RWindow::Create<CToolBarTreeView>(hWndParent)) ASSERTRETURN(false); if (!m_tb.Create<RCustomToolBar>(m_hWnd)) ASSERTRETURN(false); style &= ~WS_BORDER; exStyle &= ~WS_EX_CLIENTEDGE; if (!m_tv.Create<RTreeView>(m_hWnd, style, exStyle)) ASSERTRETURN(false); return true; }
bool CLogWnd::OnCreate(CREATESTRUCT *pCS) { UNREFERENCED_PARAMETER(pCS); if (!m_edit.Create<REditFF>(m_hWnd, ES_MULTILINE|ES_READONLY|ES_AUTOHSCROLL| ES_AUTOVSCROLL/*|WS_VSCROLL*/)) ASSERTRETURN(false); OnPrefChanged(); return true; }
bool CReBar::OnCreate(CREATESTRUCT *pCS) { if (!m_btnTools.Create<CToolBarButton>(m_hWnd, ID_TOOLS, &m_mdcToolsBtn, NULL, true, (HMENU)BUTTON_ID_TOOLS)) ASSERTRETURN(false); if (!m_btnSeen.Create<CToolBarButton>(m_hWnd, ID_SEEN, &m_mdcSeenBtn, NULL, false, (HMENU)BUTTON_ID_SEENMAIN)) ASSERTRETURN(false); if (!m_btnSort.Create<CToolBarButton>(m_hWnd, ID_SORT, &m_mdcSortBtn, NULL, true, (HMENU)BUTTON_ID_SORT)) ASSERTRETURN(false); if (!m_btnView.Create<CToolBarButton>(m_hWnd, ID_VIEW, &m_mdcViewBtn, NULL, false, (HMENU)BUTTON_ID_VIEW)) ASSERTRETURN(false); if (!m_eSearch.Create<RHintEdit>(m_hWnd, ES_AUTOHSCROLL, 0, NULL, 0, 0, 0, 0, ID_SEARCH)) ASSERTRETURN(false); if (!m_categoryBar.Create<CCategoryBar>(m_hWnd)) ASSERTRETURN(false); // Create tooltip windows for buttons HINSTANCE hInst = GetModuleHandle(NULL); CreateToolTip(m_hWnd, BUTTON_ID_TOOLS, hInst, GETSTR(IDS_TOOLTIP_TOOLS)); CreateToolTip(m_hWnd, BUTTON_ID_SEENMAIN, hInst, GETSTR(IDS_TOOLTIP_SEENMAIN)); CreateToolTip(m_hWnd, BUTTON_ID_SORT, hInst, GETSTR(IDS_TOOLTIP_SORT)); CreateToolTip(m_hWnd, BUTTON_ID_VIEW, hInst, GETSTR(IDS_TOOLTIP_VIEW)); m_mdc.Create(0, 0); OnPrefChanged(); return true; }