git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16240
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC)
{
void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC)
{
PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), /* size */
1, /* version */
PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), /* size */
1, /* version */
AdjustPFDForAttributes(pfd, attribList);
AdjustPFDForAttributes(pfd, attribList);
- pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd);
+ int pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd);
- wxLogWarning(_("ChoosePixelFormat failed."));
+ wxLogLastError(_T("ChoosePixelFormat"));
- if (SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) != TRUE) {
- wxLogWarning(_("SetPixelFormat failed."));
+ if ( !::SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) ) {
+ wxLogLastError(_T("SetPixelFormat"));