From: X-N2O on
On Feb 23, 8:06 pm, Ajay Kalra <ajayka...(a)yahoo.com> wrote:
> On Feb 23, 1:56 pm, X-N2O <ledio...(a)gmail.com> wrote:
>
>
>
> > On Feb 23, 7:32 pm, "Tom Serface" <t...(a)camaswood.com> wrote:
>
> > > If you upgrade to 2008 you'll get the benefit of the MFC Feature Pack which
> > > has a lot of theme capabilities.  Other than that you could use a library
> > > like that found atwww.codejock.comwhichoffersa lot of control over look
> > > and feel.
>
> > > One problem with the manifest approach is you're not going to get the same
> > > look when you run your software on different platforms.  That may not matter
> > > to you, it does to me because of documentation and support, etc.
>
> > > Upgrades to VS 2008 are going pretty cheap right now with 2010 looming
> > > (their words not mine):
>
> > >http://searchwindevelopment.techtarget.com/news/article/0,289142,sid8....
>
> > > Tom
>
> > > "X-N2O" <ledio...(a)gmail.com> wrote in message
>
> > >news:d133da1a-cf9c-4223-955a-a5b6d5e2af42(a)k11g2000vbe.googlegroups.com....
>
> > > > Hi,
> > > > I've been using msvc6 for a year now, and I prefer it over any other
> > > > IDE for Windows development.
> > > > However, I've never had to deal with MFC. I decided to make msvc6 have
> > > > an 'xp style'. At first, I tried by including a manifest file in it's
> > > > resource section. That seemed to work only for some controls, but all
> > > > of them, most controls were still unchanged. Then I applied an inline
> > > > patch to call InitCommonControls, but that had no effect either. While
> > > > seeing the unchanged controls' properties in Spy++, I noticed they
> > > > didn't have normal window class names. I believe those classes were
> > > > implemented as custom controls in mfc42.dll. Any idea of how I could
> > > > replace those control classes with ones that xp style is applicable
> > > > with? I don't know anything regarding how MFC works, in assembly
> > > > level. I know this has been done before.
>
> > Hi, thanks for the reply.
> > I think you got me wrong.
> > I'm not looking to make MFC applications with themes etc.
> > This is about msvc6. It was coded using MFC and it uses mfc42.dll.
> > By modifying the program itself through inline patching (MSDEV.EXE), I
> > was trying to make the already compiled application have xp-style
> > controls.
> > If I had the source code it would have been easier.
>
> So you are modifying the binary?
>
> --
> Ajay

That is right.
Here is a screenshot: http://i.imgur.com/tUg1t.png
The 'Open' dialog is affected by the manifest file i inserted into the
binary, while the toolbars and most of the controls in the main window
are not. They are clearly custom controls, that probably reside in
mfc42.dll. I wanted someone to confirm this, and tell me how I could
replace them with other controls from newer versions of MFC.
From: Giovanni Dicanio on
"X-N2O" <ledio777(a)gmail.com> ha scritto nel messaggio
news:c44ce27e-6035-4bbd-b0f7-9d74c7fb467d(a)v36g2000vbs.googlegroups.com...

>> So you are modifying the binary?
[...]
> That is right.
> Here is a screenshot: http://i.imgur.com/tUg1t.png
> The 'Open' dialog is affected by the manifest file i inserted into the
> binary, while the toolbars and most of the controls in the main window
> are not. They are clearly custom controls, that probably reside in
> mfc42.dll. I wanted someone to confirm this, and tell me how I could
> replace them with other controls from newer versions of MFC.

There is a great add-in for VC6 called WndTabs:

http://www.wndtabs.com/

Source code is available, as well as an article on CodeProject.
The add-in injects some code in VC6 IDE (which is written in MFC) and does
some magic.
You may find that useful for your purposes...

Giovanni