How to associate a directory with my application - c++

I don't want to associate extension but Folder. So that when I click on Desktop to tell OS to use my application, and not Explorer.
I've tried to substitute in HKEY_CLASSES_ROOT\Folder\shell\open\command explorer.exe with my program but it's not working properly cause then I open with my application also Control Panel and other stuff, which is not what I want.
Thanks!

What you want to do can be achieved by implementing a custom IShellFolder. http://msdn.microsoft.com/en-us/library/windows/desktop/cc144093(v=vs.85).aspx has the details . At a minimum you have to implement
IPersistFolder Interface
IShellFolder Interface
IEnumIDList Interface
This is what for example the Google Drive uses

Folder ProgID denotes any folders, including non-filesystem ones. Correct ProgID for your case is Directory.
Reference

Related

Is it possible for a DLL to open explorer?

Im trying to make (what I thought was a simple) extension for Game maker studio 2.
I am restricted to making a DLL app.
I am wondering is there any was to have a dll app open the file explorer have the user locate a file and then return said directory?
I fell like this is a sumb question but one I really need to know the answer too before slaving away coding for hours only to find its not possible.
You do not want to launch the explorer but to open a file dialog that allows the user to select a file.
Depending on the framework you use in your program the solutions may differ.
If you are using Qt framework you may use a QFileDialog for a platform independent mechanism.
If you are okay that it will only works on Windows then you may directly use the WinAPI functions GetOpenFileName or GetSaveFileName (that is a lot easier than the Common Item Dialog that is suggested as replacement on their documentation pages)
On GameMaker terms, you want to use get_open_filename or get_open_filename_ext.
See Dialog Module (marketplace, github) for C++ implementation reference.

Windows Edit Start Up Applications C/C++

I was looking at a project that someone wanted done and in order to do it I need to edit Windows' Start Up Programs. I am unsure of where to begin looking. What I really need is just a reference to some Windows API functions that will let me do this.
Thanks
Startup programs is just a directory, I don't think there are any specific functions for it. You should be able to create shortcuts inside and that should be it.
c:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\
As Nikola Smiljanić says the Startup area is just a directory with file shortcuts in it. However it is dangerous to use a hardcoded path because this changes with different versions of Windows.
You can get the path to the startup folder with the SHGetFolderPath function and CSIDL_STARTUP as a parameter.

windows api to create shortcut and put application in start menu

I have a client application in C++. For that I want to create a shortcut on the desktop and an entry in the start menu while installing. Is there any C++ windows api for that? I tried searching for it but couldn't find it. Can anyone tell me how it can be done?
You'll have to get your hands a bit dirty, and use COM to access the Shell. You can read here about Shell Links. Also, this project might provide you the code you need.
To get the location of the desktop and the start menu folders, you can use the appropriate System Variables.

Custom FileDialog in WinCE 6.0

I am newbie in WinCE Programming, i want to Create Custom File Dialog for our application, which has totally diffrent look and feel than the default windows file dialog....
I looked into many Flag value bt they won't worth it ...
Any pointers will be helpful
Thnks...
Mukesh
It depends on what level you're looking at replacing it. Do you want to replace it device-wide, or just for your app? If it's just for your app, create a new Dialog with the features you want and call it.
To replace it system-wide you have to have the ability (i.ee tools and BSP) to create a new OS image. You would clone the following folder in your project tree:
%WINCEROOT%\PUBLIC\SHELL\OAK\HPC\CESHELL\UI
Then modify the resource (and potentially code) files you want changes and rebuild your OS.

IE ActiveX plugin cannot create file

I wrote an IE plugin using MFC activex. The plugin actually creates a file in CLSID_APPDATA folder and writes some data inside it. But the problem is that file which is created cannot be seen (i mean i cant see any file in CLSID_APPDATA folder on windows vista) whereas I am actually writing data inside it. The plugin is not signed.
I have the code from http://support.microsoft.com/kb/161873 to mark my activex component as safe.
Please let me know if I need to do something more to make it possible for file creation. I hope I was clear. Do let me know if I need to provide more details.
regards,
Pradip.B
It sounds like you're falling foul of IE's "Protected Mode" which redirects file writes made from IE from \Users\UserName\Local\ to \Users\Username\LocalLow (or something very similar to that).
Take a look at the following links as they should point you in the right direction:
More details on Protected Mode IE in Windows Vista
The difference between Local and LocalLow folders