|
If it's your own IE, then just change your Page Setup, or change the registry.
Otherwise, you got stuff here[^].
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
I need to have ATL and MFC in an object and was wondering about the best order to do this, via the VC++ 6.0 wizards. Is it best to creat an ATL object then add MFC support, or create an MFC object and then add ATL support?
I have looked at the tutorial:
How to use an ATL-control with MFC
By Franky Braem
And he does it with MFCs first, followed by ATL.
I've had conflicting advice from colleagues, and wondered about the advantages/disadvantages of the order. Although it doesn't really matter superficially as long as it works(!), I'd like to feel I understood it more.
Anybody know more about the mechanics of this?
Debbie
|
|
|
|
|
The two don't overlap. But you need to know if you intend to build a stand-alone app, or an ActiveX control.
For a stand-alone app, use the MFC class wizard, because it provides the SDI/MDI framework/dialog. Then separately use the ATL wizard to create a code skeleton, and inject the resulting code in your MFC app.
The ATL ActiveX control wizard uses both ATL and MFC (the class wizard doesn't provide the dov/view framework).
Of course, it is always possible to arrange things to make it work anyway.
MFC are usually shared at run-time (MFCxx.dll automatically loads) : _AFXDLL symbol.
ATL are usually statically linked. (atl.dll does not load unless you add the _ATL_DLL symbol.)
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
I'm afraid my knowledge of activex controls is somewhat limited, but I don't think my objects under development come under that label.
I need two objects (at the moment): One is an executable that provides a dialog box to list available tools (bit like a control panel). The other is a dll that gets listed in that box and gets executed as a modeless dialog box itself. They communicate using a COM interface.
So, if I've interpreted your comments correctly, I would imagine the MFC first approach would be best for these sort of objects?
Incidentally, I did follow the tutorial in CodeProject, and it doesn't use the ATL wizard separately as you've suggested, but it adds an ATL object, and this seems to work ok. Maybe there are overheads, but I'm not that worried about efficiency for this app.
|
|
|
|
|
- for the executable : MFC, dialog-based wizard. You'll instantiate the COM object thanks to CoCreateInstance. Don't forget to initialize COM first : ::CoInitialize(NULL) . No ATL at all here, probably.
- for the DLL : the ATL wizard is just fine. It provides an idl file to work with, and automatical COM registration in the makefile. (ATL samples from the MSDEV cd are helpful as well).
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
How can specify a discontinuous range in the propery 'Values' in a chart serie.
I've tested with: serie->Values = "=E_1!R1C1:R3:C1;E_1!R5C1:R7:C1" but I obtain an error 1004.
Thanks.
|
|
|
|
|
"=E_1!$A$1:$A$3,E_1!$A$5:$A$7"
(used with a French Excel, ie some chars may change).
btw, your formula range has 4 :, which is wrong.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
I've tested this with a combination of english Windows + english office, but I need it work in both, spanish and english systems.
|
|
|
|
|
I have a problem with the macro IMPLEMENT_SERIAL in VC7.
What I have is a BaseDLL containing BaseClass which at compile time is exported from the dll.
class __declspec(dllexport) BaseClass : public CObject
{
DECLARE_SERIAL(BaseClass)
...
}
I also have got a DerivedDLL containing DerivedClass and AnotherClass. At compile time it would look like this
#include <basedll baseclass.h="">
class __declspec(dllexport) DerivedClass : public BaseClass
{
DECLARE_SERIAL(DerivedClass)
...
}
class __declspec(dllexport) AnotherClass : public BaseClass
{
DECLARE_SERIAL(AnotherClass)
...
}
When compiling DerivedDLL, BaseClass has the following look
class __declspec(dllimport) BaseClass : public CObject
{
DECLARE_SERIAL(BaseClass)
...
}
In the implementation file of DerivedClass and AnotherClass I have
IMPLEMENT_SERIAL(DerivedClass, BaseClass, 1)
IMPLEMENT_SERIAL(AnotherClass, BaseClass, 1)
This IMPLEMENT_SERIAL macro doesn't seem to work correctly (although it seems to work in VC6). When adding the classes to the DerivedDLL's list of run-time classes one of the classes is cut off and later on the program can't find the run-time class of AnotherClass.
I've found out that if I exchange BaseClass to CObject it works, but I don't know if it works correctly.
If I move BaseClass from BaseDLL to DerivedDLL it works, but I don't want BaseClass in DerivedDLL.
If I make sure that when compiling DerivedDLL that BaseClass is declared dllexport it works, but it might give me problems later since DerivedDLL doesn't have the implementation code of BaseClass.
Does anyone know why it doesn't work in VC7?
Does anyone have a safe work-around to the problem?
Is there a bug in the VC7 compiler?
|
|
|
|
|
have you put:
IMPLEMENT_SERIAL(BaseClass, CObject, 1)
in the base class?
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
|
Is your .dll 'MFC extension DLL' or rather 'MFC regular DLL'?
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
Both DLL-files are built as 'MFC Extension DLL'.
|
|
|
|
|
I want to chage the font that uses CTreeCtrl to draw the text items but I don't know how to do. Can you give help me ?
|
|
|
|
|
|
I write a view from CHtmlView to display a html file. But the file is very large. I should pagedown many times to the end.
My problem is how can the view remember the line I read last time? Next time I open the view it should goto the line I read last time.
|
|
|
|
|
Create an anchor <a name="..."> in your html file.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Hi, Is there any way of retrieving the process/module version through the PSAPI?
Thanks in advance
Black ghost
|
|
|
|
|
No, PSAPI is not meant for that.
Once you've got the process name, just use the ::GetFileVersionInfo to get what you're looking for.
Note : you will have to include <winver.h> in your code, and link with version.lib.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Hi. I've read that the "MS Shell Dlg" font refers to the system-wide font used in menus, edit boxes, etc. How do I create a CFont object for that font? I'm trying to dynamically create a CEdit control which uses the basic "MS Shell Dlg" font.
Thanks,
Dave
|
|
|
|
|
Daaave wrote:
How do I create a CFont object for that font?
You can't. "MS Shell Dlg" is not a real font; it is a special name recognized only by the OS code that parses dialog templates. To get the font used for dialogs, call GetStockObject(DEFAULT_GUI_FONT)
--Mike--
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Sweet thanks man
|
|
|
|
|
I have a Web Browser control and want to download external files like images, *.css, *.js and etc.
The SRC attribute of <IMG> <LINK> <SCRIPT> can contains absolute and relative URLs. How to correctly obtain full URL for these files? May be there is a ready system function to download such files? I tried URLDownloadToFile, may be I must try URL monikers?
Thanks!
|
|
|
|
|
window.location.href is the actual URL. Just parse this, and add your resource name.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Well, I finally got a hold of Visual Studio .NET and now I'm trying to rebuild my DLLs which contain a bunch of MFC-based classes. I'm getting tons of errors, the first of which I don't have a solution for.
I have a string class which derives from CString and uses the old m_pchData protected member from 6.0. So now since apparently it's no longer in CString, I get a 'm_pchData' : undeclared identifier error.
What should I do? My class needs the equivalent of this member variable.
Thanks,
Alvaro
Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein
|
|
|
|