|
Why a repost? Your original one is just below
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
kiran.pinjarla wrote: ...I want to do it with out getting print dialog on to the screen. I want my code to do what the print dialog does...
I think what you want requires:
OpenPrinter()
StartDocPrinter()
StartPagePrinter()
WritePrinter()
EndPagePrinter()
EndDocPrinter()
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
We suppose your problem is "how to create a TIFF image file which contains just a white background and a simply formatted black text, loaded from a text file?"
As a hypothetical solution I would suggest you to try the CxImage library (http://www.codeproject.com/bitmap/cximage.asp[^], light source files).
I think a part of solution may look like this:
CxImage image(1024, 1024, 8, CXIMAGE_FORMAT_TIF);
HDC dc = ::GetWindowDC(NULL);
image.DrawString(hdc, 10, 10, "a line of text", RGB(0, 0, 0), "Arial");
::ReleaseDC(hdc, NULL);
image.Encode("file-name.tiff", CXIMAGE_FORMAT_TIF);
I hope it works.
|
|
|
|
|
Thank You Viorel.
If i am right, the text file window which is to be printed has to be opened.
If it is the case I want to tell you that the window will not be opened. I just give the path of the text file. Is it possible to do as such.
Please reply.
KIRAN PINJARLA
|
|
|
|
|
I don't think you have to open a window. You just need to open the existing text file using a method you know: fopen , CStdioFile , std::ifstream , CreateFile etc. Then read lines from file and draw them to the image.
Note that instead of CxImage third-party library you also may investigate some other tools. For instance the CImage class, available in ATL and described in MSDN, is also able to store images to disk, but not in TIFF format.
|
|
|
|
|
I have an application where 4 audio files are played simultaneously in two channels of two conventional stereo cards. I have to migrate this to playing using a 5.1 system. There are limitations to existing WAVEFORMAT which does not identify multi channel device.
Can anyone help me with the procedure how to pack the audio packets (for 4 files) and assign to the multi channel sound card?
Any help is highly appreciated.
Thanks in advance.
Manoj
|
|
|
|
|
hi!!
I am trying to port my VC6 code into VC8.
While doing this i am getting strange error in ostream!
It says
d:\program files\microsoft visual studio 8\vc\include\ostream(581) : error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>'<br />
with<br />
[<br />
_Elem=char,<br />
_Traits=std::char_traits<char><br />
]<br />
d:\program files\microsoft visual studio 8\vc\include\ios(151) : see declaration of 'std::basic_ios<_Elem,_Traits>::basic_ios'<br />
with<br />
[<br />
_Elem=char,<br />
_Traits=std::char_traits<char><br />
]<br />
This diagnostic occurred in the compiler generated function 'std::basic_ostream<_Elem,_Traits>::basic_ostream(const std::basic_ostream<_Elem,_Traits> &)'<br />
with<br />
[<br />
_Elem=char,<br />
_Traits=std::char_traits<char><br />
]
I dont know what this error is trying to say. Plz help!!
Thx
|
|
|
|
|
|
Thx sunit!!
I visited this page before! but it didnt solved my problem!
canu tell me which private member is getting accessed??
thx
|
|
|
|
|
can u show me the code where u r getting this type of error
never say die
|
|
|
|
|
How can I convert .txt file to .tiff file. Is there any api or tool that i can use in vc?
Thank You
KIRAN PINJARLA
|
|
|
|
|
How can I convert apples to cucumbers? Is there any api or tool that I can use in vc?
Thank You
SEBASTIAN
|
|
|
|
|
Sebastian Schneider wrote: How can I convert apples to cucumbers? Is there any api or tool that I can use in vc?
You need to convert the apple to a .txt file then wait for the OP to convert it to a .tif file which is a picture of a cucumber. Make sure the apple is the same color as the cucumber though or it won't work.
|
|
|
|
|
Sebastian Schneider wrote: Is there any api or tool that I can use in vc?
SetAppleToCucumbers()
"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
|
|
|
|
|
after convert you can see AppCuc
|
|
|
|
|
Hi all,
i am trying to create GUID with CoCreateGuid but it is
not creating guid.
I am working on windows XP.
ole32.lib is added in link tab.
then what is the problem?
what is wrong in this code?
#include <iostream.h>
#include<objbase.h>
int main(void)
{
HRESULT Res;
GUID *pGuid=NULL;
LPVOID pIni = NULL;
if(CoInitialize(pIni) == S_OK)
{
Res = CoCreateGuid(pGuid);
if(Res == S_OK)
{
cout<<"Created";
}
CoUninitialize();
}
return 0;
}
Thanks in advance
|
|
|
|
|
Got the answer
GUID guid;
CoCreateGuid(&guid);
|
|
|
|
|
|
hi
when the mouse moves over a button, i need to get a table.
The table contains say around 10 rows and 10 columns.
Its like tooltip, instead of message i need table.
so how to create table? and how to add this as a tooltip?
I have to do it in Windows Application.
thanks for ur suggestions
Manjunath S
Bangalore
|
|
|
|
|
Can you explain for table in tooltip i see examples from objects in tooltip
|
|
|
|
|
Dear all,
I have win32 application which contains two buttons in a window. So when i move a mouse over button i want to display a box which contains two rows and two columns(similar to tooltip).when i moved away from the button it should disappear ....
Thanking you...
Manjunath S
Bangalore
|
|
|
|
|
I dont know its possible a table in tooltip or no but see Here[^] if its helpful for you
|
|
|
|
|
|
The only thing I can see is cosmetic, when you're using them.
I'm wondering if one way compiles faster than the other (I assume method 1, because there's less stuff to parse), and if they produce the same code in the exe (I assume they do)?
// Method 1
template < class T >
class Utils
{
public:
static void doSomething(T* object);
static void doSomethingElse(T* object);
};
// Method 2
class Utils
{
public:
template < class T >
static void doSomething(T* object);
template < class T >
static void doSomethingElse(T* object);
};
// A class
class ClassA
{
public:
};
ClassA a;
Utils<ClassA>::doSomething(&a); // Method 1
Utils::doSomething<ClassA>(&a); // Method 2
Just curious...
- S
50 cups of coffee and you know it's on!
|
|
|
|
|