블로그 이미지
fiadot_old

칼퇴근을 위한 게임 서버 개발 방법론에 대한 심도있는 고찰 및 성찰을 위한 블로그!

Rss feed Tistory
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("으하하");
,
TOTAL TODAY