Click here to Skip to main content
16,008,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralQuestion to exit app Pin
dima_t1-Nov-02 21:59
dima_t1-Nov-02 21:59 
GeneralRe: Question to exit app Pin
Anatari1-Nov-02 22:55
Anatari1-Nov-02 22:55 
GeneralRe: Question to exit app Pin
Anonymous2-Nov-02 0:47
Anonymous2-Nov-02 0:47 
Generalcreating folders Pin
Yanigv Kcarija1-Nov-02 20:20
sussYanigv Kcarija1-Nov-02 20:20 
GeneralRe: creating folders Pin
Chris Losinger1-Nov-02 20:27
professionalChris Losinger1-Nov-02 20:27 
GeneralRe: creating folders Pin
Junkie1-Nov-02 20:44
Junkie1-Nov-02 20:44 
GeneralRe: creating folders Pin
Simon.W1-Nov-02 20:57
Simon.W1-Nov-02 20:57 
Generalprinter properties settings by user Pin
vgkotha1-Nov-02 19:27
vgkotha1-Nov-02 19:27 
hi
i am wiritng my own print dialogbox. on that i place the controls for setting properties. i like to set that properties to selected printer. i wrote below code. but printer doesn't set the user selected properties . please correct the code where i am wrong. otherwise please give guidence
Thank you

void CmyPrintSetup::OnButPrint()
{
// TODO: Add your control notification handler code here
unsigned char temp[32];
DEVMODE *devout,*devin;
DWORD dwNeeded,dwRet;
DEVMODE* pDevMode;
if(!OpenPrinter(printername,&hprinter,NULL))
MessageBox("Printer can't be opened","error",MB_OK);
dwNeeded=DocumentProperties(NULL,hprinter,printername,NULL,NULL,0);
pDevMode=(DEVMODE*)malloc(dwNeeded);
dwRet=DocumentProperties
(NULL,hprinter,printername,pDevMode,NULL,DM_OUT_BUFFER);
if (dwRet != IDOK)
{
/* If failure, cleanup and return failure. */
free(pDevMode);
ClosePrinter(hprinter);
}
pDevMode->dmOrientation=m_orientation;
pDevMode->dmCopies=m_copies;
dwRet=DocumentProperties
(NULL,hprinter,printername,pDevMode,pDevMode,DM_IN_BUFFER|DM_OUT_BUFFER);
if(dwRet!=IDOK)
{
MessageBox("properties initialization error","error",MB_OK);
}


}


please help it's urgent


Generalprinter properties setting Pin
vgkotha1-Nov-02 19:24
vgkotha1-Nov-02 19:24 
Generalstrings and listbox Pin
Dino De Cruz1-Nov-02 19:09
sussDino De Cruz1-Nov-02 19:09 
GeneralRe: strings and listbox Pin
Christian Graus1-Nov-02 19:08
protectorChristian Graus1-Nov-02 19:08 
GeneralRe: strings and listbox Pin
Chris Losinger1-Nov-02 19:18
professionalChris Losinger1-Nov-02 19:18 
Generalcontext sensitive help files Pin
1-Nov-02 18:58
suss1-Nov-02 18:58 
Questionwhat is difrent between c# and visual c Pin
hina munir1-Nov-02 17:29
susshina munir1-Nov-02 17:29 
AnswerRe: what is difrent between c# and visual c Pin
Chris Losinger1-Nov-02 17:52
professionalChris Losinger1-Nov-02 17:52 
AnswerRe: what is difrent between c# and visual c Pin
Christian Graus1-Nov-02 18:21
protectorChristian Graus1-Nov-02 18:21 
GeneralRe: what is difrent between c# and visual c Pin
Ed Gadziemski2-Nov-02 3:45
professionalEd Gadziemski2-Nov-02 3:45 
GeneralConversion From DWORD to TEXT characters. Pin
elvis89001-Nov-02 17:21
elvis89001-Nov-02 17:21 
GeneralRe: Conversion From DWORD to TEXT characters. Pin
Christian Graus1-Nov-02 18:18
protectorChristian Graus1-Nov-02 18:18 
Questionwhat is visual c Pin
Anonymous1-Nov-02 17:24
Anonymous1-Nov-02 17:24 
AnswerRe: what is visual c Pin
Christian Graus1-Nov-02 18:18
protectorChristian Graus1-Nov-02 18:18 
GeneralRe: what is visual c Pin
Junkie1-Nov-02 20:40
Junkie1-Nov-02 20:40 
GeneralRe: what is visual c Pin
Phil J Pearson2-Nov-02 5:54
Phil J Pearson2-Nov-02 5:54 
GeneralRe: what is visual c Pin
Christian Graus2-Nov-02 11:34
protectorChristian Graus2-Nov-02 11:34 
GeneralGame Programming Pin
Steve L.1-Nov-02 16:34
Steve L.1-Nov-02 16:34 

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.