0
votes

Well, I am facing a strange problem. I have developed a sample MFC ribbon application on my machine - Windows 7 , with Visual Studio 2008. When I copy paste the .exe onto my laptop and run the app , I don't see the ribbon menu (in fact the app has not menu now) .

I have tried looking up the .dll that load in each case(on my work machine and laptop) using process monitor but I am unable to locate what I might be missing. Any help will be greatly appreciated.

Edit 1 -

Ok, So thanks for your responses. Some progress has been made with this issue

  1. I changed my IDE to VS 2010. The ribbon was coded manually and I figured out if I could add it as a resource maybe the problem would be solved. VS 2008 did not have the option of adding a ribbon as a resource.

  2. I installed the VS 2010 Service Pack Redistributable X86/X64 depending on whether the machine is 32 or 64 bit.

  3. I built a new "ribbontest.exe" app from VS 2010 and deployed it on other machines on which I would test my actual app. The ribbon for "ribbontest.exe" loads without any problems.

When I deploy my app and run it, first the old menubar loads for a sec or two, then the ribbon flashes and disappears.

A little history of the app I am referring to - Initially my application had the menubar view. I followed this article http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c14929/MFC-Feature-Pack-An-Introduction.htm to accommodate a ribbon.

Any suggestions?

3
Is your laptop running Windows 7?Cody Gray
The ribbon control's xml is loaded by a MFC dll, off hand i forget which one vc 08 used to do this with, without that dll the ribbon will fail to load the ribbon and other resources.johnathan
Manifest is a part of application in the app’s resources.JohnCz

3 Answers

2
votes

Most likely there's a conflict in the settings 'paths'. In your InitInstance() handler, you've got a statement like this:

// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
SetRegistryKey(_T("yourappname"));

If you haven't changed that name yet, do it. If you did, open regedit.exe on your target machine and remove the whole key under HKCU\Software\yourappname and then try again.

MFC stores user customizations of Ribbons/Menus/... under that key. But if you changed your app those settings don't necessarily match anymore and you can end up with stuff not showing correctly or not at all.

0
votes

Make sure you download and install the Visual C++ Redistributable Runtime on your destination machine: http://www.microsoft.com/en-us/download/details.aspx?id=29

Or, something like it. Make sure you have architecture (x86/x64) correct and make sure it matches with the service pack version you compile with.

-1
votes

Joe is right: you need redistributable.

Joe is right: you cannot run 64-bit program on 32-bit machine.

All of the above would be indicated by the system (missing DLL, configuration incorrect, or 64/32 bit discrepancy)

Joe is right: your application must be built for specific set of minimum Windows version and service pack.

In addition to Joe’s post you must run release build not debug build. If all of those requirements are met and you still have this problem, try linking MFC statically and see if problem persists.