case IDCANCEL:
static int CALLBACK LicenceProc(HWND hwnd, UINT msg,				WPARAM wParam, LPARAM lParam){    switch (msg) {      case WM_INITDIALOG:	/*	 * Centre the window.	 */	{			       /* centre the window */	    RECT rs, rd;	    HWND hw;	    hw = GetDesktopWindow();	    if (GetWindowRect(hw, &rs) && GetWindowRect(hwnd, &rd))		MoveWindow(hwnd,			   (rs.right + rs.left + rd.left - rd.right) / 2,			   (rs.bottom + rs.top + rd.top - rd.bottom) / 2,			   rd.right - rd.left, rd.bottom - rd.top, TRUE);	}	return 1;      case WM_COMMAND:	switch (LOWORD(wParam)) {	  case IDOK:	    EndDialog(hwnd, 1);	    return 0;	}	return 0;      case WM_CLOSE:	EndDialog(hwnd, 1);	return 0;    }    return 0;}