Solved

Check if chosed printer do color

Posted on 1998-08-06
3
253 Views
Last Modified: 2013-11-19
Hi folks,

I would like to check if the chosed printer in the print dialog box is set on
color or not. It the printer dont support color, it is not. It it supports color,
it can be set to grayscale or color. I have tried with DEVMODE / dmColor,
but I think I am doing wrong. Please tell me what parameter I should check.

Thanks in advance, Tomas
0
Comment
Question by:tko092397
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
Arkadiy earned 100 total points
ID: 1320304
GetDeviceCaps(dc, NUMCOLORS) > 2 || GetDeviceCaps(dc, NUMCOLORS worked for me when I needed to distinguish btw real color and monochrome prnters. I am not sure how to detect grayscaling, try
GetDeviceCaps(dc, BITSPIXEL) == 1
or
GetDeviceCaps(dc, PLANES) == 1
when you look for monochrome printer that does not support grayscale

0
 

Author Comment

by:tko092397
ID: 1320305
Thanx. Exellent.
0
 
LVL 1

Expert Comment

by:Arkadiy
ID: 1320306
The condition in the answer should look as follows:

GetDeviceCaps(dc, NUMCOLORS) > 2 || GetDeviceCaps(dc, NUMCOLORS) < 0
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sumNumber challenge 16 124
string initialization in java 11 114
Problem to event 3 98
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 96
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question