// dlg_sdk.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "resource.h"

BOOL CALLBACK DialogProc(  HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
	switch( uMsg )
	{
	case WM_COMMAND:
		if( LOWORD(wParam) == IDC_HELLO )
		{
			MessageBox( hwndDlg, "Why, hello!", "Greetings", MB_OK );
			return( TRUE );
		}
		else if (LOWORD(wParam) == IDCANCEL )
		{
			EndDialog( hwndDlg, IDCANCEL );
			return( TRUE );
		}
	}
	return( FALSE );
}

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
	DialogBox( hInstance, MAKEINTRESOURCE(IDD_MAINFORM), 0, (DLGPROC)DialogProc );
	return 0;
}



