|
For static library you need headers as well as cpp files.
Static library do not contain executable code thus there is no need to supply input libraries. This information is needed later on when you will be using this static library to build an exe or dll file.
For example suppose you have following libraries :
StaticLib1.lib
StaticLib2.lib
DllLib.lib
and you are builing a static library (StaticLib3.lib) using them. Since static library do not have executable code there is no point putting information from input libraries into StaticLib3.lib.
Now suppose you want to build an exe using StaticLib3.lib. At this point you will need StaticLib1.lib, StaticLib2.lib, DllLib.lib, and StaticLib3.lib.
Hope this clear things up.
-Saurabh
|
|
|
|
|
Thank you Saurabh!
Your reply is great! I have a further question, can I build a static library based (dependent) on another static library?
If I can, I think I need to input the name of the dependent .lib file (dependent static library file name) to the static library, right? But in Visual Studio 2003, there is no way to add such input when build a static library.
regards,
George
-- modified at 10:26 Tuesday 13th June, 2006
|
|
|
|
|
we are writting the CString data in to the file using CFile.
first time we are able to write the data correctly but from second time
data is not overwritten. even if we remove the file , the file is generatted with same data.If any one have Idea how this prob can solved please give me.
(CFile::modeCreate | CFile::modeWrite)
|
|
|
|
|
Can you please post the code?
Being a computer, I find your faith in the technology to be amazing. But sorry, you dont have the right to issue this command!
|
|
|
|
|
Read the data from the file and write to temproary file.
Delete the file you were reading the data from.
Rename the temproary file.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Probably the second time the CString objects contain the same values as for the first time. You should check if the CString data really contain information you expect before writting to file.
|
|
|
|
|
Do you have error checking in place?
CString str;
CFile pFile;
CFileException ex;
char szError[255];
if( !pFile.Open(szFile, CFile::modeCreate|CFile::modeWrite, &ex) )
{
ex.GetErrorMessage(szError, 255, NULL);
AfxMessageBox("File Error: " + szError, MB_OK|MB_ICONERROR);
return;
}
if( !str.IsEmpty() )
{
pFile.Write((LPCTSTR)str, str.GetLength());
}
pFile.Close();
HTH
Mark
|
|
|
|
|
I have a truetype font file, named "LSANSI.TTF" but which if i open is shown as Lucida Sans Italic and windows also displays it correctly as Lucida Sans Italic instead of showing it as LSANSI.TTF
How do I get this "Lucida Sans Italic" information from the font file? Is there any api call like GetFontName() or anything similar?
Regards,
padma gahlot
|
|
|
|
|
padma_01 wrote: How do I get this "Lucida Sans Italic" information from the font file? Is there any api call like GetFontName() or anything similar?
-Use CreateFontIndirect method to create with facename "Lucida Sans Italic"
-Select the font into device context
-Use GetTextMetrices method to get the current text Metric
-The structure contains information about your selected font.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
A_Laxman wrote: -Use CreateFontIndirect method to create with facename "Lucida Sans Italic"
But what if you used "My Favorite Font" instead? Would GetTextMetric() still report the font as "Lucida Sans Italic" or would it be "My Favorite Font" instead?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: But what if you used "My Favorite Font" instead? Would GetTextMetric() still report the font as "Lucida Sans Italic" or would it be "My Favorite Font" instead?
Here is the sample given only for the specific problem and BTW if you are unable to trace that one then
Pick your bag and go to school..;P
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
A_Laxman wrote: Here...
Where?
What part of the TEXTMETRIC structure do you propose the font's facename come from?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It is used to get information of the known font only.
You have to specify the font face name to get information of the font.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
A_Laxman wrote: You have to specify the font face name...
Which is the information that the OP was looking for.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
padma_01 wrote: Is there any api call like GetFontName() or anything similar?
Use GetTextFace() .
If, however, you don't actually need/want to "load" the font, use EnumFontFamiliesEx() .
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I need to purchase a visual studio for my project/study. but heard from microsoft product vender that, there is only visual studio 2005 now....
does visual studio 2005 support earlier vc++6.0 MFC projects?
|
|
|
|
|
Visual Studio 2005 supports VC++ 6.0 MFC. But once you convert to Visual studio 2005 version you cannot run it again VC++ 6.0.
Visual Studion 2005 does not provide that backward compatibility.
Karthik M
|
|
|
|
|
zeus_master wrote: heard from microsoft product vender that, there is only visual studio 2005...
...that can be purchased from him/her. You can always find a copy of VC++ v6 from other resources.
zeus_master wrote: does visual studio 2005 support earlier vc++6.0 MFC projects?
Opening a VC++ v6 project with VS 2005 will cause it to be converted. Is that what you meant?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I'v download a the visual studio 2005 express editions from microsoft homepage.but there seems no MFC resource.
Opening a VC++ v6 project with VS 2005 cause it to be converted. while build the project in vs2005, the error occurs.
information is all of the follow files cann't be found. and the MFC resources cann't be found.
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
I found on microsoft homepage that vs 2005 express editions doesn't support MFC. but I want to know the other Version such as VS 2005 standard edition and vs 2005 professional edition can support MFC?
|
|
|
|
|
zeus_master wrote: but I want to know the other Version such as VS 2005 standard edition and vs 2005 professional edition can support MFC?
Yes.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
how to call or integrate DLL within vc++ application.
I have developed one vc++ application now i want to integrate one tool into this application which ll cal this DLL.
reply soon
thanx
FutureSE
|
|
|
|
|
You can:
1) Load programmatically the DLL using LoadLibrary(). In this case you have to load the functions entry points the dll exports via GetProcAddr()
2) Usually DLLs come with a LIB file. Include the LIB file into your project. The functions exported by the DLL are now available.
3)Use the delay loading feature with the /delayload:dllname linker switch
|
|
|
|
|
Use CoCreateInstance()
You should know how to invoke a COM and work with COM objects.This applies when you have the class id of the interface.
else
You can also use LoadLibrary() alongwith GetProcAddress() to invoke the functions
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 6:18 Tuesday 13th June, 2006
|
|
|
|
|
FutureSE wrote: how to call or integrate DLL within vc++ application.
I have developed one vc++ application now i want to integrate one tool into this application which ll cal this DLL.
reply soon
Try GetModuleHandle which returns the handle of your DLL through which you can get the addresses of the method using GetProcAddress..
The GetProcAddress Fails when the method is Mangled (in case of C++ Dll).
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
ok i ll try tht n get back to u
FutureSE
WhiteHawk
|
|
|
|