本文整理汇总了C++中CPaintDC::Draw3dRect方法的典型用法代码示例。如果您正苦于以下问题:C++ CPaintDC::Draw3dRect方法的具体用法?C++ CPaintDC::Draw3dRect怎么用?C++ CPaintDC::Draw3dRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPaintDC
的用法示例。
在下文中一共展示了CPaintDC::Draw3dRect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WindowProcNew
//***************************************************************************************
LRESULT CALLBACK CBCGPFileDialog::WindowProcNew(HWND hwnd,UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_NOTIFY:
{
CBCGPFileDialog* pFD = GetBCGFileDlg (hwnd);
LPNMHDR pHdr = (LPNMHDR) lParam;
ASSERT (pHdr != NULL);
if (wParam == iTabCtrlId && pHdr->code == TCN_SELCHANGE)
{
pFD->OnTabSelchange();
}
else if ((wParam == iNewListCtrlId || wParam == iRecentListCtrlId)
&& pHdr->code == NM_DBLCLK)
{
pFD->OnItemDblClick();
}
}
break;
case WM_COMMAND:
{
if ((int) LOWORD(wParam) == IDOK)
{
CBCGPFileDialog* pFD = GetBCGFileDlg (hwnd);
if (pFD->GetPage () != CBCGPFileDialog::BCGFileOpen)
{
pFD->OnItemDblClick();
return 0;
}
}
}
break;
case WM_PAINT:
{
CBCGPFileDialog* pFD = GetBCGFileDlg (hwnd);
pFD->CollectControls ();
if (pFD->m_pBmpLogo != NULL)
{
ASSERT_VALID (pFD->m_pBmpLogo);
CFileDialog* pDlg = (CFileDialog*)CWnd::FromHandle (hwnd);
ASSERT (pDlg != NULL);
CPaintDC dc (pDlg); // device context for painting
dc.DrawState (pFD->m_rectLogo.TopLeft (),
pFD->m_rectLogo.Size (), pFD->m_pBmpLogo,
DSS_NORMAL);
CRect rectFrame = pFD->m_rectLogo;
rectFrame.InflateRect (1, 1);
dc.Draw3dRect (rectFrame, globalData.clrBtnShadow, globalData.clrBtnLight);
}
}
break;
case WM_SIZE:
{
LRESULT lRes = CallWindowProc(CBCGPFileDialog::m_wndProc, hwnd, message, wParam, lParam);
CBCGPFileDialog* pFD = GetBCGFileDlg (hwnd);
ASSERT_VALID (pFD);
CWnd* pFDParent = pFD->GetParent();
ASSERT (pFDParent != NULL);
CRect rectTabs;
pFDParent->GetClientRect (rectTabs);
rectTabs.DeflateRect (4, 4);
rectTabs.top += pFD->m_iLogoAreaHeight;
pFD->m_wndTab.SetWindowPos (NULL, -1, -1,
rectTabs.Width (), rectTabs.Height (),
SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
pFD->m_lstFDControls.RemoveAll ();
pFD->CollectControls ();
return lRes;
}
}
return CallWindowProc(CBCGPFileDialog::m_wndProc, hwnd, message, wParam, lParam);
}