1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 11:02:48 -05:00

Add context help to a couple of message boxes. Unfortunately the ones

I wanted to get to -- "software caused connection abort" and friends --
are going to be more involved (probably requiring some cross-platform
notion of help contexts), and these ones hardly seem worth the effort.
Still, I've done it now.

Side-effect: Pageant now uses the same `hinst' and `hwnd' globals as
everything else. Tested basic functionality.

[originally from svn r5417]
This commit is contained in:
Jacob Nevins
2005-03-01 01:16:57 +00:00
parent f538bd6d4c
commit a2b583f137
7 changed files with 55 additions and 40 deletions

View File

@ -104,6 +104,8 @@ static VOID CALLBACK message_box_help_callback(LPHELPINFO lpHelpInfo)
} while (0)
CHECK_CTX(errors_hostkey_absent);
CHECK_CTX(errors_hostkey_changed);
CHECK_CTX(errors_cantloadkey);
CHECK_CTX(option_cleanup);
#undef CHECK_CTX
if (context) {
/* We avoid using malloc, in case we're in a situation where
@ -125,8 +127,7 @@ int message_box(LPCTSTR text, LPCTSTR caption, DWORD style, DWORD helpctxid)
* callback function for the Help button.
*/
mbox.cbSize = sizeof(mbox);
/* FIXME: assumes global hwnd and hinst are always the Right Thing;
* are they? */
/* Assumes the globals `hinst' and `hwnd' have sensible values. */
mbox.hInstance = hinst;
mbox.hwndOwner = hwnd;
mbox.lpfnMsgBoxCallback = &message_box_help_callback;