sourcemod/tools/installer/Welcome.cpp
David Anderson 61673e10f6 file copying now works, dialogs re-display at their last location, fixed up a bunch of interface mistakes, etc
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401728
2007-11-25 04:46:18 +00:00

52 lines
925 B
C++

#include "InstallerMain.h"
#include "Welcome.h"
#include "ChooseMethod.h"
INT_PTR CALLBACK WelcomeHandler(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
{
SetToGlobalPosition(hDlg);
return (INT_PTR)TRUE;
}
case WM_COMMAND:
{
if (LOWORD(wParam) == ID_WELCOME_EXIT
|| LOWORD(wParam) == ID_CLOSE)
{
UpdateGlobalPosition(hDlg);
EndDialog(hDlg, NULL);
return (INT_PTR)TRUE;
}
else if (LOWORD(wParam) == ID_WELCOME_NEXT)
{
UpdateGlobalPosition(hDlg);
EndDialog(hDlg, (INT_PTR)DisplayChooseMethod);
return (INT_PTR)TRUE;
}
break;
}
}
return (INT_PTR)FALSE;
}
void *DisplayWelcome(HWND hWnd)
{
INT_PTR val;
if ((val = DialogBox(
g_hInstance,
MAKEINTRESOURCE(IDD_WELCOME),
hWnd,
WelcomeHandler)) == -1)
{
return NULL;
}
return (void *)val;
}