Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to include CArray in CxImage libraray Pin
#realJSOP9-Jan-06 23:28
professional#realJSOP9-Jan-06 23:28 
GeneralRe: How to include CArray in CxImage libraray Pin
Christian Graus10-Jan-06 9:59
protectorChristian Graus10-Jan-06 9:59 
AnswerRe: How to include CArray in CxImage libraray Pin
#realJSOP9-Jan-06 0:12
professional#realJSOP9-Jan-06 0:12 
GeneralRe: How to include CArray in CxImage libraray Pin
Vaclav10-Jan-06 12:31
Vaclav10-Jan-06 12:31 
GeneralRe: How to include CArray in CxImage libraray Pin
#realJSOP10-Jan-06 12:48
professional#realJSOP10-Jan-06 12:48 
QuestionIcon on the view(SDI) can't print in the MFC ,why? Pin
zhonglin.liang8-Jan-06 14:36
zhonglin.liang8-Jan-06 14:36 
AnswerRe: Icon on the view(SDI) can't print in the MFC ,why? Pin
vipinasda8-Jan-06 16:27
vipinasda8-Jan-06 16:27 
GeneralRe: Icon on the view(SDI) can't print in the MFC ,why? Pin
zhonglin.liang8-Jan-06 18:14
zhonglin.liang8-Jan-06 18:14 
this is part of my code:
the icon and the text can both display when I print preview.the text can print ,but the icon can't print.why?


void CMyView::OnDraw(CDC *pDC)
{
....
HIOCN hIcon;
CString iconPath("D:\\1.icon");
CString stronetwo("vc++");
hIcon=(HICON)LoadImage(NULL,iconPath,IMAGE_ICON,48,48,LR_LOADFROMFILE|LR_DEFAULTSIZE);
DrawIconEx(pDC->GetSafeHdc(), x-24, y+50, hIcon, 48, 48, 0, NULL, DI_NORMAL);
DestroyIcon(hIcon);
....
pDC->TextOut (x-35, y+110+linenum*20, stronetwo);
}
void CMyView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
{
// TODO: Add your specialized code here and/or call the base class
CScrollView::OnPrepareDC(pDC, pInfo);
pDC->SetMapMode(MM_ANISOTROPIC);
CSize size = CSize(800,560);
pDC->SetWindowExt(size);

int xLogPixPerInch = pDC->GetDeviceCaps(LOGPIXELSX);
int yLogPixPerInch = pDC->GetDeviceCaps(LOGPIXELSY);

long xExt = (long)size.cx * xLogPixPerInch/96;
long yExt = (long)size.cy * xLogPixPerInch/96;
pDC->SetViewportExt((int)xExt,(int)yExt);

}
BOOL CMyView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
CWinApp *app = AfxGetApp();
app->GetPrinterDeviceDefaults(&pInfo->m_pPD->m_pd);

DEVMODE *dm;
dm = pInfo->m_pPD->GetDevMode();
ASSERT(dm!=NULL);
dm->dmPaperSize = 8;
return DoPreparePrinting(pInfo);
}
BOOL CMyView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
CWinApp *app = AfxGetApp();
app->GetPrinterDeviceDefaults(&pInfo->m_pPD->m_pd);

DEVMODE *dm;
dm = pInfo->m_pPD->GetDevMode();
ASSERT(dm!=NULL);
dm->dmPaperSize = 8;
return DoPreparePrinting(pInfo);
}


QuestionDoes VC++ 2005 Standard include optimizing compiler ? Pin
Defenestration8-Jan-06 13:07
Defenestration8-Jan-06 13:07 
AnswerRe: Does VC++ 2005 Standard include optimizing compiler ? Pin
Gavin Taylor8-Jan-06 13:21
professionalGavin Taylor8-Jan-06 13:21 
Question#using will work in VC++6.0 also? Pin
sheshidar8-Jan-06 8:50
sheshidar8-Jan-06 8:50 
AnswerRe: #using will work in VC++6.0 also? Pin
Christian Graus8-Jan-06 10:04
protectorChristian Graus8-Jan-06 10:04 
QuestionMnemonics/Shortcut Key Problem Pin
RobertW1008-Jan-06 8:41
RobertW1008-Jan-06 8:41 
AnswerRe: Mnemonics/Shortcut Key Problem Pin
Anilkumar K V8-Jan-06 17:12
Anilkumar K V8-Jan-06 17:12 
AnswerRe: Mnemonics/Shortcut Key Problem Pin
David Crow9-Jan-06 3:38
David Crow9-Jan-06 3:38 
GeneralRe: Mnemonics/Shortcut Key Problem Pin
RobertW10010-Jan-06 4:11
RobertW10010-Jan-06 4:11 
GeneralRe: Mnemonics/Shortcut Key Problem Pin
David Crow10-Jan-06 4:35
David Crow10-Jan-06 4:35 
QuestionMFC ActiveX Control Array Transfer Pin
godspeed1238-Jan-06 8:33
godspeed1238-Jan-06 8:33 
AnswerRe: MFC ActiveX Control Array Transfer Pin
Prakash Nadar8-Jan-06 14:56
Prakash Nadar8-Jan-06 14:56 
Questionmpeg1 splitter Pin
hmaturana8-Jan-06 8:33
hmaturana8-Jan-06 8:33 
QuestionSetting an integer to the Array number as opposed to the array value Pin
adamlowery8-Jan-06 8:14
adamlowery8-Jan-06 8:14 
AnswerRe: Setting an integer to the Array number as opposed to the array value Pin
Anilkumar K V8-Jan-06 17:40
Anilkumar K V8-Jan-06 17:40 
AnswerRe: Setting an integer to the Array number as opposed to the array value Pin
David Crow9-Jan-06 3:40
David Crow9-Jan-06 3:40 
QuestionQuestion about icons Pin
Maarten Kools8-Jan-06 7:15
professionalMaarten Kools8-Jan-06 7:15 
AnswerRe: Question about icons Pin
Ryan Binns8-Jan-06 17:17
Ryan Binns8-Jan-06 17:17 

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.