Load Application on Windows StartUp - c++

I'm developing an Windows DLL and I want to know more about windows c++ programming.
The first problem I'm facing is know how to load my application when Windows is loading?
There is any guide on Windows Documentation describing that?

There are 2 ways that I know how to do this:
1) You can create a shortcut to the .exe in the autostart folder
2) You can add the .exe in the registry at Software\Microsoft\Windows\CurrentVersion\Run

You can load your application when windows startup by copying your application to startup folder please refer http://windows.microsoft.com/en-in/windows/run-program-automatically-windows-starts#1TC=windows-7
Also refer http://windows.microsoft.com/en-in/windows/run-program-automatically-windows-starts#1TC=windows-7

Related

How to get the directory of launched wxwidgets application in mac?

I have C++ application built with the help of wxwidgets, I would like to know how can we find the application directory of the launched application, I figured that using wxStandardPaths::Get().GetExecutablePath() I get application path in mac which is something like /library/application/abc.app/macos/contents.
All I need is to extract till /library/application, is there a way to do it in wxwidgets?

mfc100u.dll missing when running application on another computer

I have an MFC application which asks for missing dll in subject line when I run it on another computer which doesn't have VS2010 installed. I have come across solutions which says I have to install VS2010 redistributable package but really? Do we have to install that on every customer computer? That doesn't seem very good.
The interesting thing is that I have another MFC application which does the same thing as the new dll but it doesn't need the mfc100u.dll so I am confused.
Which dll your app depends on is something you can figure out with the dependency walker tool that used to come in every VS installation (now freeware)
Redistributables are packages which should be installed when deploying applications on clients pcs. Installers usually do this automatically (and often silently) to ensure that your application will have all its dependencies met.
So yes, you need to
A) figure out all the dependencies of your app
B) figure out which packages you need and then deploy them alongside your app when installing it
That's why installers are so common in the win world
There is a build setting where you choose whether to use the MFC DLL or to link MFC into your exe file. If your app consists of only the single exe file then using static linking would eliminate the need for the MFC DLL. Look for the "Use of MFC" setting in the project properties.
P.S. This setting is actually two settings: One for the debug configuration, one for the release configuration.

Deploying Qt Qml App to Windows shows me a blank window

After suffer with a lot of problems trying to deploy a Qt/Qml app to Windows 8, as I described in this question: Deploying Qt Qml app to Windows 8 shows me a blank window
I could make it work copying the Qt5Widgets.dll... but it was only working in my own development machine (installing it there, but yet my own machine).
Then I tried to install it in another machine (a VM running Windows 7).. and at first I got error of missing platform plugin... ok, I copied qwindows.dll to appDir/platforms, and it seems to resolved this problem.
But then I got another missing dlls errors (the ones related to VS2010), then I installed the Visual Studio 2010 redistributable package... ok, now the app starts, but with a blank window :(
The qml files and everything are in a resources file, so it should be in the binary.
And I've no idea where to go from there to find this issue.
Any idea what can I do? The weird thing is that it was installed fine in my own development machine.
And my conclusion is that deployment of Qt in OS X is much easier.
I've solved the problem with these steps:
check your qml files path. For example default generated code is the following:
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("qml/test/main.qml"));
So qmls should be in "qml/test" folder
check the missing dlls:
download VmMap tool from Windows Sysinternals suite (http://technet.microsoft.com/en-us/sysinternals/dd535533)
compile and run your app in qt creator to get it working like it should
run VmMap and open your running app's process.
sort the lower window by 'Details' - so you'll see all loaded DLLs sorted by path.
copy the missing dlls. It should work now!
I've had also a lot of trouble deploying Qml apps with a blank window too.
In general this site gives useful hints:
https://qt-project.org/doc/qt-5.1/qtdoc/deployment-windows.html
The blank window issue was caused be two different things in my case:
The relative path to the qml files were not correct. I've solved this by storing the qml files in a resource file and then calling them from there.
It seems to be a problem if the application is located on a network drive. I haven't found a solution for that except copying the application to a local folder.
In general I think deploying is a big big pain :-/

How to debug code that was attached to a .exe

I'm developing a plugin for InDesign CS5.5. And when developing a plugin you can't really debug if you don't have the debug version of the program you're developing for(in my case, indesign).
I tried to get the debug version from adobe with no success. A lot of bureaucracy.
So my question is: Is there a way to attach a debugger(or something else) so I can see where the code is going to?
I'm really tired of typing "MessageBox".
Thanks in advance.
For indesign plugin development c++ is used by the way.
If your plug-in is a dll that's loaded dynamically, you can attach Visual Studio to the process, set breakpoints, and step into your dll's code. To attach to an existing process, just go to debug -> attach to existing process, or try the shortcut Ctrl+Alp+P IIRC.

How to get list of themes (Theme name) installed in Windows 7?

I want to write an application in MFC which gives me a list of theme installed in windows 7.
Which library or dll provide the themes so I can use it in my application to change the theme using my application or can I have code snippet ?
Regards,
Mehul.
Enumerate files under %WinDir%\Resources\Themes and %AppData%\Microsoft\Windows\Themes.
The format of .theme files is documented at http://msdn.microsoft.com/en-us/library/windows/desktop/bb773190(v=vs.85).aspx