Click here to Skip to main content
15,893,814 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C++ MFC Decrement Pin
vikas amin29-Dec-05 20:29
vikas amin29-Dec-05 20:29 
QuestionHow to Save Picture from Clipboard to file using VC++? Pin
greenapplezlp29-Dec-05 15:11
greenapplezlp29-Dec-05 15:11 
AnswerRe: How to Save Picture from Clipboard to file using VC++? Pin
Identity Undisclosed29-Dec-05 19:01
Identity Undisclosed29-Dec-05 19:01 
GeneralRe: How to Save Picture from Clipboard to file using VC++? Pin
Owner drawn29-Dec-05 19:56
Owner drawn29-Dec-05 19:56 
GeneralRe: How to Save Picture from Clipboard to file using VC++? Pin
greenapplezlp29-Dec-05 20:25
greenapplezlp29-Dec-05 20:25 
Questioninternet accelerator?? Pin
gr8coaster32929-Dec-05 13:03
gr8coaster32929-Dec-05 13:03 
AnswerRe: internet accelerator?? Pin
Prakash Nadar29-Dec-05 23:34
Prakash Nadar29-Dec-05 23:34 
QuestionPrinting Problem - Console App - C++ - VS2005 Pin
LudwigKeck29-Dec-05 12:00
LudwigKeck29-Dec-05 12:00 
I need a console app (it is called from various other programs) that processes some data from various files and at times needs to send data to a (let's say generic text) printer with some printer control instructions. I cam across a sample in the help files with starts:
Frown | :(
// RawDataToPrinter - sends binary data directly to a printer<br />
      // <br />
      // szPrinterName: NULL-terminated string specifying printer name<br />
      // lpData:        Pointer to raw data bytes<br />
      // dwCount        Length of lpData in bytes<br />
      // <br />
      // Returns: TRUE for success, FALSE for failure.<br />
      // <br />
      BOOL RawDataToPrinter(LPSTR szPrinterName, LPBYTE lpData, DWORD dwCount)<br />
      {<br />
        HANDLE     hPrinter;<br />
        DOC_INFO_1 DocInfo;<br />
        DWORD      dwJob;<br />
        DWORD      dwBytesWritten;<br />
<br />
        // Need a handle to the printer.<br />
        if( ! OpenPrinter( szPrinterName, &hPrinter, NULL ) )<br />
          return FALSE;<br />
       .....

This seemed to do what I need. I included WinNT.h and then the fun began: Compiling just presents a long list off errors in the WinNT.h file:
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(273) : error C2146: syntax error : missing ';' before identifier 'WCHAR'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(273) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(276) : error C2143: syntax error : missing ';' before '*'
and many others.

Any ideas? Suggestions? -- Honestly I have not yet started to celebrate the new year!

Ludwig
AnswerRe: Printing Problem - Console App - C++ - VS2005 Pin
Prakash Nadar29-Dec-05 23:20
Prakash Nadar29-Dec-05 23:20 
QuestionSimple DLL question Pin
Axonn Echysttas29-Dec-05 8:50
Axonn Echysttas29-Dec-05 8:50 
AnswerRe: Simple DLL question Pin
basementman29-Dec-05 8:54
basementman29-Dec-05 8:54 
GeneralRe: Simple DLL question Pin
Axonn Echysttas30-Dec-05 23:33
Axonn Echysttas30-Dec-05 23:33 
Questionconnecting P2P Pin
arui6929-Dec-05 8:13
arui6929-Dec-05 8:13 
AnswerRe: connecting P2P Pin
Nish Nishant29-Dec-05 10:06
sitebuilderNish Nishant29-Dec-05 10:06 
QuestionDragable buttons Pin
zapper22229-Dec-05 7:56
zapper22229-Dec-05 7:56 
Questionsendto() in raw sock mode gets WSAEINTR err. Pin
9ine29-Dec-05 7:33
9ine29-Dec-05 7:33 
Questionhow to write a unicode string to a text file Pin
ChrisLang29-Dec-05 7:27
ChrisLang29-Dec-05 7:27 
AnswerRe: how to write a unicode string to a text file Pin
Nish Nishant29-Dec-05 8:36
sitebuilderNish Nishant29-Dec-05 8:36 
AnswerRe: how to write a unicode string to a text file Pin
Taka Muraoka29-Dec-05 18:04
Taka Muraoka29-Dec-05 18:04 
AnswerRe: how to write a unicode string to a text file Pin
krmed30-Dec-05 3:57
krmed30-Dec-05 3:57 
QuestionDynamic arrays in C Pin
Waldermort29-Dec-05 4:03
Waldermort29-Dec-05 4:03 
AnswerRe: Dynamic arrays in C Pin
Maximilien29-Dec-05 5:55
Maximilien29-Dec-05 5:55 
AnswerRe: Dynamic arrays in C Pin
Identity Undisclosed29-Dec-05 6:07
Identity Undisclosed29-Dec-05 6:07 
GeneralRe: Dynamic arrays in C Pin
Waldermort29-Dec-05 6:29
Waldermort29-Dec-05 6:29 
GeneralRe: Dynamic arrays in C Pin
Identity Undisclosed29-Dec-05 18:28
Identity Undisclosed29-Dec-05 18:28 

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.