help.cpp

来自「十分经典的开源反编译工具」· C++ 代码 · 共 100 行

CPP
100
字号
/************************************************************************
* help.cpp                                                              *
* - functions for help dialogs                                          *
************************************************************************/
#include <windows.h>

#include "resource.h"
#include "common.h"

#ifdef __BORLANDC__
#pragma warn -par
#endif
/************************************************************************
* helpshortcuts                                                         *
* - the shortcuts help dialog box                                       *
* - simply a text summary of the shortcut keys in Borg                  *
************************************************************************/
BOOL CALLBACK helpshortcuts(HWND hdwnd,UINT message,WPARAM wParam,LPARAM lParam)
{ switch(message)
  { case WM_COMMAND:
		{	switch(wParam)
		  { case IDOK:
				EndDialog(hdwnd,NULL);
				return true;
			 default:
				break;
		  }
		}
		break;
	 case WM_INITDIALOG:
      CenterWindow(hdwnd);
		SetFocus(GetDlgItem(hdwnd,IDOK));
		return false;
	 default:
		break;
  }
  return false;
}

/************************************************************************
* habox                                                                 *
* - actually the 'Help -> About' dialog box                             *
************************************************************************/
BOOL CALLBACK habox(HWND hdwnd,UINT message,WPARAM wParam,LPARAM lParam)
{ switch(message)
  { case WM_COMMAND:
		switch(wParam)
		{ case idc_email:
        	 ShellExecute(NULL,"open","mailto:cronos@ntlworld.com",NULL,NULL,SW_SHOWNORMAL);
          return true;
        case idc_website:
        	 ShellExecute(NULL,"open","http://www.cronos.cc/",NULL,NULL,SW_SHOWNORMAL);
          return true;
        case IDC_BUTTON1:
			 EndDialog(hdwnd,NULL);
			 return true;
        default:
          break;
		}
		break;
	 case WM_INITDIALOG:
      CenterWindow(hdwnd);
		SetFocus(GetDlgItem(hdwnd,IDC_BUTTON1));
		return false;
    default:
      break;
  }
  return false;
}

/************************************************************************
* helpbox1                                                              *
* - this is a file_open_options help box which gives a few helping      *
*   hints on the options available.                                     *
************************************************************************/
BOOL CALLBACK helpbox1(HWND hdwnd,UINT message,WPARAM wParam,LPARAM lParam)
{ switch(message)
  { case WM_COMMAND:
		{	switch(wParam)
		  { case IDOK:
				EndDialog(hdwnd,NULL);
				return true;
			 default:
				break;
		  }
		}
		break;
	 case WM_INITDIALOG:
      CenterWindow(hdwnd);
		return false;
	 default:
		break;
  }
  return false;
}
#ifdef __BORLANDC__
#pragma warn +par
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?