summaryrefslogtreecommitdiff
path: root/win/aboutdlg.cpp
diff options
context:
space:
mode:
authordocwhat1999-11-14 06:43:18 +0000
committerdocwhat1999-11-14 06:43:18 +0000
commitd71eec8062e852e56f03102ba4b4e87dc485821d (patch)
tree452368ad0e7e24627e517a0c88c2508d02cea6dc /win/aboutdlg.cpp
parent2046090b7ce8dd901ce43e650be5acf44016d714 (diff)
Initial revision
git-svn-id: http://svn.leocad.org/trunk@2 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'win/aboutdlg.cpp')
-rw-r--r--win/aboutdlg.cpp77
1 files changed, 77 insertions, 0 deletions
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;
+}