Click here to Skip to main content
15,913,685 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Mapping a function pointer (CALLBACK) to a delegate to use in BacgroundWorker function parameter Pin
Nish Nishant27-Oct-10 4:01
sitebuilderNish Nishant27-Oct-10 4:01 
GeneralRe: Mapping a function pointer (CALLBACK) to a delegate to use in BacgroundWorker function parameter Pin
alleyes27-Oct-10 4:31
professionalalleyes27-Oct-10 4:31 
GeneralRe: Mapping a function pointer (CALLBACK) to a delegate to use in BacgroundWorker function parameter Pin
Nish Nishant27-Oct-10 5:24
sitebuilderNish Nishant27-Oct-10 5:24 
GeneralRe: Mapping a function pointer (CALLBACK) to a delegate to use in BacgroundWorker function parameter Pin
alleyes27-Oct-10 7:43
professionalalleyes27-Oct-10 7:43 
GeneralRe: Mapping a function pointer (CALLBACK) to a delegate to use in BacgroundWorker function parameter Pin
Nish Nishant27-Oct-10 7:55
sitebuilderNish Nishant27-Oct-10 7:55 
GeneralRe: Mapping a function pointer (CALLBACK) to a delegate to use in BacgroundWorker function parameter Pin
alleyes28-Oct-10 2:40
professionalalleyes28-Oct-10 2:40 
GeneralRe: Mapping a function pointer (CALLBACK) to a delegate to use in BacgroundWorker function parameter Pin
Nish Nishant28-Oct-10 3:47
sitebuilderNish Nishant28-Oct-10 3:47 
GeneralRe: Mapping a function pointer (CALLBACK) to a delegate to use in BacgroundWorker function parameter Pin
alleyes28-Oct-10 6:10
professionalalleyes28-Oct-10 6:10 
GeneralRe: Mapping a function pointer (CALLBACK) to a delegate to use in BacgroundWorker function parameter Pin
Nish Nishant28-Oct-10 8:27
sitebuilderNish Nishant28-Oct-10 8:27 
QuestionIs this the fastest way to access the RGB values of a Pixel ? Pin
inayathussaintoori23-Oct-10 23:56
inayathussaintoori23-Oct-10 23:56 
AnswerRe: Is this the fastest way to access the RGB values of a Pixel ? Pin
Nish Nishant24-Oct-10 6:38
sitebuilderNish Nishant24-Oct-10 6:38 
AnswerRe: Is this the fastest way to access the RGB values of a Pixel ? Pin
Nish Nishant24-Oct-10 6:40
sitebuilderNish Nishant24-Oct-10 6:40 
GeneralRe: Is this the fastest way to access the RGB values of a Pixel ? Pin
inayathussaintoori24-Oct-10 7:57
inayathussaintoori24-Oct-10 7:57 
GeneralRe: Is this the fastest way to access the RGB values of a Pixel ? Pin
Nish Nishant24-Oct-10 8:03
sitebuilderNish Nishant24-Oct-10 8:03 
Questionreplacing the default list box with custom made list box Pin
emmmatty123-Oct-10 8:54
emmmatty123-Oct-10 8:54 
AnswerRe: replacing the default list box with custom made list box Pin
Nish Nishant23-Oct-10 11:49
sitebuilderNish Nishant23-Oct-10 11:49 
Questiontwo dimension pointers Pin
hasani200722-Oct-10 10:00
hasani200722-Oct-10 10:00 
AnswerRe: two dimension pointers Pin
Nish Nishant23-Oct-10 5:03
sitebuilderNish Nishant23-Oct-10 5:03 
QuestionHow to start interrupted detection process again Pin
rajneshmalik21-Oct-10 2:00
rajneshmalik21-Oct-10 2:00 
AnswerRe: How to start interrupted detection process again Pin
Nish Nishant21-Oct-10 2:21
sitebuilderNish Nishant21-Oct-10 2:21 
QuestionMessage Removed Pin
20-Oct-10 19:59
loid grey manuel20-Oct-10 19:59 
AnswerRe: Auto Update My Application... Pin
Nish Nishant21-Oct-10 1:01
sitebuilderNish Nishant21-Oct-10 1:01 
GeneralRe: Auto Update My Application...[MOVED] Pin
loid grey manuel21-Oct-10 17:36
loid grey manuel21-Oct-10 17:36 
QuestionPrinting a metafile [modified] Pin
frqftgbdafr20-Oct-10 19:17
frqftgbdafr20-Oct-10 19:17 
I am working from a book that has me make a simple Paint program on an MFC SDI. It uses a metafile to store the GDI. I can save the metafile to disk, open the metafile from disk, but the book does not show me how to print the metafile to a printer. If I try to preview or print the document, I get a blank document.

I am saving the metafile this way...

void CPainterView::OnFileSave()
{
CPainterDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);

HMETAFILE MetaFileHandle = pDoc->pMetaFileDC->Close();
CopyMetaFile(MetaFileHandle, "painter.wmf");
CMetaFileDC* ReplacementMetaFile = new CMetaFileDC();
ReplacementMetaFile->Create();
ReplacementMetaFile->PlayMetaFile(MetaFileHandle);
DeleteMetaFile(MetaFileHandle);
delete pDoc->pMetaFileDC;
pDoc->pMetaFileDC = ReplacementMetaFile;
}


I showed you how the book saves the metafile because I have a feeling printing will be very similar.

With the MFC SDI, I have the print features...


BOOL CPainterView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}

void CPainterView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}

void CPainterView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}


Can I use any of these print features to print my metafile? Thank you

modified on Thursday, October 21, 2010 1:36 AM

AnswerRe: Printing a metafile Pin
Nish Nishant21-Oct-10 0:57
sitebuilderNish Nishant21-Oct-10 0:57 

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.