The project has to be fully working on our teacher's computer, so no plugins or external libraries are allowed, whatever resources we can use has to be already installed on CodeBlocks, GNU Compiler vanilla version. Also this is our first proyect so any tips on this matter would be wellcomed .
This seems like a question that should be easy to find an answer to, but I'm not finding anything very convenient...
What I will want to do with this, is to be able to right-click on a folder in Explorer, and have an item "run my program on this folder" available...
I've found two example programs which do this, but each have drawbacks for my application;
1. one is a C# application (which I'm not familiar with, though it *is* pretty similar).
Also, this CodeProject application is using registry modification to do the job; I would prefer to find a link somehow to the Explorer menu, then use InsertMenuItem() from WinAPI to add a link to my application...
2. that brings me to the second example that I found; it's in an older Platform SDK, in a utility called Shell\SampView... that application *does* do what I wish; however, that application is over 8500 lines long!! I am hoping to find a more concise solution to the problem...
Can anyone provide any guidance or example code for this??
I use C++, and build with the MinGW (32-bit) toolchain...
and yes, I realize that once I get *this* issue resolved, I'll still have a variety of other issues to resolve, such as finding the path to my application, and dealing with selection of wrong items (ideally, perhaps just grey out my menu item if the target is not a folder), and many other things, but for now, I just want to find a concise, clear solution to this one problem.
[ error handling omitted for clarity ]
to gain access to elements under Program Manager...
For one thing, the ShellAPI process would eliminate issues with permissions, which I might have with Registry access..
Anyway, I'll look into the links you've mentioned, and try those out.
If you depend on your application code making those changes, your app would have to run first before being able to use the Explorer context menu. Your code would also have to remember to remove those changes when it closes or upon uninstall.
Doing it through registry pokes eliminates those problems and makes them permanent until uninstall, which can be handled entirely in the installer, not your code.
That's a good point...
for most situations that I'm thinking of using this tool, I wouldn't be removing the link once it was installed; it would be for situations such as "open this file in MyEditor", or "run MyUtility on this folder"... but yeah, initially creating the link has to be considered, in either case; My plan was to check for existence of my link when running the program, likely in WM_INITDIALOG.. if it's not there, create it.
I mostly write small utilities, so don't always use a dedicated installer...
If you are interrupting the drawing process then that is probably what you would expect to see. The system erases the background and then expects your code to draw the entries. But if the drawing is prevented from happening it will show empty space.
I am not sure that you should be using CB_GETLBTEXT to get your items for drawing. The usual process for an owner drawn control, is that you would have your list of items somewhere in your application. However, it is some while since I have done this so would need to review my code.
I need to detect BackSpace as well as Delete Key in a Edit Box placed on Dialog Box in a Dialog based Application. The Problem is that Edit Box has no more Events like WM_CHAR, WM_KEYDown and WM_Key Up.
I want to start learning C++ and create kind of windows applications like what is made in C# and WPF. I have three options: VS 2022, Code::Blocks, and QT creator 6. Which one is good for developing elegant windows applications?
I had to look up Code::Blocks and noticed that it incorporates wxWidgets. I don't develop GUI apps, but when I looked into the area a while ago, I bookmarked wxWidgets so I could return to it if I ever needed to. C++ doesn't have a GUI library, so you have to find one. And if you want to support different platforms, not just Windows, you need something like wxWidgets, not WPF.
As far as an IDE goes, VS2022 (Community Edition) is free and an excellent IDE. You can probably develop using wxWidgets within VS2022, but you'd likely have to spend some time configuring it, whereas Code::Blocks looks like it should work immediately. But I know next to nothing about this, so you need to get input from someone who does.