Click here to Skip to main content
15,915,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Playing Audio in VC++ Pin
Deepu Antony21-Jan-09 1:43
Deepu Antony21-Jan-09 1:43 
AnswerRe: Playing Audio in VC++ Pin
Nishad S21-Jan-09 2:43
Nishad S21-Jan-09 2:43 
GeneralRe: Playing Audio in VC++ Pin
Deepu Antony21-Jan-09 2:49
Deepu Antony21-Jan-09 2:49 
GeneralRe: Playing Audio in VC++ Pin
Deepu Antony21-Jan-09 3:00
Deepu Antony21-Jan-09 3:00 
GeneralRe: Playing Audio in VC++ Pin
Nishad S21-Jan-09 3:20
Nishad S21-Jan-09 3:20 
GeneralRe: Playing Audio in VC++ Pin
Nishad S21-Jan-09 3:17
Nishad S21-Jan-09 3:17 
AnswerRe: Playing Audio in VC++ Pin
Hamid_RT21-Jan-09 4:44
Hamid_RT21-Jan-09 4:44 
QuestionHow calculate RECT from emf spool file of printer? Pin
GAJERA20-Jan-09 22:34
GAJERA20-Jan-09 22:34 
I am working on a project intended to control the print flow on the network. User will not be allowed to print on the printer directly. In any case EMF spool file will be generated and parsed and then forwarded to the actual printer(any PS/PCL) printer.

For forwarding the print job , I am just taking the destination printer device context and playing the spool file on the destination printer using PlayEnhMetaFile function, so it is printing on paper. Every thing works fine up to this level.

But I am getting some problem. The output from print job forwarding and the direct printing to the printer is somewhat differ.
I want to get same out put from print job forwarding as I am getting direct printing.

For that reason I am counting RECT to play enhanced meta file on the destination printer using following formula.

float PixelsX, PixelsY, MMX, MMY;
RECT rect;

PixelsX = (float)GetDeviceCaps( dc ,HORZRES );
PixelsY = (float)GetDeviceCaps( dc, VERTRES );
MMX = (float)GetDeviceCaps( dc, HORZSIZE );
MMY = (float)GetDeviceCaps( dc, VERTSIZE );

rect.top = (int)((float)(pEMRHeader->rclFrame.top) * PixelsY / (MMY*100.0f));
rect.left = (int)((float)(pEMRHeader->rclFrame.left) * PixelsX / (MMX*100.0f));
rect.right = (int)((float)(pEMRHeader->rclFrame.right) * PixelsX / (MMX*100.0f));
rect.bottom = (int)((float)(pEMRHeader->rclFrame.bottom) * PixelsY / (MMY*100.0f));



Here "dc is Device context for the destination printer" .

But each time I am getting somewhat big print from the printer.

Is it right way to calculate the RECT?

It would be help me if you can look into the problem please.


Thank you.

Regards,
MAhendra
AnswerRe: How calculate RECT from emf spool file of printer? Pin
Stuart Dootson20-Jan-09 23:39
professionalStuart Dootson20-Jan-09 23:39 
QuestionI need help to use multiselection Listbox [modified] Pin
kokilag20-Jan-09 21:34
kokilag20-Jan-09 21:34 
QuestionRe: I need help to use multiselection Listbox Pin
CPallini20-Jan-09 21:48
mveCPallini20-Jan-09 21:48 
AnswerRe: I need help to use multiselection Listbox Pin
Iain Clarke, Warrior Programmer20-Jan-09 22:11
Iain Clarke, Warrior Programmer20-Jan-09 22:11 
GeneralRe: I need help to use multiselection Listbox Pin
David Crow21-Jan-09 3:24
David Crow21-Jan-09 3:24 
GeneralOT: Pachyderm Cuisine Pin
Iain Clarke, Warrior Programmer21-Jan-09 3:32
Iain Clarke, Warrior Programmer21-Jan-09 3:32 
AnswerRe: I need help to use multiselection Listbox Pin
kokilag21-Jan-09 18:14
kokilag21-Jan-09 18:14 
QuestionDockControlBar issue in VS2008 project Pin
Prasann Mayekar20-Jan-09 19:55
Prasann Mayekar20-Jan-09 19:55 
QuestionRe: DockControlBar issue in VS2008 project Pin
mahesh_mtech22-Nov-10 22:59
mahesh_mtech22-Nov-10 22:59 
QuestionHow to make a control invisible in a dialog box? Pin
kapardhi20-Jan-09 19:35
kapardhi20-Jan-09 19:35 
AnswerRe: How to make a control invisible in a dialog box? Pin
Prasann Mayekar20-Jan-09 19:44
Prasann Mayekar20-Jan-09 19:44 
AnswerRe: How to make a control invisible in a dialog box? Pin
Hamid_RT20-Jan-09 19:59
Hamid_RT20-Jan-09 19:59 
AnswerRe: How to make a control invisible in a dialog box? Pin
Rick York21-Jan-09 8:27
mveRick York21-Jan-09 8:27 
Questionhow can i set an Icon for dialog based MFC application? Pin
MahaKh20-Jan-09 19:09
MahaKh20-Jan-09 19:09 
AnswerRe: how can i set an Icon for dialog based MFC application? Pin
Chandrasekharan P20-Jan-09 21:06
Chandrasekharan P20-Jan-09 21:06 
GeneralRe: how can i set an Icon for dialog based MFC application? Pin
MahaKh25-Jan-09 23:08
MahaKh25-Jan-09 23:08 
Questionusing BitBlt for preview DC Pin
_T("No name")20-Jan-09 18:33
_T("No name")20-Jan-09 18:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.