/* * CharPickLButtonDown: Mouse button pressed on dialog; see if inside an ad * control and bring up browser on URL if so. */ void CharPickLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) { int i; RECT rect; POINT p; p.x = x; p.y = y; ClientToScreen(hwnd, &p); for (i=0; i < info->num_ads; i++) { GetWindowRect(GetDlgItem(hPickCharDialog, animation_controls[i]), &rect); if (PtInRect(&rect, p)) { WebLaunchBrowser(info->ads[i].url); // Tell server that user selected ad SendAdSelected(i + 1); return; } } }
/* * DownloadFiles: Bring up download dialog. */ void DownloadFiles(DownloadInfo *params) { int retval, dialog, i; info = params; info->current_file = 0; MainSetState(STATE_DOWNLOAD); debug(("machine = %s\n", info->machine)); debug(("path = %s\n", info->path)); for (i = 0; i < info->num_files; i++) debug(("file = %s, time = %d, flags = %d\n", info->files[i].filename, info->files[i].time, info->files[i].flags)); // If downloading only advertisements, show a different dialog to avoid the appearance // of a "real" download. dialog = IDD_DOWNLOADAD; for (i = 0; i < info->num_files; i++) if (DownloadLocation(info->files[i].flags) != DF_ADVERTISEMENT) { dialog = IDD_DOWNLOAD; break; } advert = (IDD_DOWNLOADAD == dialog); if (!advert && !config.avoidDownloadAskDialog) { retval = DialogBox(hInst, MAKEINTRESOURCE(IDD_ASKDOWNLOAD), NULL, AskDownloadDialogProc); switch (retval) { case 3: // do the demo button WebLaunchBrowser(info->demoPath); SendMessage(hMain,WM_SYSCOMMAND,SC_CLOSE,0); return; case IDOK: // proceed with download retval = DialogBox(hInst, MAKEINTRESOURCE(dialog), NULL, DownloadDialogProc); advert = FALSE; if (retval == IDOK) { MainSetState(STATE_LOGIN); i = (((MAJOR_REV * 100) + MINOR_REV) * P_CATCH) + P_CATCH; RequestGame(config.download_time,i,config.comm.hostname); return; } break; case IDCANCEL: // cancel default: break; } } abort_download = True; config.quickstart = FALSE; //MainSetState(STATE_OFFLINE); Logoff(); ShowWindow(hMain, SW_SHOW); UpdateWindow(hMain); #if 0 // If we were hung up, just leave if (state != STATE_DOWNLOAD) return; MainSetState(STATE_LOGIN); switch (retval) { case IDOK: RequestGame(config.download_time); break; case IDCANCEL: Logoff(); break; } #endif }
/* * DescDialogProc: Dialog procedure for dialog containing an * item's long description. */ BOOL CALLBACK DescDialogProc(HWND hDlg, UINT message, UINT wParam, LONG lParam) { DescDialogStruct *info; static HWND hwndBitmap; static Bool changed; // True when player has changed description HWND hEdit, hwndOK, hURL, hFixed; HDC hdc; HFONT hFont; RECT dlg_rect, edit_rect, fixed_rect; AREA area; char *desc, *str, url[MAX_URL + 1], *pPageBreak; DRAWITEMSTRUCT *lpdis; char descriptionBuffer[MAX_PAGE_DESCRIPTION_TEXT+1]; int height; info = (DescDialogStruct *) GetWindowLong(hDlg, DWL_USER); switch (message) { case WM_INITDIALOG: info = (DescDialogStruct *) lParam; /* Store structure in dialog box's extra bytes */ SetWindowLong(hDlg, DWL_USER, (long) info); hwndBitmap = GetDlgItem(hDlg, IDC_DESCBITMAP); hFixed = GetDlgItem(hDlg, IDC_DESCFIXED); hEdit = GetDlgItem(hDlg, IDC_DESCBOX); hwndOK = GetDlgItem(hDlg, IDOK); // Item Name. height = SetFontToFitText(info,GetDlgItem(hDlg, IDC_DESCNAME), (int)FONT_TITLES, info->name); SetDlgItemText(hDlg, IDC_DESCNAME, info->name); hdc = GetDC(hDlg); SetTextColor(hdc,GetPlayerNameColor(info->obj,info->name)); ReleaseDC(hDlg,hdc); // Item Description. hFont = GetFont(FONT_EDIT); SetWindowFont(hFixed, hFont, FALSE); SetWindowFont(hEdit, hFont, FALSE); str = info->description; if (str) { pPageBreak = strchr(str,PAGE_BREAK_CHAR); while (pPageBreak) { info->numPages++; str = pPageBreak+1; pPageBreak = strchr(str,PAGE_BREAK_CHAR); } info->numPages++; GetPageText(descriptionBuffer,info); Edit_SetText(hEdit, descriptionBuffer); } // Show fixed string, if appropriate if (info->fixed_string != NULL) { SetDlgItemText(hDlg, IDC_DESCFIXED, info->fixed_string); SetWindowFont(GetDlgItem(hDlg, IDC_DESCFIXED), GetFont(FONT_EDIT), FALSE); } // Can this player edit this object's description? if (info->flags & DF_EDITABLE) Edit_SetReadOnly(hEdit, FALSE); Edit_LimitText(hEdit, MAX_DESCRIPTION); if (!(info->flags & (DF_EDITABLE | DF_INSCRIBED)) && !str) { GetWindowRect(hFixed, &fixed_rect); GetWindowRect(hEdit, &edit_rect); UnionRect(&fixed_rect, &fixed_rect, &edit_rect); ScreenToClient(hDlg, (LPPOINT)(&fixed_rect)); ScreenToClient(hDlg, (LPPOINT)(&fixed_rect)+1); MoveWindow(hFixed, fixed_rect.left, fixed_rect.top, fixed_rect.right - fixed_rect.left, fixed_rect.bottom - fixed_rect.top, FALSE); ShowWindow(hEdit, SW_HIDE); } // Resize and move dialog controls GetWindowRect(hDlg, &dlg_rect); if (GetWindowLong(hEdit, GWL_STYLE) & WS_VISIBLE) { ShowWindow(hEdit, SW_HIDE); ResizeEditToFitText(hFixed, hFont); ResizeDialog(hDlg, &dlg_rect, desc_controls); ShowWindow(hEdit, SW_SHOW); } else { ResizeEditToFitText(hFixed, hFont); ResizeDialog(hDlg, &dlg_rect, desc_controls); } if (GetWindowLong(hEdit, GWL_STYLE) & WS_VISIBLE) { GetWindowRect(hFixed, &fixed_rect); GetWindowRect(hEdit, &edit_rect); height = fixed_rect.bottom-edit_rect.top; ScreenToClient(hDlg, (LPPOINT)(&edit_rect)); ScreenToClient(hDlg, (LPPOINT)(&edit_rect)+1); ShowWindow(hFixed, SW_HIDE); OffsetRect(&edit_rect, 0, height); MoveWindow(hEdit, edit_rect.left, edit_rect.top, edit_rect.right - edit_rect.left, edit_rect.bottom - edit_rect.top, FALSE); GetWindowRect(hDlg, &dlg_rect); ResizeEditToFitText(hEdit, hFont); ResizeDialog(hDlg, &dlg_rect, desc_controls); ShowWindow(hFixed, SW_SHOW); } CenterWindow(hDlg, GetParent(hDlg)); // Show URL, if appropriate if (info->url != NULL) { hURL = GetDlgItem(hDlg, IDC_URL); SetWindowText(hURL, info->url); SetWindowFont(hURL, GetFont(FONT_EDIT), FALSE); if (info->flags & DF_EDITABLE) Edit_SetReadOnly(hURL, FALSE); Edit_LimitText(hURL, MAX_URL); } // Show appropriate buttons if (!(desc_flags & DESC_GET)) DestroyWindow(GetDlgItem(hDlg, IDC_GET)); if (!(desc_flags & DESC_DROP)) DestroyWindow(GetDlgItem(hDlg, IDC_DROP)); if (!(desc_flags & DESC_USE)) DestroyWindow(GetDlgItem(hDlg, IDC_USE)); if (!(desc_flags & DESC_UNUSE)) DestroyWindow(GetDlgItem(hDlg, IDC_UNUSE)); if (!(desc_flags & DESC_INSIDE)) DestroyWindow(GetDlgItem(hDlg, IDC_INSIDE)); if (!(desc_flags & DESC_ACTIVATE)) DestroyWindow(GetDlgItem(hDlg, IDC_ACTIVATE)); if (!(desc_flags & DESC_APPLY)) DestroyWindow(GetDlgItem(hDlg, IDC_APPLY)); SetLookPageButtons(hDlg, info); #if 0 if (info->numPages < 2) { HWND hwnd = GetDlgItem(hDlg,IDC_NEXT); if (hwnd) DestroyWindow(GetDlgItem(hDlg, IDC_NEXT)); hwnd = GetDlgItem(hDlg,IDC_PREV); if (hwnd) DestroyWindow(GetDlgItem(hDlg, IDC_PREV)); } else { HWND hwnd = GetDlgItem(hDlg,IDC_PREV); if (hwnd) EnableWindow(hwnd,FALSE); } #endif SetFocus(hwndOK); hDescDialog = hDlg; changed = False; return FALSE; case WM_PAINT: InvalidateRect(hwndBitmap, NULL, TRUE); UpdateWindow(hwndBitmap); /* fall through */ case BK_ANIMATE: /* Draw object's bitmap */ hdc = GetDC(hwndBitmap); GetClientRect(hwndBitmap, &dlg_rect); RectToArea(&dlg_rect, &area); DrawStretchedObjectGroup(hdc, info->obj, info->obj->animate->group, &area, GetSysColorBrush(COLOR_3DFACE)); ReleaseDC(hwndBitmap, hdc); break; HANDLE_MSG(hDlg, WM_CTLCOLOREDIT, DialogCtlColor); HANDLE_MSG(hDlg, WM_CTLCOLORLISTBOX, DialogCtlColor); HANDLE_MSG(hDlg, WM_CTLCOLORSTATIC, DialogCtlColor); HANDLE_MSG(hDlg, WM_CTLCOLORDLG, DialogCtlColor); case WM_DESTROY: hDescDialog = NULL; return TRUE; case WM_DRAWITEM: // Draw player name in color that reflects murderer status lpdis = (DRAWITEMSTRUCT *) lParam; switch (lpdis->itemAction) { case ODA_SELECT: case ODA_DRAWENTIRE: SelectPalette(lpdis->hDC, hPal, FALSE); hFont = info->hFontTitle; SelectObject(lpdis->hDC, hFont); SetBkMode(lpdis->hDC, TRANSPARENT); str = LookupNameRsc(info->obj->name_res); SetTextColor(lpdis->hDC, NAME_COLOR_NORMAL_BG); DrawText(lpdis->hDC, str, strlen(str), &lpdis->rcItem, DT_LEFT | DT_VCENTER | DT_NOPREFIX); OffsetRect(&lpdis->rcItem, -1, -1); SetTextColor(lpdis->hDC, GetPlayerNameColor(info->obj, info->name)); DrawText(lpdis->hDC, str, strlen(str), &lpdis->rcItem, DT_LEFT | DT_VCENTER | DT_NOPREFIX); break; } return TRUE; case WM_COMMAND: switch(GET_WM_COMMAND_ID(wParam, lParam)) { case IDC_PREV: if (info->currentPage > 0) info->currentPage--; GetPageText(descriptionBuffer,info); SetLookPageButtons(hDlg, info); Edit_SetText(GetDlgItem(hDlg, IDC_DESCBOX), descriptionBuffer); #if 0 EnableWindow(GetDlgItem(hDlg,IDC_PREV),info->currentPage > 0); EnableWindow(GetDlgItem(hDlg,IDC_NEXT),info->currentPage < info->numPages-1); #endif return TRUE; case IDC_NEXT: if (info->currentPage < info->numPages-1) info->currentPage++; GetPageText(descriptionBuffer,info); Edit_SetText(GetDlgItem(hDlg, IDC_DESCBOX), descriptionBuffer); SetLookPageButtons(hDlg, info); #if 0 EnableWindow(GetDlgItem(hDlg,IDC_PREV),info->currentPage > 0); EnableWindow(GetDlgItem(hDlg,IDC_NEXT),info->currentPage < info->numPages-1); #endif return TRUE; case IDC_GET: RequestPickup(info->obj->id); EndDialog(hDlg, 0); return TRUE; case IDC_DROP: // Drop all of number items info->obj->temp_amount = info->obj->amount; RequestDrop(info->obj); EndDialog(hDlg, 0); return TRUE; case IDC_USE: // If player isn't holding the object (i.e. there's a Get button), pick object up first if (IsWindowVisible(GetDlgItem(hDlg, IDC_GET))) RequestPickup(info->obj->id); RequestUse(info->obj->id); EndDialog(hDlg, 0); return TRUE; case IDC_UNUSE: RequestUnuse(info->obj->id); EndDialog(hDlg, 0); return TRUE; case IDC_INSIDE: RequestObjectContents(info->obj->id); EndDialog(hDlg, 0); return TRUE; case IDC_ACTIVATE: RequestActivate(info->obj->id); EndDialog(hDlg, 0); return TRUE; case IDC_APPLY: StartApply(info->obj->id); EndDialog(hDlg, 0); return TRUE; case IDC_DESCBOX: if (GET_WM_COMMAND_CMD(wParam, lParam) != EN_CHANGE) break; changed = True; return TRUE; case IDC_URLBUTTON: hURL = GetDlgItem(hDlg, IDC_URL); Edit_GetText(hURL, url, MAX_URL); WebLaunchBrowser(url); return TRUE; case IDOK: // Send new description if changed if (changed) { desc = (char *) SafeMalloc(MAX_DESCRIPTION + 1); GetDlgItemText(hDlg, IDC_DESCBOX, desc, MAX_DESCRIPTION); RequestChangeDescription(info->obj->id, desc); SafeFree(desc); } // Send new URL if changed if (info->url != NULL) { GetDlgItemText(hDlg, IDC_URL, url, MAX_URL); if (strcmp(url, info->url)) RequestChangeURL(player.id, url); } // FALLTHRU case IDCANCEL: SetWindowFont(GetDlgItem(hDlg,IDC_DESCNAME), GetFont(FONT_TITLES), FALSE); if (info->hFontTitle && info->hFontTitle != GetFont(FONT_TITLES)) DeleteObject(info->hFontTitle); info->hFontTitle = NULL; EndDialog(hDlg, IDOK == GET_WM_COMMAND_ID(wParam, lParam)); return TRUE; } break; } return FALSE; }
/* * LoginDialogProc: Get login information. */ BOOL CALLBACK LoginDialogProc(HWND hDlg, UINT message, UINT wParam, LONG lParam) { static HWND hUser, hPasswd, hServer; /* Edit boxes in dialog */ static HWND hGroupBox, hTryPreviewButton; int value; BOOL success; switch (message) { case WM_INITDIALOG: CenterWindow(hDlg, GetParent(hDlg)); hUser = GetDlgItem(hDlg, IDC_USERNAME); hPasswd = GetDlgItem(hDlg, IDC_PASSWORD); hServer = GetDlgItem(hDlg, IDC_SERVERNUM); hGroupBox = GetDlgItem(hDlg, IDC_NEW_TO_MERIDIAN_59); Edit_LimitText(hUser, MAXUSERNAME); Edit_LimitText(hPasswd, MAXPASSWORD); Edit_LimitText(hServer, MAXSERVERNUM); SetWindowFont(hUser, GetFont(FONT_INPUT), FALSE); SetWindowFont(hPasswd, GetFont(FONT_INPUT), FALSE); SetWindowFont(hServer, GetFont(FONT_INPUT), FALSE); // Set server number, if it's valid if (config.comm.server_num != -1) { SetDlgItemInt(hDlg, IDC_SERVERNUM, config.comm.server_num, FALSE); // If already logged in, can't change server number if (connection != CON_NONE) EnableWindow(hServer, FALSE); } /* If we have a default name, go to password edit box */ Edit_SetText(hUser, config.username); Edit_SetSel(hUser, 0, -1); if (config.guest) { RECT rc; int bottom; Edit_SetText(hUser, "GUEST"); Edit_SetText(hPasswd, "GUEST"); EnableWindow(hUser, FALSE); EnableWindow(hPasswd, FALSE); EnableWindow(hServer, FALSE); EnableWindow(GetDlgItem(hDlg,IDC_OK), FALSE); GetWindowRect(hGroupBox, &rc); bottom = rc.bottom + 5; GetWindowRect(hDlg, &rc); MoveWindow(hDlg, rc.left, rc.top, rc.right - rc.left, bottom - rc.top, TRUE); } else if (strlen(config.username) > 0) { Edit_SetText(hPasswd, config.password); Edit_SetSel(hPasswd, 0, -1); SetFocus(hPasswd); return 0; /* We have already set focus */ } return 1; /* Set focus to default window */ case BK_DIALOGDONE: EndDialog(hDlg, IDOK); return TRUE; case WM_COMMAND: switch(GET_WM_COMMAND_ID(wParam, lParam)) { case IDC_GUEST: strcpy(config.username, "GUEST"); strcpy(config.password, "GUEST"); ConfigSetServerNameByNumber(config.server_guest); ConfigSetSocketPortByNumber(config.server_guest); config.comm.server_num = config.server_guest; EndDialog(hDlg, IDOK); return TRUE; case IDC_HOMEPAGE: { char url[256]; LoadString(hInst,IDS_HOMEPAGEURL,url,sizeof(url)); if (*url) { WebLaunchBrowser(url); EndDialog(hDlg, IDCANCEL); PostMessage(hMain,WM_SYSCOMMAND,SC_CLOSE,0); } } return TRUE; case IDOK: /* User has pressed return on one of the edit boxes */ if (GetFocus() == hUser) { SetFocus(hPasswd); return True; } if (GetFocus() == hPasswd) { // Go to server edit box if it's empty value = GetDlgItemInt(hDlg, IDC_SERVERNUM, &success, FALSE); if (success) PostMessage(hDlg, WM_COMMAND, IDC_OK, 0); else SetFocus(hServer); return True; } if (GetFocus() == hServer) PostMessage(hDlg, WM_COMMAND, IDC_OK, 0); return TRUE; case IDC_OK: /* Get username & password */ Edit_GetText(hUser, config.username, MAXUSERNAME + 1); Edit_GetText(hPasswd, config.password, MAXPASSWORD + 1); value = GetDlgItemInt(hDlg, IDC_SERVERNUM, &success, FALSE); if (!success) { // If logging in as "guest", no server number required if (!stricmp(config.username, GetString(hInst, IDS_GUEST))) value = config.server_guest; else { ClientError(hInst, hDlg, IDS_NOSERVERNUM); return TRUE; } } // If value changed, set server name and socketport if (value != config.comm.server_num) { ConfigSetServerNameByNumber(value); ConfigSetSocketPortByNumber(value); config.comm.server_num = value; } /* Kill off dialog */ EndDialog(hDlg, IDOK); return TRUE; case IDC_HANGUP: case IDCANCEL: EndDialog(hDlg, IDCANCEL); return TRUE; } break; } return FALSE; }
void StartHelp(void) { WebLaunchBrowser(GetString(hInst, IDS_HELPFILE)); }
/* * MenuCommand: A menu item has been selected. */ void MenuCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) { // Set last action time to now, to prevent keypress from being interpreted as a game action. KeySetLastNorepeatTime(); // See if module wants to handle menu selection if (ModuleEvent(EVENT_MENUITEM, id) == False) return; /* Handle menu selections */ switch (id) { case ID_GAME_EXIT: if (connection != CON_NONE && !AreYouSure(hInst, hMain, NO_BUTTON, IDS_LOGOFF)) break; MainQuit(hwnd); break; case ID_GAME_PRINTMAP: if (state == STATE_GAME) PrintMap(FALSE); break; case ID_GAME_CONNECT: OfflineConnect(); break; case ID_GAME_DISCONNECT: if (!AreYouSure(hInst, hMain, NO_BUTTON, IDS_LOGOFF)) break; Logoff(); MainSetState(STATE_OFFLINE); break; case ID_GAME_SETTINGS: if (DialogBox(hInst, MAKEINTRESOURCE(IDD_SETTINGS), hMain, PreferencesDialogProc) == IDOK) { ModuleEvent(EVENT_CONFIGCHANGED); MenuDisplaySettings(hMain); } break; case ID_CONFIGMENU: ConfigMenuLaunch(); break; case ID_GAME_PASSWORD: PerformAction(A_CHANGEPASSWORD, NULL); break; case ID_OPTIONS_TIMEOUT: UserSetTimeout(); break; case ID_OPTIONS_MUSIC: config.play_music = !config.play_music; CheckMenuItem(menu, ID_OPTIONS_MUSIC, config.play_music ? MF_CHECKED : MF_UNCHECKED); UserToggleMusic(config.play_music); break; case ID_OPTIONS_SOUND: config.play_sound = !config.play_sound; CheckMenuItem(menu, ID_OPTIONS_SOUND, config.play_sound ? MF_CHECKED : MF_UNCHECKED); if (!config.play_sound) SoundStopAll(); break; case ID_OPTIONS_SAVENOW: SaveSettings(); break; case ID_OPTIONS_SAVEEXIT: config.save_settings = !config.save_settings; CheckMenuItem(menu, ID_OPTIONS_SAVEEXIT, config.save_settings ? MF_CHECKED : MF_UNCHECKED); break; case ID_OPTIONS_AREA: // due to issues with certain D3D drivers, this no longer immediately updates the config // it now sets a temporary variable that will update the config on shutdown // this means a shutdown and restart are necessary for window size changes MessageBox(hMain, "You must shutdown and restart Meridian 59 for these changes to take effect", "Direct3D", MB_OK); // config.large_area = !config.large_area; gLargeArea = !gLargeArea; CheckMenuItem(menu, ID_OPTIONS_AREA, gLargeArea ? MF_CHECKED : MF_UNCHECKED); /* if (state == STATE_GAME) // Send ourselves a resize message ResizeAll(); RedrawAll();*/ break; case ID_OPTIONS_FONT_MAP_TITLE: UserSelectFont(FONT_MAP_TITLE); break; case ID_OPTIONS_FONT_MAP_LABEL: UserSelectFont(FONT_MAP_LABEL); break; case ID_OPTIONS_FONT_MAP_TEXT: UserSelectFont(FONT_MAP_TEXT); break; case ID_FONT_GAMETEXT: UserSelectFont(FONT_EDIT); break; case ID_FONT_LIST: UserSelectFont(FONT_LIST); break; case ID_FONT_MAIL: UserSelectFont(FONT_MAIL); break; case ID_FONT_TITLES: UserSelectFont(FONT_TITLES); break; case ID_FONT_STATISTICS: UserSelectFont(FONT_STATS); break; case ID_FONT_INPUT: UserSelectFont(FONT_INPUT); break; case ID_FONT_LABELS: UserSelectFont(FONT_LABELS); break; case ID_FONT_DEFAULTS: FontsRestoreDefaults(); break; case ID_COLOR_MAIN: UserSelectColors(COLOR_FGD, COLOR_BGD); break; case ID_COLOR_LIST: UserSelectColors(COLOR_LISTFGD, COLOR_LISTBGD); break; case ID_COLOR_LISTSEL: UserSelectColors(COLOR_LISTSELFGD, COLOR_LISTSELBGD); break; case ID_COLOR_MAGIC: UserSelectColor(COLOR_ITEM_MAGIC_FG); break; case ID_COLOR_HIGHLIGHT: UserSelectColor(COLOR_HIGHLITE); break; case ID_COLOR_MAIL: UserSelectColors(COLOR_MAILFGD, COLOR_MAILBGD); break; case ID_COLOR_TEXT: UserSelectColors(COLOR_MAINEDITFGD, COLOR_MAINEDITBGD); break; case ID_COLOR_EDIT: UserSelectColors(COLOR_EDITFGD, COLOR_EDITBGD); break; case ID_COLOR_SYSMSG: UserSelectColor(COLOR_SYSMSGFGD); case ID_COLOR_QUESTHEADER: UserSelectColor(COLOR_QUEST_HEADER); break; break; case ID_COLOR_STATS: UserSelectColors(COLOR_STATSFGD, COLOR_STATSBGD); break; case ID_COLOR_BAR1: UserSelectColor(COLOR_BAR1); break; case ID_COLOR_BAR2: UserSelectColor(COLOR_BAR2); break; case ID_COLOR_BAR3: UserSelectColor(COLOR_BAR3); break; case ID_COLOR_BAR4: UserSelectColor(COLOR_BAR4); break; case ID_COLOR_INVNUM: UserSelectColors(COLOR_INVNUMFGD, COLOR_INVNUMBGD); break; case ID_COLOR_DEFAULTS: ColorsRestoreDefaults(); break; case ID_HELP_CONTENTS: StartHelp(); break; case ID_HOMEPAGE: WebLaunchBrowser(GetString(hInst, IDS_HOMEPAGEURL)); break; case ID_FORUM: WebLaunchBrowser(GetString(hInst, IDS_FORUMURL)); break; case ID_WIKI: WebLaunchBrowser(GetString(hInst, IDS_WIKIURL)); break; case ID_HELP_ABOUT: DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUT), hMain, AboutDialogProc); break; } }