Windows NT ( 2)




- 3


return(DefWindowProc(hWnd, msg, wParam, lParam));

}

}

// -----------------------------------------------------

// WndProc_OnDestroy

// -----------------------------------------------------

#pragma warning(disable: 4098)

void WndProc_OnDestroy(HWND hWnd)

{

PostQuitMessage(0);

return 0L;

}

// -----------------------------------------------------

// WndProc_OnCommand

// -----------------------------------------------------

#pragma warning(disable: 4098)

void WndProc_OnCommand(HWND hWnd, int id,

HWND hwndCtl, UINT codeNotify)

{

switch (id)

{

//

case ID_FILE_CONVERT:

{

// ,

//

if(!StartConversion(hWnd))

MessageBox(hWnd,

"Conversion Error\n"

"Unable to open file(s)",

szAppTitle, MB_OK | MB_ICONEXCLAMATION);

break;

}

case ID_FILE_OPTIONS:

{

// ,

//

DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG1),

hWnd, DlgProc);

break;

}

case ID_FILE_EXIT:

{

//

PostQuitMessage(0);

return 0L;

break;

}

case ID_HELP_ABOUT:

{

MessageBox(hWnd,

"Text File Converter\n"

"(C) Alexandr Frolov, 1996\n"

"Email: frolov@glas.apc.org",

szAppTitle, MB_OK | MB_ICONINFORMATION);

return 0L;

break;

}

default:

break;

}

return FORWARD_WM_COMMAND(hWnd, id, hwndCtl, codeNotify,

DefWindowProc);

}

// -----------------------------------------------------

// DlgProc

// -----------------------------------------------------

LRESULT WINAPI

DlgProc(HWND hdlg, UINT msg, WPARAM wParam,