Click here to Skip to main content
15,895,777 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Complier C2664 Error Pin
Andy20218-Sep-07 4:11
Andy20218-Sep-07 4:11 
GeneralRe: Complier C2664 Error Pin
David Crow18-Sep-07 4:19
David Crow18-Sep-07 4:19 
GeneralRe: Complier C2664 Error Pin
Andy20218-Sep-07 4:29
Andy20218-Sep-07 4:29 
GeneralRe: Complier C2664 Error Pin
David Crow18-Sep-07 4:34
David Crow18-Sep-07 4:34 
GeneralRe: Complier C2664 Error Pin
Andy20218-Sep-07 4:59
Andy20218-Sep-07 4:59 
QuestionRe: Complier C2664 Error Pin
David Crow18-Sep-07 5:14
David Crow18-Sep-07 5:14 
AnswerRe: Complier C2664 Error Pin
Andy20218-Sep-07 6:10
Andy20218-Sep-07 6:10 
QuestionPrinting Problem Pin
pri_skit18-Sep-07 1:40
pri_skit18-Sep-07 1:40 
I am using MM_TEXT mode during Ondraw(CDC *pDC) function & displayed a rectangle but during printing i am using MM_TWIPS mapmode now i want to use CoOrdinate used during Ondraw.I tried to convert Co-ordnate into correct pixels. Here is code:
// during On draw
pDC->MoveTo(p1);
pDC->LineTo(p2);
pDC->LineTo(p3);
pDC->LineTo(p4);
pDC->LineTo(p1);

// some macro
#define CalibPoint(p, HorPix,VerPix) CPoint(CALIBX(p.x,HorPix),CALIBY(p.y,VerPix))
#define CALIBX(point,HPIX) (point * HPIX )/PIXPERINCH
#define CALIBY(point,VPIX) (point * VPIX )/PIXPERINCH
#define PIXPERINCH 72

int nHorz = pDC->GetDeviceCaps(LOGPIXELSX);
int nVert = pDC->GetDeviceCaps(LOGPIXELSY);

//during printing
p1=CalibPoint(p1, nHorz,nVert);//CalibPoint is Macro
p2=CalibPoint(p2, nHorz,nVert);
p3=CalibPoint(p3, nHorz,nVert);
p4=CalibPoint(p4, nHorz,nVert);

pDC->MoveTo(p1.x,-p1.y);
pDC->LineTo(p2.x,-p2.y);
pDC->LineTo(p3.x,-p3.y);
pDC->LineTo(p4.x,-p4.y);
pDC->LineTo(p1.x,-p1.y);


Thanks & regards
priyank Dwivedi


priyank

QuestionUse MFC in.... Pin
himuskanhere18-Sep-07 1:36
himuskanhere18-Sep-07 1:36 
AnswerRe: Use MFC in.... Pin
nbugalia18-Sep-07 1:41
nbugalia18-Sep-07 1:41 
AnswerRe: Use MFC in.... Pin
Iain Clarke, Warrior Programmer18-Sep-07 1:46
Iain Clarke, Warrior Programmer18-Sep-07 1:46 
GeneralRe: Use MFC in.... Pin
ddspliting18-Sep-07 7:35
ddspliting18-Sep-07 7:35 
Questionconversion from double to float Pin
KASR118-Sep-07 1:10
KASR118-Sep-07 1:10 
AnswerRe: conversion from double to float Pin
Chris Losinger18-Sep-07 1:24
professionalChris Losinger18-Sep-07 1:24 
GeneralRe: conversion from double to float Pin
nbugalia18-Sep-07 2:11
nbugalia18-Sep-07 2:11 
AnswerRe: conversion from double to float Pin
Russell'18-Sep-07 2:17
Russell'18-Sep-07 2:17 
JokeRe: conversion from double to float Pin
Nelek18-Sep-07 3:48
protectorNelek18-Sep-07 3:48 
GeneralRe: conversion from double to float Pin
Russell'18-Sep-07 4:07
Russell'18-Sep-07 4:07 
AnswerRe: conversion from double to float Pin
Mike Dimmick18-Sep-07 4:30
Mike Dimmick18-Sep-07 4:30 
GeneralRe: conversion from double to float Pin
KASR118-Sep-07 17:56
KASR118-Sep-07 17:56 
GeneralRe: conversion from double to float Pin
David Crow19-Sep-07 2:39
David Crow19-Sep-07 2:39 
Questionadding directory structure tree in a tree control in mfc Pin
Dhiraj kumar Saini18-Sep-07 0:36
Dhiraj kumar Saini18-Sep-07 0:36 
AnswerRe: adding directory structure tree in a tree control in mfc Pin
Russell'18-Sep-07 1:02
Russell'18-Sep-07 1:02 
GeneralRe: adding directory structure tree in a tree control in mfc Pin
Dhiraj kumar Saini18-Sep-07 2:02
Dhiraj kumar Saini18-Sep-07 2:02 
GeneralRe: adding directory structure tree in a tree control in mfc Pin
Russell'18-Sep-07 2:13
Russell'18-Sep-07 2:13 

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.