Click here to Skip to main content
15,903,388 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: pointer Pin
David Crow6-Aug-09 10:36
David Crow6-Aug-09 10:36 
Questionhow to disconnect from internet? Pin
Joseph Marzbani6-Aug-09 2:11
Joseph Marzbani6-Aug-09 2:11 
AnswerRe: how to disconnect from internet? [modified] Pin
Adam Roderick J6-Aug-09 17:58
Adam Roderick J6-Aug-09 17:58 
QuestionPrint Preview on Main frame in MDI Application Pin
Harsh Shankar6-Aug-09 2:01
Harsh Shankar6-Aug-09 2:01 
AnswerRe: Print Preview on Main frame in MDI Application Pin
sashoalm6-Aug-09 22:19
sashoalm6-Aug-09 22:19 
GeneralRe: Print Preview on Main frame in MDI Application Pin
Harsh Shankar6-Aug-09 22:42
Harsh Shankar6-Aug-09 22:42 
GeneralRe: Print Preview on Main frame in MDI Application Pin
sashoalm6-Aug-09 23:08
sashoalm6-Aug-09 23:08 
GeneralRe: Print Preview on Main frame in MDI Application Pin
Harsh Shankar6-Aug-09 23:26
Harsh Shankar6-Aug-09 23:26 
Hi,
Thanks for quick reply.

sashoalm wrote:
try to place the code I posted in CMainFrame::OnFilePrintPreview


There is an issue in doing as you are saying but there is no such function "DoPrintPreview" in class CMDIFrameWndEx from which the CmainFrame Class is derived..
However, i already have tried:
CView *pView = GetActiveFrame()->GetActiveView();
if(pView == NULL)
{
	return;
}
CPrintPreviewState* pState = new CPrintPreviewState;
    
if (!pView->DoPrintPreview(AFX_IDD_PREVIEW_TOOLBAR, pView,
	RUNTIME_CLASS(CPreviewView), pState))
{
	delete pState; // Preview failed to initialize, delete State now.
	pState = NULL;
}

But it prepares the preview in the same document only and not capturing the frame.
And this not what i wanted Frown | :(

Please suggess something else.

HARSH

Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.

GeneralRe: Print Preview on Main frame in MDI Application Pin
sashoalm7-Aug-09 0:17
sashoalm7-Aug-09 0:17 
GeneralRe: Print Preview on Main frame in MDI Application Pin
Harsh Shankar7-Aug-09 0:47
Harsh Shankar7-Aug-09 0:47 
GeneralRe: Print Preview on Main frame in MDI Application Pin
sashoalm7-Aug-09 1:57
sashoalm7-Aug-09 1:57 
GeneralRe: Print Preview on Main frame in MDI Application Pin
Harsh Shankar7-Aug-09 3:26
Harsh Shankar7-Aug-09 3:26 
GeneralRe: Print Preview on Main frame in MDI Application Pin
sashoalm7-Aug-09 4:29
sashoalm7-Aug-09 4:29 
GeneralRe: Print Preview on Main frame in MDI Application Pin
sashoalm7-Aug-09 4:36
sashoalm7-Aug-09 4:36 
QuestionCrypto API Chain of Trust Pin
William Engberts6-Aug-09 1:41
William Engberts6-Aug-09 1:41 
QuestionRead MySQL Table Pin
rdop6-Aug-09 1:00
rdop6-Aug-09 1:00 
AnswerRe: Read MySQL Table Pin
CPallini6-Aug-09 1:57
mveCPallini6-Aug-09 1:57 
GeneralRe: Read MySQL Table Pin
rdop6-Aug-09 2:44
rdop6-Aug-09 2:44 
GeneralRe: Read MySQL Table Pin
CPallini6-Aug-09 3:32
mveCPallini6-Aug-09 3:32 
QuestionRepeated Question- How to upload a Large Bitmap (1600*1600 Pixel) Pin
Madhu_Rani6-Aug-09 0:41
Madhu_Rani6-Aug-09 0:41 
AnswerRe: Repeated Question- How to upload a Large Bitmap (1600*1600 Pixel) Pin
Cedric Moonen6-Aug-09 1:05
Cedric Moonen6-Aug-09 1:05 
GeneralRe: Repeated Question- How to upload a Large Bitmap (1600*1600 Pixel) Pin
Madhu_Rani6-Aug-09 1:19
Madhu_Rani6-Aug-09 1:19 
GeneralRe: Repeated Question- How to upload a Large Bitmap (1600*1600 Pixel) Pin
Prasann Mayekar6-Aug-09 1:48
Prasann Mayekar6-Aug-09 1:48 
GeneralRe: Repeated Question- How to upload a Large Bitmap (1600*1600 Pixel) Pin
Madhu_Rani6-Aug-09 2:01
Madhu_Rani6-Aug-09 2:01 
QuestionNo effect after sending EM_SETBKGNDCOLOR to windowless RichEdit Control. Pin
hawkgao01295-Aug-09 21:47
hawkgao01295-Aug-09 21:47 

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.