Example #1
0
// From msdn.microsoft.com, various ways to enumerate PixelFormats
        void    CPixForm::OnClickedLastPfd()
{
    COpenGL gl;
    PIXELFORMATDESCRIPTOR pfd;

    // 
    // Get the hwnd of the view window.
    // 
    HWND    hwndview = GetViewHwnd();

    // 
    // Get a DC associated with the view window.
    // 
    HDC     dc =::GetDC(hwndview);
    int     nID = (m_nNextID > 1) ? m_nNextID-- : 1;

    // 
    // Get a description of the pixel format. If it is valid, then go and 
    // update the controls in the dialog box, otherwise do nothing.
    // 
    if (gl.DescribePixelFormat(dc, nID, sizeof (PIXELFORMATDESCRIPTOR), &pfd))
        UpdateDlg(&pfd);
    // 
    // Release the DC.
    // 
    ::ReleaseDC(hwndview, dc);
}
Example #2
0
void CToneBalanceDlg::OnTimer( UINT  nIDEvent )
{
	

	if (!AutoPreview_OnTimer(nIDEvent))	   //if timer's no good, return
		return;
	MakeMap(m_lpData->lpMap );
	SetMapGlobals();
	MapPreview(GetViewHwnd());
}