TryToGetDC.c File Reference

#include <Windows.h>

Include dependency graph for TryToGetDC.c:

Go to the source code of this file.

Defines

#define MSG_ERROR20   "ERROR"
#define MSG_ERROR36   "Error : GetDC fails"
#define MSG_ERROR37   "Error : GetDC Input don't handle NULL"

Functions

HDC TryToGetDC (HWND hWnd)


Define Documentation

#define MSG_ERROR20   "ERROR"

Definition at line 7 of file TryToGetDC.c.

#define MSG_ERROR36   "Error : GetDC fails"

Definition at line 8 of file TryToGetDC.c.

#define MSG_ERROR37   "Error : GetDC Input don't handle NULL"

Definition at line 9 of file TryToGetDC.c.


Function Documentation

HDC TryToGetDC ( HWND  hWnd  ) 

Definition at line 11 of file TryToGetDC.c.

References MSG_ERROR20, MSG_ERROR36, MSG_ERROR37, and NULL.

00012 {
00013         HDC hDCRet=NULL;
00014 
00015         if (hWnd)
00016         {
00017                 hDCRet=GetDC(hWnd);
00018                 if (hDCRet == NULL)
00019                 {
00020 #ifdef _DEBUG
00021                         MessageBox(NULL,MSG_ERROR36,MSG_ERROR20,MB_ICONWARNING);
00022 #endif
00023                 }
00024         }
00025         else
00026         {
00027 #ifdef _DEBUG
00028                 MessageBox(NULL,MSG_ERROR37,MSG_ERROR20,MB_ICONWARNING);
00029 #endif
00030         }
00031 
00032         return (HDC)hDCRet;
00033 }


Generated on Sun Mar 4 16:14:16 2007 for Scilab [trunk] by  doxygen 1.5.1