Click here to Skip to main content
15,902,784 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDrag-drop Pin
whiteclouds11-Jun-07 20:16
whiteclouds11-Jun-07 20:16 
QuestionRe: Drag-drop Pin
Hamid_RT11-Jun-07 20:28
Hamid_RT11-Jun-07 20:28 
AnswerRe: Drag-drop Pin
whiteclouds11-Jun-07 20:37
whiteclouds11-Jun-07 20:37 
AnswerRe: Drag-drop Pin
whiteclouds12-Jun-07 0:41
whiteclouds12-Jun-07 0:41 
GeneralRe: Drag-drop Pin
Hamid_RT12-Jun-07 3:34
Hamid_RT12-Jun-07 3:34 
GeneralRe: Drag-drop Pin
whiteclouds12-Jun-07 17:10
whiteclouds12-Jun-07 17:10 
GeneralRe: Drag-drop Pin
Hamid_RT12-Jun-07 19:58
Hamid_RT12-Jun-07 19:58 
Questionprint preview Pin
Bravoone_200611-Jun-07 19:37
Bravoone_200611-Jun-07 19:37 
i have a CDialog ,1 button for print i have a print but i need a button for print preview !How i have read all codeproject stuf but nothing ...
this is my code for print :


CPrintDialog dlgPrint(FALSE,PD_ALLPAGES,this);

if (dlgPrint.DoModal()==IDOK)
{
// ** Attach the printer DC from the dialog
// ** to a CDC object
CDC dcPrint;
dcPrint.Attach(dlgPrint.GetPrinterDC());

// ** Create and fill a DOCINFO structure
DOCINFO myPrintJob;
myPrintJob.cbSize = sizeof(myPrintJob);
myPrintJob.lpszDocName = "MyPrintJob";
myPrintJob.lpszOutput = NULL;
myPrintJob.lpszDatatype = NULL;
myPrintJob.fwType = NULL;

// ** Start the printing document
if (dcPrint.StartDoc(&myPrintJob)>=0)
{
// ** Start a page
dcPrint.StartPage();


CString sQuestion;

m_question.GetWindowText(sQuestion);




CString sText;
sText = "Command";
CString sText1;
sText1 = "Display :";
////////////////////////////////////////////////////////////////////////////////////////
dcPrint.TextOut(2000,350,sText);
dcPrint.TextOut(300,500,sText1);


// ** Throw the page
dcPrint.EndPage();

// ** Close the document
dcPrint.EndDoc();
}

// ** Delete the printer device context
dcPrint.DeleteDC();
}

Bravoone

AnswerRe: print preview Pin
Hamid_RT11-Jun-07 20:04
Hamid_RT11-Jun-07 20:04 
QuestionRe: print preview Pin
Bravoone_200611-Jun-07 20:32
Bravoone_200611-Jun-07 20:32 
AnswerRe: print preview Pin
Hamid_RT11-Jun-07 20:59
Hamid_RT11-Jun-07 20:59 
QuestionRe: print preview Pin
Bravoone_200611-Jun-07 21:36
Bravoone_200611-Jun-07 21:36 
AnswerRe: print preview Pin
Hamid_RT11-Jun-07 21:55
Hamid_RT11-Jun-07 21:55 
QuestionRe: print preview Pin
Bravoone_200611-Jun-07 22:05
Bravoone_200611-Jun-07 22:05 
QuestionRe: print preview Pin
Bravoone_200612-Jun-07 0:07
Bravoone_200612-Jun-07 0:07 
AnswerRe: print preview Pin
Hamid_RT12-Jun-07 4:01
Hamid_RT12-Jun-07 4:01 
QuestionRe: print preview Pin
Hamid_RT12-Jun-07 19:59
Hamid_RT12-Jun-07 19:59 
JokeRe: print preview Pin
David Crow12-Jun-07 2:58
David Crow12-Jun-07 2:58 
QuestionRe: print preview Pin
Bravoone_200612-Jun-07 2:53
Bravoone_200612-Jun-07 2:53 
QuestionDisplay non-solid-color background in scroll-view correctly Pin
chen.zd11-Jun-07 19:13
chen.zd11-Jun-07 19:13 
QuestionGetCharABCWidths behaviour in Vista Pin
NiceNaidu11-Jun-07 18:40
NiceNaidu11-Jun-07 18:40 
AnswerRe: GetCharABCWidths behaviour in Vista Pin
Hans Dietrich11-Jun-07 21:03
mentorHans Dietrich11-Jun-07 21:03 
GeneralRe: GetCharABCWidths behaviour in Vista Pin
NiceNaidu11-Jun-07 23:27
NiceNaidu11-Jun-07 23:27 
GeneralRe: GetCharABCWidths behaviour in Vista Pin
Mark Salsbery12-Jun-07 8:03
Mark Salsbery12-Jun-07 8:03 
QuestionKeyDown Pin
sheetal_0611-Jun-07 18:26
sheetal_0611-Jun-07 18:26 

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.