home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
pmvnc100.zip
/
querycap.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-08-03
|
655b
|
33 lines
/*
* querycap.c - query device capability
*/
#include <stdio.h>
#include <stdlib.h>
#define INCL_PM
#include <os2.h>
#include "pmvncdef.h"
int queryColorIndex(void)
{
HDC hdc ;
LONG num ;
hdc = DevOpenDC(habNetwork, OD_MEMORY, "*", 0, NULL, NULLHANDLE) ;
if (hdc == NULLHANDLE) {
TRACE("queryColorIndex - NULL hdc\n") ;
return 0 ;
}
if (DevQueryCaps(hdc, CAPS_COLOR_INDEX, 1, &num) != TRUE) {
TRACE("queryColorIndex - failed\n") ;
return 0 ;
}
num += 1 ;
TRACE("queryColorIndex - %d\n", num) ;
DevCloseDC(hdc) ;
return (int) num ;
}