Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

mmcl.c

Go to the documentation of this file.
00001 /****************************** Module Header ******************************\ 00002 * Module Name: mmcl.c 00003 * 00004 * Copyright (c) 1985 - 1999, Microsoft Corporation 00005 * 00006 * Multimonitor APIs in the client. 00007 * 00008 * History: 00009 * 29-Mar-1997 adams Created. 00010 \***************************************************************************/ 00011 00012 #include "precomp.h" 00013 #pragma hdrstop 00014 00015 HMONITOR 00016 MonitorFromPoint( 00017 IN POINT pt, 00018 IN DWORD dwFlags) 00019 { 00020 PMONITOR pMonitor; 00021 00022 if (dwFlags > MONITOR_DEFAULTTONEAREST) { 00023 RIPERR1(ERROR_INVALID_FLAGS, 00024 RIP_WARNING, 00025 "Invalid flags to MonitorFromPoint, %x", dwFlags); 00026 00027 return NULL; 00028 } 00029 00030 pMonitor = _MonitorFromPoint(pt, dwFlags); 00031 00032 try { 00033 return PtoH(pMonitor); 00034 } except(W32ExceptionHandler(TRUE, RIP_WARNING)) { 00035 return NULL; 00036 } 00037 } 00038 00039 00040 00041 HMONITOR 00042 MonitorFromRect( 00043 IN LPCRECT lprc, 00044 IN DWORD dwFlags) 00045 { 00046 PMONITOR pMonitor; 00047 00048 if (dwFlags > MONITOR_DEFAULTTONEAREST) { 00049 RIPERR1(ERROR_INVALID_FLAGS, 00050 RIP_WARNING, 00051 "Invalid flags to MonitorFromRect, %x", dwFlags); 00052 00053 return NULL; 00054 } 00055 00056 pMonitor = _MonitorFromRect(lprc, dwFlags); 00057 00058 try { 00059 return PtoH(pMonitor); 00060 } except(W32ExceptionHandler(TRUE, RIP_WARNING)) { 00061 return NULL; 00062 } 00063 } 00064 00065 00066 00067 HMONITOR 00068 MonitorFromWindow( 00069 IN HWND hwnd, 00070 IN DWORD dwFlags) 00071 { 00072 PMONITOR pMonitor; 00073 PWND pwnd; 00074 00075 if (dwFlags > MONITOR_DEFAULTTONEAREST) { 00076 RIPERR1(ERROR_INVALID_FLAGS, 00077 RIP_WARNING, 00078 "Invalid flags to MonitorFromWindow, %x", dwFlags); 00079 00080 return NULL; 00081 } 00082 00083 if (hwnd) { 00084 pwnd = ValidateHwnd(hwnd); 00085 if (!pwnd) { 00086 return NULL; 00087 } 00088 } else { 00089 pwnd = NULL; 00090 } 00091 00092 pMonitor = _MonitorFromWindow(pwnd, dwFlags); 00093 00094 try { 00095 return PtoH(pMonitor); 00096 } except(W32ExceptionHandler(TRUE, RIP_WARNING)) { 00097 return NULL; 00098 } 00099 } 00100

Generated on Sat May 15 19:40:50 2004 for test by doxygen 1.3.7