Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /dlgAbout.cpp [68cdf8] .. [ed05d7] Maximize Restore

  Switch to side-by-side view

--- a/dlgAbout.cpp
+++ b/dlgAbout.cpp
@@ -1,7 +1,3 @@
-
-// PTLens, Copyright (C) 2004, Thomas Niemann
-// email: thomasn@epaperpress.com, subject=ptlens
-// 
 // This program is free software; you can redistribute 
 // it and/or modify it under the terms of the GNU
 // General Public License as published by the Free 
@@ -19,52 +15,76 @@
 // write to the Free Software Foundation, Inc., 675 
 // Mass Ave, Cambridge, MA 02139, USA.
 
+/**
+* @file dlgAbout.cpp
+* This file is included in all four plug-ins (PTAdjust, PTCorrect, PTPerspect, and PTRemap)
+* Display the About dialog for Photoshop|Help|About Plug-in|PTxxxxx
+* @date January 2007
+*/
+
 #include "main.h"
 
-BOOL WINAPI aboutDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM /*lParam*/) {
-	switch  (wMsg) {
+/**
+* the main dialog process for the about dialog
+* @param[in] hDlg Handle to the dialog
+* @param[in] wMsg
+* @param[in] wParam
+* @param[in] lParam  not used
+* @return TRUE if processed the message, FALSE if did not
+**/
+BOOL WINAPI aboutDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM /*lParam*/)
+{
+	switch  (wMsg)
+  {
 	case WM_INITDIALOG:
 		return TRUE;
 
 	case WM_CHAR:
-		{
-		TCHAR chCharCode = (TCHAR) wParam;
-		if (chCharCode == VK_ESCAPE || chCharCode == VK_RETURN)
-			EndDialog(hDlg, 0);
+  	{
+		  TCHAR chCharCode = (TCHAR) wParam;
+		  if (chCharCode == VK_ESCAPE || chCharCode == VK_RETURN)
+      {
+			  EndDialog(hDlg, 0);
+      }
 		}
 		break;
 	
 	case WM_LBUTTONDOWN:
-        EndDialog(hDlg, 0);
-        break;
+    EndDialog(hDlg, 0);
+    break;
 
 	case WM_COMMAND:
-		switch  (COMMANDID(wParam)) 
+		switch  (LOWORD(wParam)) 
 		{
-		case OK:
+		case IDOK:
 			EndDialog(hDlg, 0);
-            break;
+      break;
 
-		case CANCEL:
+		case IDCANCEL:
 			EndDialog( hDlg, 0 );
 			break;
 
 		default:
-            return FALSE;
-        }
-
-        break;
+      return FALSE;
+    }
+    break;
 
   default:
 	  return  FALSE;
 	
 	} // switch (wMsg)
 
-    return  TRUE;
+  return  TRUE;
 }
 
-void dlgAbout(AboutRecordPtr aboutPtr) {
+/**
+* Display the About Dialog
+* @param[in] aboutPtr
+* @return none
+**/
+void dlgAbout(AboutRecordPtr aboutPtr)
+{
 	PlatformData * platform = (PlatformData *) (aboutPtr->platformData);
 	HWND h = (HWND)platform->hwnd;
-    DialogBoxParam(GetDLLInstance(), "ABOUT", h, aboutDlgProc, 0);
+  DialogBoxParam(GetDLLInstance(), "ABOUT", h, aboutDlgProc, 0);
 }