Source file: /~heha/hsn/borg.zip/HELP.CPP

/************************************************************************
* help.cpp								*
* - functions for help dialogs						*
************************************************************************/
#include <windows.h>

//#include "menuids.rh"
#include "resource.h"
#include "common.h"

/************************************************************************
* helpshortcuts								*
* - the shortcuts help dialog box					*
* - simply a text summary of the shortcut keys in Borg			*
************************************************************************/
HWND HelpShortcuts=0;

BOOL CALLBACK helpshortcuts(HWND Wnd,UINT Msg,WPARAM wParam,LPARAM) {
 switch (Msg) {
  case WM_ACTIVATE: KBHand=wParam?Wnd:0; break;
  case WM_INITDIALOG: return TRUE;
  case WM_COMMAND: switch(wParam) {
   case IDOK:
   case IDCANCEL: HelpShortcuts=0; EndDialog(Wnd,wParam); break;
  }break;
 }
 return FALSE;
}

/************************************************************************
* habox									*
* - actually the 'Help -> About' dialog box				*
************************************************************************/
BOOL CALLBACK habox(HWND Wnd,UINT Msg,WPARAM wParam,LPARAM lParam) {
 switch (Msg) {
  case WM_INITDIALOG: return true;
  case WM_COMMAND: switch(wParam) {
   case 100:	// email and website
   case 101:
   case 102:
   case 103: {
    TCHAR buf[128];
    GetWindowText((HWND)lParam,buf,charof(buf));
    ShellExecute(NULL,NULL,buf,NULL,NULL,SW_SHOWNORMAL);
   }break;
   case IDOK:
   case IDCANCEL: EndDialog(Wnd,wParam);
  }
 }
 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 Wnd,UINT Msg,WPARAM wParam,LPARAM) {
 switch (Msg) {
  case WM_INITDIALOG: return TRUE;
  case WM_COMMAND: switch(wParam) {
   case IDOK:
   case IDCANCEL: EndDialog(Wnd,wParam); break;;
  }break;
 }
 return FALSE;
}
Detected encoding: ASCII (7 bit)2