map-mode for CView DC is default (MM_TEXT), for printer is:
const int iLogX=dc.GetDeviceCaps(LOGPIXELSX);
const int iLogY=dc.GetDeviceCaps(LOGPIXELSY);
lfHeight of LOGFONT is -11.
after the LOGFONT has been selected to DCs, I use GetTextExtent() function to obtain text's height.
for CView DC, text height is 14.
for printer DC, text height is 12.
how to change lfHeight of LOGFONT to keep same height for text in both CView and printer DCs?
Your text height is being scaled based on your window/viewport settings.
You've hardcoded 100,100 for the window extent so I guess you can adjust those up or down until
GetTextExtent() returns equal values for both DCs.
I m creating a MFC Dll -> Regular Dll with statically linked MFC.
In this Dll project, I have a Dialog Box. I tried to create a Web Browser on this dialog box in two ways:
1: Insert ActiveX control
2: Using CHtmlView class
In both cases, I failed. No compilation err generates.But,
--->> If I use first way (Web Browser Control) even dialog box not created.
--->> If I create CHtmlView object at runtime using Create(..) function, Assertion Faied err generates when I call Create function for CHtmlView object.
CODE IS AS BELOW:
//Global function in DLL App class #####################
BOOL __stdcall ShowFiles()
Could you be more specific about the error that occurs? Cause, I don't agree with Steve about the .h .... I mean I use it all the time and it work ????
Steve is right, you shouldn't use .h with the standard C++ Library. Older compilers may ship with both fstream.h and fstream, but VS05 does not.
Before C++ got standardized, C++ headers files were still like C headers, with .h extension. But the standard C++ put all those header files under std namespace, so they rename all of them without .h extension.
I want to copy all my favourites to some other USB Drive through programatically.
For that if i use SHFileOperation option to copy all tha favourites into my drive...The copied files are not copied as Internet shortcuts they just copied as files.
For that I retrive URLs and want to create internet shortcuts for that URLs...
Do u hav any idea regarding this favorites importing to our program ?