Showing posts with label Dialog Based. Show all posts
Showing posts with label Dialog Based. Show all posts
2014/05/20
Dialog 기반 Application 에서 Accelerator 구현하기
// Header
<
class CMyDialog : public CDialogEx
{
:
HACCEL m_hAccel;
:
}
// Source
BOOL CMyDialog::OnInitDialog()
{
:
m_hAccel = LoadAccelerators(AfxGetInstanceHandle()
, MAKEINTRESOURCE(IDR_ACCELERATOR));
:
}
BOOL CMyDialog::PreTranslateMessage(MSG* pMsg)
{
:
if ( m_hAccel )
{
if (::TranslateAccelerator(m_hWnd, m_hAccel, pMsg))
{
return(TRUE);
}
}
:
return CDialogEx::PreTranslateMessage(pMsg);
}
Original Post : http://neodreamer-dev.tistory.com/726
2009/12/09
크기 조절이 가능한 CDialog 의 최소 크기 정하기
WM_GETMINMAXINFO 메시지 핸들러를 작성하여 최소 크기를 지정하면 된다.
void CxxDialog::OnGetMinMaxInfo(MINMAXINFO* lpMMI)
{
// Minimum Dialog Size
lpMMI->ptMinTrackSize.x = 800;
lpMMI->ptMinTrackSize.y = 600;
CDialog::OnGetMinMaxInfo(lpMMI);
}
Original Post : http://neodreamer-dev.tistory.com/345
Labels:
C++
,
CDialog
,
Dialog Based
,
Message Handler
,
MFC
,
TistoryOldPost
,
Visual C++
,
WM_GETMINMAXINFO
Subscribe to:
Posts
(
Atom
)