Programming - cpueblo.com

PeekMessage() - VCL 의 Application->ProcessMessages() 구현


글쓴이 : 유광희 날짜 : 2003-02-10 (월) 16:18 조회 : 17432

		if (PeekMessage(&msg, m_hWnd,  0, 0, PM_REMOVE))
		{
			TranslateMessage(&msg);
			DispatchMessage(&msg);
		}


void CTimerDlg::OnButton1()
{
	// TODO: Add your control notification handler code here
	for (int i = 0; i < <FONT COLOR=#FF00FF>100000; i++)
	{
		MSG msg;

		CString a;

		a.Format("%d", i);
		m_Button.SetWindowText(a);

		if (PeekMessage(&msg, m_hWnd,  0, 0, PM_REMOVE))
		{
			TranslateMessage(&msg);
			DispatchMessage(&msg);
		}
	}
}