|
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
|
|
|
|
|
Good luck.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
in project setting , under link tab give reference to the .lib file, give its path.
in your program add the header file..
header file should have
__declspec (dllimport) <funname classname="">
not
__declspec (dllexport) <funname classname="">
go get going.
|
|
|
|
|
I'm experiencing an odd behaviour with GetTextMetrics() (used sooo many times).
I've created two fonts with CreateFont.
Select the first font in the device context (PDFWriter printer device context) and do a TextOut().
To increase the y, I call GetTextMetrics() to read the tmHeight and tmExternalLeading values but the program hangs on GetTextMetrics().
If TextOut is not called, GetTextMetrics works.
I'm using VC++ 6.0.
|
|
|
|
|
Nyarlatotep wrote: 've created two fonts with CreateFont.
Select the first font in the device context (PDFWriter printer device context) and do a TextOut().
To increase the y, I call GetTextMetrics() to read the tmHeight and tmExternalLeading values but the program hangs on GetTextMetrics().
If TextOut is not called, GetTextMetrics works.
You may need to select the font again so that the device context gets new tmHeight and tmExternalLeading values that you updated.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
uhm. the code is like this ...
SelectObject(hfont1);
GetTextMetrics(hdc,tm1); // it works
TextOut(hdc, ....);
y += tm1.tmHeight + tm1.tmExternalLeading;
SelectObject(hfont2);
GetTextMetrics(hdc,tm2); // it hangs the program
if TextOut() is not called, the second GetTextMetrics() does not hang.
The only solution i've found is to retrieve all the text metrics before doing any TextOut()
SelectObject(hfont1);
GetTextMetrics(hdc,tm1);
SelectObject(hfont2);
GetTextMetrics(hdc,tm2);
SelectObject(hfont1);
TextOut(hdc, ....);
y += tm1.tmHeight + tm1.tmExternalLeading;
...
...
-- modified at 5:44 Tuesday 13th June, 2006
|
|
|
|
|
Nyarlatotep wrote: SelectObject(hfont1);
GetTextMetrics(hdc,tm1);
SelectObject(hfont2);
GetTextMetrics(hdc,tm2);
I have tested that when you create the font and retrive the external leading it returns '0' mostly.
why you don't try using the tmHeight parameter of the CreateFont when tmExternalLeading is 0 without making call for GetTextMetrics repeatlly.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I could. But GetTextMetrics() is called only at the beginning of the code and not every time TextOut is called.
The question is why GetTextMetrics hangs. Never happened before !!!
|
|
|
|
|
Nyarlatotep wrote: The question is why GetTextMetrics hangs. Never happened before !!!
This may due to following.
-You have taken the device context of the printer where lots of jobs may pending
-When you get the device context of printer and textout the text the device context is in use while jobs may pending or your process is not scheduled.
-and you are trying to get/set the information of the device context which may denied as exclusive access to device context
Hope you got the issue.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
please try the following code:
---------------------------------------
hOldFont = SelectObject(hfont1);<br />
GetTextMetrics(hdc,tm1);<br />
TextOut(hdc, ....);<br />
y += tm1.tmHeight + tm1.tmExternalLeading;<br />
<br />
SelectObject(hdc, hOldFont);<br />
DeleteObject(hfont1);<br />
<br />
hOldFont = SelectObject(hfont2);<br />
GetTextMetrics(hdc,tm2);
---------------------------------------
|
|
|
|
|
Selecting the old font and destroyng hfont1 works.
But in this way i've to re-create hfont1 each time (i use it in many places along with hfont2).
|
|
|
|
|
Hello,All
I have a application by Win32.I want to package it.
Please help me .
Thanks ...
|
|
|
|
|
Use NSIS installer for packaging it..you just have to write a simple script for that.
You can download the nsis installer from here[^]
Cheers
"Peace of mind through Technology"
|
|
|
|
|
Package as in make an installer? The good free ones should be Inno Setup and NSIS.
|
|
|
|
|
Tran Ngoc Minh wrote: I have a application by Win32.I want to package it.
Please help me .
Use setup and deployment projects wizard of the VS2003
Knock out 't' from can't,
You can if you think you can
|
|
|
|