From d71eec8062e852e56f03102ba4b4e87dc485821d Mon Sep 17 00:00:00 2001 From: docwhat Date: Sun, 14 Nov 1999 06:43:18 +0000 Subject: Initial revision git-svn-id: http://svn.leocad.org/trunk@2 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- win/aboutdlg.cpp | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 win/aboutdlg.cpp (limited to 'win/aboutdlg.cpp') diff --git a/win/aboutdlg.cpp b/win/aboutdlg.cpp new file mode 100644 index 0000000..36bb9c7 --- /dev/null +++ b/win/aboutdlg.cpp @@ -0,0 +1,77 @@ +// AboutDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "leocad.h" +#include "AboutDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg message handlers + +BOOL CAboutDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + CString info, tmp; + PIXELFORMATDESCRIPTOR pfd; + DescribePixelFormat(m_hViewDC, GetPixelFormat(m_hViewDC), sizeof(PIXELFORMATDESCRIPTOR), &pfd); + + info = ("Pixel Format: "); + if (pfd.iPixelType == PFD_TYPE_RGBA) + info += "RGBA, "; + else + info += "Color Index, "; + + if (pfd.dwFlags & PFD_DOUBLEBUFFER) + info += "Double Buffer "; + else + info += "Single Buffer "; + + if ((pfd.dwFlags & (PFD_GENERIC_ACCELERATED|PFD_GENERIC_FORMAT)) == 0) + info += "(Installable Client Driver)\r\n"; + else if ((pfd.dwFlags & (PFD_GENERIC_ACCELERATED|PFD_GENERIC_FORMAT)) == (PFD_GENERIC_ACCELERATED|PFD_GENERIC_FORMAT)) + info += "(Mini-Client Driver)\r\n"; + else if ((pfd.dwFlags & (PFD_GENERIC_ACCELERATED|PFD_GENERIC_FORMAT)) == PFD_GENERIC_FORMAT) + info += "(Generic Software Driver)\r\n"; + else if ((pfd.dwFlags & (PFD_GENERIC_ACCELERATED|PFD_GENERIC_FORMAT)) == PFD_GENERIC_ACCELERATED) + info += "(Unknown Driver Type)\r\n"; + + tmp.Format("Color bits: %d, Depth Buffer: %d bits\r\nOpenGL Version ", pfd.cColorBits, pfd.cDepthBits); + info += tmp; + info += glGetString(GL_VERSION); + info += " ("; + info += glGetString(GL_RENDERER); + info += " - "; + info += glGetString(GL_VENDOR); + info += ")"; + + SetDlgItemText(IDC_ABTDLG_INFO, info); + return TRUE; +} -- cgit v1.2.3