|
StefanKittel wrote: I would like to show a text
Give us some background of your experience with drawing text, in a window, in DirectX ??? What else??
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Why am i getting this error?
#pragma once
#include <ostream>
class CSentenceArray
// Sentences stored as an array
{
public:
CSentenceArray(void);
virtual ~CSentenceArray(void);
void readFromFile (const char *pszFileName);
void Display (ostream &Sentence);
void sortSentences(bool bAscending); // implements BubbleSort or quicksort
void Clear();
int FirstWord(const char *ptrWord);
protected:
CSentenceArray(bool bCreateArray);
//virtual void storeSentence(const char *pszSentence);
//virtual const char *getNextSentence();
//virtual const char *peekNextSentence();
//virtual void swapWithNext();
//virtual void Reset();
//virtual void eraseAll();
virtual int HowManyWords(const char *pszWord);
private:
char *m_pSentences;
int m_iCurrentPos;
};
Jon
|
|
|
|
|
Add #include <ostream>.
Best,
Jun
|
|
|
|
|
I can't see what you're including as you didn't tick the "Ignore HTML tags in this message (good for code snippets)" check box when posting or use enity references. I assume you're including <iostream> . Remember that the standard library is in the std namespace so you should write std::ostream .
Steve
|
|
|
|
|
Hello all,
I am having some problems with class view in VS2005.
I have created a MFC project with a form (CFormA) derived from CFormView and added two edits to it. Then, I have added two member control variables (CEdit) to these controls. Up to now, everything is ok.
So, I changed the CEdit control variables to a control of mine, also derived from CEdit (CGTBrowseEdit) but it resides on a common controls DLL (imported with AFX_EXT_CLASS). After that, CFormA has disappeared from class view and when I try to add any members to it, VS2005 reports a problem: "Add/Remove operation is impossible, because the code element 'CFormA' is read only".
The strange thing is: if I create another control derived from CEdit that belongs to the project (not imported from a DLL), and change the member variables to this control, class view shows CFormA again and everything works fine!
Does anybody have a similar problem or have heard about it?
Thanks
Gian.
-- modified at 14:28 Saturday 15th July, 2006
|
|
|
|
|
hello to all
i need to display in mfc turkish and other languages
that i get from html
the mfc display english char and some symbols good
but the turkish special char convert into to
unrelated symbols
the one char now takes 2 char ( i think its unicode ) of unrelated symbols
what can i do to display all turkish chars?
-- modified at 10:56 Saturday 15th July, 2006
|
|
|
|
|
|
Hello,
I need to choose a printer and init printing a document(saved on my disk), whithout a print dialog.
How can I do this?
[]'s
|
|
|
|
|
Hope I understood your question
<br />
LPPRINTER_INFO_2 m_pPrinters;<br />
LPDEVMODE m_lpdevmode;<br />
...<br />
...<br />
HDC hdc=CreateDC(m_pPrinters->pDriverName,<br />
(LPCTSTR)m_lpdevmode->dmDeviceName,m_pPrinters->pPortName,m_lpdevmode);<br />
whitesky
|
|
|
|
|
Thanks for your help.
I have a printer device and a file name on hard disc. How can start a print job passing these parameters (printer and file name)?
[]'s
|
|
|
|
|
sorry i dont understand,you have a printer ok and you have a file in your disc now you want to print this file,yes?
whitesky
|
|
|
|
|
That's right.
I need to do this programatically.
|
|
|
|
|
when you have a hdc from printer(CreateDC)then you can
read from your file in the loop and use StartPage and StartDoc
use TextOut or DrawText for write to printer and the end EndPage and EndDoc
(you need to check if your file is > from a page)
I hope its helpful for you
|
|
|
|
|
But my file can be any format, not only text file.
I need to print a image too.
Any other idea?
[]'s
|
|
|
|
|
if you need to print a image you can draw image to dc from printer you can open your file(Image) and use from handle printer for print it.(if you have a hdc you ability to print image or text its not only for printer i think that windows programming is work with handles)
I hope its helpful to you
|
|
|
|
|
But this file can be a .DOC file, with image included and formatted texts (bold, italic,...), then I need to build a app that the user select any file and OK. The app should send the file to a postscript printer for convert to .PS format.
Can I do this, only with my app?
|
|
|
|
|
It's not possible. An app cannot print a document from disc directly to printer.
I should do this with the app that can read the document.
Thanks for your atention.
[]'s
|
|
|
|
|
When you have each file (psd,3d,pdf,txt,...)first you need to read file for example a jpg file
you can use from a class CImage or GDI+ or you can read directly after read you want to print
(for example you need to print a psd file(photoshop) you cant use from a function for read you and print
you need to a structure for read this file and convert it to a for example hbtimap(you can see a example from read psd files in codeproject)
and then you can print this file.now you want to print doc file its like this you need to read this file and convert a foramt for print
A app cannot to print a file from disc directly its right you need to read to file and above
|
|
|
|
|
The problem is also build a rotine for each file format.
|
|
|
|
|
I suggest if you search in internet you can find activexes for your purpose
|
|
|
|
|
|
Peaple,
How can I map a callback function with a process termination event?
I need to know when a executing of a process has finished.
[]'s
|
|
|
|
|
Use WaitForSingleObject(hProcess, ...)
|
|
|
|
|
Cris wrote: nt?
I need to know when a executing of a process has finished.
\
Is it your Own process or you want to wait for some foreign process!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
A foreign process, started by another app.
|
|
|
|