글
Technical Article 2004. 4. 2. 13:32다이얼로그(dialog) 관련 옵션
App 타이틀 설정
BOOL OnInitDialog()
SetWindowText(_T("Note MP3 Manager For Winamp"));
최상위 옵션
SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); // Top most 옵션 enable!
창 최대화
PostMessage(WM_SYSCOMMAND,SC_MAXIMIZE,0); // 최대화~
엔터키 막기 & 키처리
BOOL CNoteAmpDlg::PreTranslateMessage(MSG* pMsg)
{
// 추가해야 할부분 [!!!]
if ( pMsg->message == WM_KEYDOWN )
{
if( pMsg->wParam == VK_RETURN || pMsg->wParam==VK_ESCAPE )
{
}
else if ( pMsg->wParam == VK_F1 )
{
}
else if ( pMsg->wParam == VK_SPACE )
{
return TRUE;
}
}
return CDialog::PreTranslateMessage(pMsg);
}
윈도우 핸들 얻기
GetSafeHwnd();
CWinApp 얻기
AfxGetApp()->
edit나 static 글자 바꾸기
GetDlgItem(IDC_EDIT_FILENAME)->SetWindowText("으하하");
BOOL OnInitDialog()
SetWindowText(_T("Note MP3 Manager For Winamp"));
최상위 옵션
SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); // Top most 옵션 enable!
창 최대화
PostMessage(WM_SYSCOMMAND,SC_MAXIMIZE,0); // 최대화~
엔터키 막기 & 키처리
BOOL CNoteAmpDlg::PreTranslateMessage(MSG* pMsg)
{
// 추가해야 할부분 [!!!]
if ( pMsg->message == WM_KEYDOWN )
{
if( pMsg->wParam == VK_RETURN || pMsg->wParam==VK_ESCAPE )
{
}
else if ( pMsg->wParam == VK_F1 )
{
}
else if ( pMsg->wParam == VK_SPACE )
{
return TRUE;
}
}
return CDialog::PreTranslateMessage(pMsg);
}
윈도우 핸들 얻기
GetSafeHwnd();
CWinApp 얻기
AfxGetApp()->
edit나 static 글자 바꾸기
GetDlgItem(IDC_EDIT_FILENAME)->SetWindowText("으하하");
RECENT COMMENT