|
Wt are .inl files in vc++? Any kind of info is most welcome
|
|
|
|
|
That's inline function file.
|
|
|
|
|
Some answers from google:
*.inl files contain the definitions of inline member functions.
inlsplit turns a .inl file into the corresponding .cc and .h files, placing an include guard (#ifndef _HEADER_H...#endif) around the .h file. It can also optionally generate preprocessor directives in the output files to tell the C++ compiler what line it is on in the .inl file (for error messages).
Hope it answers your question?!
Regards
Programm3r
|
|
|
|
|
I am using CxImage class. My code which prints a text file to a tiff file is
char * fileSrc="g:\\src.txt";<br />
char * fileDest = "g:\\dest.tiff";<br />
FILE *fp1,*fp2;<br />
fp1 = fopen(fileSrc,"r");<br />
fp2 = fopen(fileDest,"w+b");<br />
CxImage image(1024, 1024, 8, CXIMAGE_FORMAT_TIF);<br />
RGBQUAD c={255,255,255,255};<br />
HDC hdc = ::GetWindowDC(NULL);<br />
<br />
while((ch[0] = fgetc(fp1))!= EOF)<br />
{<br />
if(ch[0] == '\n' || ch[0] =='\r')<br />
{<br />
x=10;<br />
y+=10;<br />
}<br />
x+=10;<br />
ch[1]='\0';<br />
image.DrawString(hdc, x, y, ch,c, "Arial");<br />
}<br />
<br />
::ReleaseDC(NULL,hdc);<br />
int i = image.Encode(fp2, CXIMAGE_FORMAT_TIF);<br />
str.Format("image Encode Result- %d",i);<br />
m_List.InsertString(-1,str);<br />
<br />
fclose(fp1);<br />
fclose(fp2);
Every thing is going right except the main thing. What i am getting in tiff file is a total black image and nothing else.
How can i get the right image. Please help.
KIRAN PINJARLA
|
|
|
|
|
|
I have gone through it But it doesn't have any print job from a text file. I am using its functions as i need. But i am not getting required output.
Is there a way?
KIRAN PINJARLA
|
|
|
|
|
I'm not suer, cause I'm not very familier with the CxImage Class, Have you tried searching google. Otherwise if someone else knows on this forum, they will let you know. Sorry ....
Regards
Programm3r
|
|
|
|
|
Maybe you should fill the initial image with white background? I think you should try this:
CxImage image(....);
image.Clear(0xFF);
I hope it helps.
|
|
|
|
|
Thank you Viorel... but
It doesnt work. It still showing a total black image.
What else can i do.
KIRAN PINJARLA
|
|
|
|
|
I think you should assign a palette. A simple way is:
CxImage image(...);
image.SetGrayPalette();
image.Clear(0xFF);
Since your text must be black, I think instead of
RGBQUAD c={255,255,255,255};
which is white, you should try
RGBQUAD c = {0, 0, 0, 0};
I hope this helps.
|
|
|
|
|
Thank you Viorel.
Now it has shown the white page but i wonder why it hasn't shown my text on it. It only a balnk page created.
My code is
FILE *fp1,*fp2;<br />
fp1 = fopen(fileSrc,"r");<br />
fp2 = fopen(fileDest,"wb+");<br />
<br />
while((ch[0] = fgetc(fp1))!= EOF)<br />
{<br />
if(ch[0] == '\n' || ch[0] =='\r')<br />
{<br />
x=10;<br />
y+=10;<br />
}<br />
x+=10;<br />
ch[1]='\0';<br />
image.DrawString(hdc, x, y, ch,c, "Arial");<br />
}<br />
<br />
fclose(fp1);<br />
fclose(fp2);
KIRAN PINJARLA
|
|
|
|
|
I think you should make an experiment with a greater y , for instance set the initial y to 100. Also check if you are using black colour, i.e. "RGBQUAD c = {0, 0, 0, 0}; ".
|
|
|
|
|
HDC hdc = ::GetWindowDC(NULL); int l = image.DrawString(hdc, x, y, "ch",c, "Arial");<br />
::ReleaseDC(NULL,hdc);
what exactly the line GetWindowDC(NULL) does. and what happens when we place the hdc in the Drawstring(hdc,..).
KIRAN PINJARLA
|
|
|
|
|
Analyzing the source of CxImage library (ximawnd.cpp), it seems the HDC value is used to format and draw the text on a temporary in-memory bitmap, and then the image is copied from this bitmap to CxImage object.
It does not look much optimized for speed, and maybe you will have time to investigate some other approaches, like creating your own HBITMAP object, drawing on it, and then saving it to a file, for example using CImage class from ATL/MFC?
|
|
|
|
|
Hi,
I am writing an application that generates documents and I wqould like to open them in Microsoft Word automatically. Does anyone have an idea how to launch Word with the relevant document from within my application?
Thanks in advance,
William
|
|
|
|
|
|
|
Hi try this, may help u
http://support.microsoft.com/kb/178749/E-US/
then use this code in ur programme
BOOL CLastApp::InitInstance()
{
if(!AfxOleInit()) // Your addition starts here
{
AfxMessageBox("Could not initialize COM dll");
return FALSE;
}
else
{
//AfxMessageBox("Inint");
}
_Application app; // app is the Excel _Application object
if(!app.CreateDispatch("Word.Application"))
{
AfxMessageBox("Couldn't start Excel.");
}
else
{
app.SetVisible(TRUE);
}
COleVariant covTrue((short)TRUE),covFalse((short)FALSE),covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR),covFormat( short(7));
COleVariant m_Long((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
AfxEnableControlContainer();
Documents docs = app.GetDocuments();
unsigned long int i = 1;
CFileFind finder;
CString file_name;
CString path;
BOOL bWorking = finder.FindFile("d:/george/*.doc");
while(bWorking){
bWorking = finder.FindNextFile();
file_name = finder.GetFileName();
path = "D:\\george\\"+ file_name;
//AfxMessageBox(path);
_Document doc = docs.Open(
COleVariant(path),
covTrue, // Confirm Conversion.
covTrue, // ReadOnly.
covFalse, // AddToRecentFiles.
covOptional, // PasswordDocument.
covOptional, // PasswordTemplate.
covFalse, // Revert.
covOptional, // WritePasswordDocument.
covOptional, // WritePasswordTemplate.
covTrue,
covTrue,
covOptional,
covOptional,
covOptional,
covOptional);
/*VARIANT* FileName,
VARIANT* FileFormat,
VARIANT* LockComments,
VARIANT* Password,
VARIANT* AddToRecentFiles,
VARIANT* WritePassword,
VARIANT* ReadOnlyRecommended,
VARIANT* EmbedTrueTypeFonts,
VARIANT* SaveNativePictureFormat,
VARIANT* SaveFormsData,
VARIANT* SaveAsAOCELetter,
VARIANT* Encoding,
VARIANT* InsertLineBreaks,
VARIANT* AllowSubstitutions,
VARIANT* LineEnding,
VARIANT* AddBiDiMarks)*/
/*doc.SaveAs(COleVariant(path),
covFormat,covOptional,covOptional,
covOptional,covOptional,covFalse,covOptional,
covTrue,covFalse,covOptional, covOptional,covTrue,covOptional,covOptional,covOptional);*/
file_name.Format("%lu",i);
path = "D:\\work\\"+file_name+".txt";
//AfxMessageBox(path);
doc.SaveAs( COleVariant(path),
covFormat,
covOptional,
covOptional,
covOptional,
covOptional,
covFalse,
covOptional,
covTrue,covFalse,covOptional, covOptional,covTrue,covOptional,covOptional,covOptional);
doc.Close(m_Long,m_Long,m_Long);
i++;
//docs.Close(m_Long,m_Long,m_Long);
}
app.Quit(m_Long,m_Long,m_Long);
AfxMessageBox("Completed");
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
return FALSE;
}
|
|
|
|
|
Is the keyword 'void' a datatype?
|
|
|
|
|
Pointers can also be declared as void. They can't be dereferenced without explicit casting. This is because the compiler can't determine the size of the object the pointer points to. For example,
int x;
float f;
void *p = &x; // p points to x
*(int*)p = 2;
p = &r; // p points to r
*(float*)p = 1.1;
Answer your question?
Regards
Programm3r
|
|
|
|
|
Its more of an anti-datatype. When used by itself (e.g. as a return value for a function) it means there is nothing coming back. When used as a pointer (void* ) it means it is pointing to an address in memory, but you either don't know what datatype it is, or don't care what type it is (that is, that you are just concerned with the bytes that start at that address, and not the actual datatype that is there).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
No example for my code I NEED HELP !
I don t now how to do it !
Nothing in msdn library !
Please someoane ! someone must have an ideea !!!!!!
i don t have any ideea how to it , all i have done he give me the same answer , exactly the same result ! (first step)!
Bravoone
|
|
|
|
|
NOTHING ?! i need some help over here !!!!!
Bravoone
|
|
|
|
|
Read the lines in the list control, one by one.
For each line, split it into it's parts (name, city, country)
Compare the name from the list with the given name. If it matches, compare the city (from the list) with the given city. If it matches, display the country (from the list).
What's the problem?
|
|
|
|
|
you can give an example how can i do this !?
PLEASE !
Thank you !
Bravoone
|
|
|
|
|