4 * Copyright 1996 Ulrich Schmid
17 VOID MACRO_About(VOID)
19 fprintf(stderr, "About()\n");
22 VOID MACRO_AddAccelerator(LONG u1, LONG u2, LPCSTR str)
24 fprintf(stderr, "AddAccelerator(%lu, %lu, \"%s\")\n", u1, u2, str);
27 VOID MACRO_ALink(LPCSTR str1, LONG u, LPCSTR str2)
29 fprintf(stderr, "ALink(\"%s\", %lu, \"%s\")\n", str1, u, str2);
32 VOID MACRO_Annotate(VOID)
34 fprintf(stderr, "Annotate()\n");
37 VOID MACRO_AppendItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4)
39 fprintf(stderr, "AppendItem(\"%s\", \"%s\", \"%s\", \"%s\")\n", str1, str2, str3, str4);
44 fprintf(stderr, "Back()\n");
47 VOID MACRO_BackFlush(VOID)
49 fprintf(stderr, "BackFlush()\n");
52 VOID MACRO_BookmarkDefine(VOID)
54 fprintf(stderr, "BookmarkDefine()\n");
57 VOID MACRO_BookmarkMore(VOID)
59 fprintf(stderr, "BookmarkMore()\n");
62 VOID MACRO_BrowseButtons(VOID)
64 MACRO_CreateButton("BTN_PREV", "&<<", "Prev()");
65 MACRO_CreateButton("BTN_NEXT", "&>>", "Next()");
68 VOID MACRO_ChangeButtonBinding(LPCSTR str1, LPCSTR str2)
70 fprintf(stderr, "ChangeButtonBinding(\"%s\", \"%s\")\n", str1, str2);
73 VOID MACRO_ChangeEnable(LPCSTR str1, LPCSTR str2)
75 fprintf(stderr, "ChangeEnable(\"%s\", \"%s\")\n", str1, str2);
78 VOID MACRO_ChangeItemBinding(LPCSTR str1, LPCSTR str2)
80 fprintf(stderr, "ChangeItemBinding(\"%s\", \"%s\")\n", str1, str2);
83 VOID MACRO_CheckItem(LPCSTR str)
85 fprintf(stderr, "CheckItem(\"%s\")\n", str);
88 VOID MACRO_CloseSecondarys(VOID)
91 for (win = Globals.win_list; win; win = win->next)
92 if (win->lpszName && lstrcmpi(win->lpszName, "main"))
93 DestroyWindow(win->hMainWnd);
96 VOID MACRO_CloseWindow(LPCSTR lpszWindow)
99 if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main";
101 for (win = Globals.win_list; win; win = win->next)
102 if (win->lpszName && !lstrcmpi(win->lpszName, lpszWindow))
103 DestroyWindow(win->hMainWnd);
106 VOID MACRO_Compare(LPCSTR str)
108 fprintf(stderr, "Compare(\"%s\")\n", str);
111 VOID MACRO_Contents(VOID)
113 if (Globals.active_win->page)
114 MACRO_JumpContents(Globals.active_win->page->file->lpszPath, NULL);
117 VOID MACRO_ControlPanel(LPCSTR str1, LPCSTR str2, LONG u)
119 fprintf(stderr, "ControlPanel(\"%s\", \"%s\", %lu)\n", str1, str2, u);
122 VOID MACRO_CopyDialog(VOID)
124 fprintf(stderr, "CopyDialog()\n");
127 VOID MACRO_CopyTopic(VOID)
129 fprintf(stderr, "CopyTopic()\n");
132 VOID MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro)
134 WINHELP_WINDOW *win = Globals.active_win;
135 WINHELP_BUTTON *button, **b;
140 size = sizeof(WINHELP_BUTTON) + lstrlen(id) + lstrlen(name) + lstrlen(macro) + 3;
141 handle = GlobalAlloc(GMEM_FIXED, size);
144 button = GlobalLock(handle);
145 button->hSelf = handle;
149 ptr = GlobalLock(handle);
150 ptr += sizeof(WINHELP_BUTTON);
152 lstrcpy(ptr, (LPSTR) id);
153 button->lpszID = ptr;
154 ptr += lstrlen(id) + 1;
156 lstrcpy(ptr, (LPSTR) name);
157 button->lpszName = ptr;
158 ptr += lstrlen(name) + 1;
160 lstrcpy(ptr, (LPSTR) macro);
161 button->lpszMacro = ptr;
163 button->wParam = WH_FIRST_BUTTON;
164 for (b = &win->first_button; *b; b = &(*b)->next)
165 button->wParam = MAX(button->wParam, (*b)->wParam + 1);
168 SendMessage(win->hMainWnd, WM_USER, 0, 0);
171 VOID MACRO_DeleteItem(LPCSTR str)
173 fprintf(stderr, "DeleteItem(\"%s\")\n", str);
176 VOID MACRO_DeleteMark(LPCSTR str)
178 fprintf(stderr, "DeleteMark(\"%s\")\n", str);
181 VOID MACRO_DestroyButton(LPCSTR str)
183 fprintf(stderr, "DestroyButton(\"%s\")\n", str);
186 VOID MACRO_DisableButton(LPCSTR str)
188 fprintf(stderr, "DisableButton(\"%s\")\n", str);
191 VOID MACRO_DisableItem(LPCSTR str)
193 fprintf(stderr, "DisableItem(\"%s\")\n", str);
196 VOID MACRO_EnableButton(LPCSTR str)
198 fprintf(stderr, "EnableButton(\"%s\")\n", str);
201 VOID MACRO_EnableItem(LPCSTR str)
203 fprintf(stderr, "EnableItem(\"%s\")\n", str);
206 VOID MACRO_EndMPrint(VOID)
208 fprintf(stderr, "EndMPrint()\n");
211 VOID MACRO_ExecFile(LPCSTR str1, LPCSTR str2, LONG u, LPCSTR str3)
213 fprintf(stderr, "ExecFile(\"%s\", \"%s\", %lu, \"%s\")\n", str1, str2, u, str3);
216 VOID MACRO_ExecProgram(LPCSTR str, LONG u)
218 fprintf(stderr, "ExecProgram(\"%s\", %lu)\n", str, u);
221 VOID MACRO_Exit(VOID)
223 while(Globals.win_list)
224 DestroyWindow(Globals.win_list->hMainWnd);
227 VOID MACRO_ExtAbleItem(LPCSTR str, LONG u)
229 fprintf(stderr, "ExtAbleItem(\"%s\", %lu)\n", str, u);
232 VOID MACRO_ExtInsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u1, LONG u2)
234 fprintf(stderr, "ExtInsertItem(\"%s\", \"%s\", \"%s\", \"%s\", %lu, %lu)\n", str1, str2, str3, str4, u1, u2);
237 VOID MACRO_ExtInsertMenu(LPCSTR str1, LPCSTR str2, LPCSTR str3, LONG u1, LONG u2)
239 fprintf(stderr, "ExtInsertMenu(\"%s\", \"%s\", \"%s\", %lu, %lu)\n", str1, str2, str3, u1, u2);
242 BOOL MACRO_FileExist(LPCSTR str)
244 fprintf(stderr, "FileExist(\"%s\")\n", str);
248 VOID MACRO_FileOpen(VOID)
250 OPENFILENAME openfilename;
251 CHAR szPath[MAX_PATHNAME_LEN];
252 CHAR szDir[MAX_PATHNAME_LEN];
253 CHAR szzFilter[2 * MAX_STRING_LEN + 100];
256 LoadString(Globals.hInstance, IDS_HELP_FILES_HLP, p, MAX_STRING_LEN);
260 LoadString(Globals.hInstance, IDS_ALL_FILES, p, MAX_STRING_LEN);
266 GetWindowsDirectory(szDir, sizeof(szDir));
268 openfilename.lStructSize = 0;
269 openfilename.hwndOwner = Globals.active_win->hMainWnd;
270 openfilename.hInstance = Globals.hInstance;
271 openfilename.lpstrFilter = szzFilter;
272 openfilename.lpstrCustomFilter = 0;
273 openfilename.nMaxCustFilter = 0;
274 openfilename.nFilterIndex = 0;
275 openfilename.lpstrFile = szPath;
276 openfilename.nMaxFile = sizeof(szPath);
277 openfilename.lpstrFileTitle = 0;
278 openfilename.nMaxFileTitle = 0;
279 openfilename.lpstrInitialDir = szDir;
280 openfilename.lpstrTitle = 0;
281 openfilename.Flags = 0;
282 openfilename.nFileOffset = 0;
283 openfilename.nFileExtension = 0;
284 openfilename.lpstrDefExt = 0;
285 openfilename.lCustData = 0;
286 openfilename.lpfnHook = 0;
287 openfilename.lpTemplateName = 0;
289 if (GetOpenFileName(&openfilename))
290 WINHELP_CreateHelpWindow(szPath, 0, "main", FALSE, NULL, NULL, SW_SHOWNORMAL);
293 VOID MACRO_Find(VOID)
295 fprintf(stderr, "Find()\n");
298 VOID MACRO_Finder(VOID)
300 fprintf(stderr, "Finder()\n");
303 VOID MACRO_FloatingMenu(VOID)
305 fprintf(stderr, "FloatingMenu()\n");
308 VOID MACRO_Flush(VOID)
310 fprintf(stderr, "Flush()\n");
313 VOID MACRO_FocusWindow(LPCSTR str)
315 fprintf(stderr, "FocusWindow(\"%s\")\n", str);
318 VOID MACRO_Generate(LPCSTR str, WPARAM w, LPARAM l)
320 fprintf(stderr, "Generate(\"%s\", %x, %lx)\n", str, w, l);
323 VOID MACRO_GotoMark(LPCSTR str)
325 fprintf(stderr, "GotoMark(\"%s\")\n", str);
328 VOID MACRO_HelpOn(VOID)
330 MACRO_JumpContents((Globals.wVersion > 4) ? "winhelp32.hlp" : "winhelp.hlp", NULL);
333 VOID MACRO_HelpOnTop(VOID)
335 fprintf(stderr, "HelpOnTop()\n");
338 VOID MACRO_History(VOID)
340 fprintf(stderr, "History()\n");
343 BOOL MACRO_InitMPrint(VOID)
345 fprintf(stderr, "InitMPrint()\n");
349 VOID MACRO_InsertItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPCSTR str4, LONG u)
351 fprintf(stderr, "InsertItem(\"%s\", \"%s\", \"%s\", \"%s\", %lu)\n", str1, str2, str3, str4, u);
354 VOID MACRO_InsertMenu(LPCSTR str1, LPCSTR str2, LONG u)
356 fprintf(stderr, "InsertMenu(\"%s\", \"%s\", %lu)\n", str1, str2, u);
359 BOOL MACRO_IsBook(VOID)
361 fprintf(stderr, "IsBook()\n");
365 BOOL MACRO_IsMark(LPCSTR str)
367 fprintf(stderr, "IsMark(\"%s\")\n", str);
371 BOOL MACRO_IsNotMark(LPCSTR str)
373 fprintf(stderr, "IsNotMark(\"%s\")\n", str);
377 VOID MACRO_JumpContents(LPCSTR lpszPath, LPCSTR lpszWindow)
379 WINHELP_CreateHelpWindow(lpszPath, 0, lpszWindow, FALSE, NULL, NULL, SW_NORMAL);
382 VOID MACRO_JumpContext(LPCSTR lpszPath, LPCSTR lpszWindow, LONG context)
384 fprintf(stderr, "JumpContext(\"%s\", \"%s\", %lu)\n", lpszPath, lpszWindow, context);
387 VOID MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash)
389 WINHELP_CreateHelpWindow(lpszPath, lHash, lpszWindow, FALSE, NULL, NULL, SW_NORMAL);
392 VOID MACRO_JumpHelpOn(VOID)
394 fprintf(stderr, "JumpHelpOn()\n");
397 VOID MACRO_JumpID(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR topic_id)
399 MACRO_JumpHash(lpszPath, lpszWindow, HLPFILE_Hash(topic_id));
402 VOID MACRO_JumpKeyword(LPCSTR lpszPath, LPCSTR lpszWindow, LPCSTR keyword)
404 fprintf(stderr, "JumpKeyword(\"%s\", \"%s\", \"%s\")\n", lpszPath, lpszWindow, keyword);
407 VOID MACRO_KLink(LPCSTR str1, LONG u, LPCSTR str2, LPCSTR str3)
409 fprintf(stderr, "KLink(\"%s\", %lu, \"%s\", \"%s\")\n", str1, u, str2, str3);
412 VOID MACRO_Menu(VOID)
414 fprintf(stderr, "Menu()\n");
417 VOID MACRO_MPrintHash(LONG u)
419 fprintf(stderr, "MPrintHash(%lu)\n", u);
422 VOID MACRO_MPrintID(LPCSTR str)
424 fprintf(stderr, "MPrintID(\"%s\")\n", str);
427 VOID MACRO_Next(VOID)
429 fprintf(stderr, "Next()\n");
432 VOID MACRO_NoShow(VOID)
434 fprintf(stderr, "NoShow()\n");
437 VOID MACRO_PopupContext(LPCSTR str, LONG u)
439 fprintf(stderr, "PopupContext(\"%s\", %lu)\n", str, u);
442 VOID MACRO_PopupHash(LPCSTR str, LONG u)
444 fprintf(stderr, "PopupHash(\"%s\", %lu)\n", str, u);
447 VOID MACRO_PopupId(LPCSTR str1, LPCSTR str2)
449 fprintf(stderr, "PopupId(\"%s\", \"%s\")\n", str1, str2);
452 VOID MACRO_PositionWindow(LONG i1, LONG i2, LONG u1, LONG u2, LONG u3, LPCSTR str)
454 fprintf(stderr, "PositionWindow(%li, %li, %lu, %lu, %lu, \"%s\")\n", i1, i2, u1, u2, u3, str);
457 VOID MACRO_Prev(VOID)
459 fprintf(stderr, "Prev()\n");
462 VOID MACRO_Print(VOID)
466 printer.lStructSize = sizeof(printer);
467 printer.hwndOwner = Globals.active_win->hMainWnd;
468 printer.hInstance = Globals.hInstance;
469 printer.hDevMode = 0;
470 printer.hDevNames = 0;
473 printer.nFromPage = 0;
475 printer.nMinPage = 0;
476 printer.nMaxPage = 0;
478 printer.lCustData = 0;
479 printer.lpfnPrintHook = 0;
480 printer.lpfnSetupHook = 0;
481 printer.lpPrintTemplateName = 0;
482 printer.lpSetupTemplateName = 0;
483 printer.hPrintTemplate = 0;
484 printer.hSetupTemplate = 0;
486 if (PrintDlg16(&printer)) {
487 fprintf(stderr, "Print()\n");
491 VOID MACRO_PrinterSetup(VOID)
493 fprintf(stderr, "PrinterSetup()\n");
496 VOID MACRO_RegisterRoutine(LPCSTR str1, LPCSTR str2, LPCSTR str3)
498 fprintf(stderr, "RegisterRoutine(\"%s\", \"%s\", \"%s\")\n", str1, str2, str3);
501 VOID MACRO_RemoveAccelerator(LONG u1, LONG u2)
503 fprintf(stderr, "RemoveAccelerator(%lu, %lu)\n", u1, u2);
506 VOID MACRO_ResetMenu(VOID)
508 fprintf(stderr, "ResetMenu()\n");
511 VOID MACRO_SaveMark(LPCSTR str)
513 fprintf(stderr, "SaveMark(\"%s\")\n", str);
516 VOID MACRO_Search(VOID)
518 fprintf(stderr, "Search()\n");
521 VOID MACRO_SetContents(LPCSTR str, LONG u)
523 fprintf(stderr, "SetContents(\"%s\", %lu)\n", str, u);
526 VOID MACRO_SetHelpOnFile(LPCSTR str)
528 fprintf(stderr, "SetHelpOnFile(\"%s\")\n", str);
531 VOID MACRO_SetPopupColor(LONG u1, LONG u2, LONG u3)
533 fprintf(stderr, "SetPopupColor(%lu, %lu, %lu)\n", u1, u2, u3);
536 VOID MACRO_ShellExecute(LPCSTR str1, LPCSTR str2, LONG u1, LONG u2, LPCSTR str3, LPCSTR str4)
538 fprintf(stderr, "ShellExecute(\"%s\", \"%s\", %lu, %lu, \"%s\", \"%s\")\n", str1, str2, u1, u2, str3, str4);
541 VOID MACRO_ShortCut(LPCSTR str1, LPCSTR str2, WPARAM w, LPARAM l, LPCSTR str)
543 fprintf(stderr, "ShortCut(\"%s\", \"%s\", %x, %lx, \"%s\")\n", str1, str2, w, l, str);
546 VOID MACRO_TCard(LONG u)
548 fprintf(stderr, "TCard(%lu)\n", u);
551 VOID MACRO_Test(LONG u)
553 fprintf(stderr, "Test(%lu)\n", u);
556 BOOL MACRO_TestALink(LPCSTR str)
558 fprintf(stderr, "TestALink(\"%s\")\n", str);
562 BOOL MACRO_TestKLink(LPCSTR str)
564 fprintf(stderr, "TestKLink(\"%s\")\n", str);
568 VOID MACRO_UncheckItem(LPCSTR str)
570 fprintf(stderr, "UncheckItem(\"%s\")\n", str);
573 VOID MACRO_UpdateWindow(LPCSTR str1, LPCSTR str2)
575 fprintf(stderr, "UpdateWindow(\"%s\", \"%s\")\n", str1, str2);
578 /* Local Variables: */
579 /* c-file-style: "GNU" */