Make a custom taskbar and shell area for my own custom explorer program? - c++

What I would like to do is to create my own custom explorer instead of windows explorer.exe but I would like to be able to create my own taskbar with the active programs and the shell area with the icons as well.
I looked online for a day and can't find anything out about. My main language is c++ and I am very familiar with the windows api calls, resources, and even extracting resources from dlls as well.
I just don't know how to start with the task bar.
Like I said I want to be able to make my own explorer program for windows with the taskbar and all.
I just don't know where to look or start.
Thank you all :)

Related

Taskbar extension (like contacts)

In Windows 10, you can activate different buttons (e.g. task view button, windows ink workspace button, contacts button) by opening the context menu of the taskbar.
This is something different than the classic tray icons, and similar to deskbands (which has been deprecated?).
An example of the contacts button:
How can one achieve this? Is there a API for this? Are there documents available?
I think that you might be interested in Shell Extensions/ Taskbar Extensions - Deskbands, please refer to following web-sides for more informations:
https://learn.microsoft.com/en-us/windows/desktop/shell/taskbar-extensions#deskbands
https://msdn.microsoft.com/en-us/library/windows/desktop/ff468984(v=vs.85).aspx
How to write a shell extension in C++?
https://msdn.microsoft.com/en-us/magazine/dd942846.aspx
Perhaps the Taskbar API of Windows should be helpful in your case. Please note that the explorer.exe would be responsible for loading your extension, so that writing it in C# might have some limitations due to different CLR runtimes loaded.
It's commonly called a tray icon or NotifyIcon.
The official class is still in Windows Forms, if you want to be more modern have a look here on what your options are in WPF.

How to create an Evernote kind of widget for global menu of a MacOS/X desktop using QT?

How to create an application which stays in top of MacOS, something similar to below image. You can see the Evernote elephant icon.
I don't want to use xcode - because my application already built in QT, it has nice GUI, now I wanted to add extended feature something similar to Evernote. If I click on an elephant it will open a dialog box to write notes. In my case- it's a simple event like on/off buttons.
I have tried and created GUI widget apps but how to make one which resides like Evernote app ?
A custom pop up menu like the one pictured can be done several ways in Qt.
QML is the most modern way of making the menu with the customized styling you are looking for.
Apply the appropriate flags to the window/widget so it appears as a popup.
The same effects can also be done in QWidgets, but takes more code and probably will take longer to make. The flags you are looking for will be found under Qt Window Flags and/or under Qt Widget Attributes.
The stock stylings for Qt for different OS's deal mostly with title bars, status bars, buttons, drop downs, etc.
The base styles for Mac can be found here:
http://doc.qt.io/qt-5/gallery-macintosh.html
Once you go to a customized popup, you have to draw all of it yourself... but the native drawing elements in Qt are friendly enough and get you that look you are trying to do.
There are even some tools for exporting from Photoshop or Gimp directly to QML.
http://doc.qt.io/qtcreator/quick-export-to-qml.html
Hope that helps.
You are looking for a tray icon. Qt implements it in QSystemTrayIcon.
Further information
You may take a look at the System Tray Icon Example.
Many StackOverflow posts exist on this topic.
If you already have a program written for Qt, then you can compile and run it under MacOS/X much the same way you could compile it under (whatever OS you're using now). You'll need to install Xcode because Xcode includes the C++ compiler (clang) you'll need in order to compile your Qt program, but you don't have to use the Xcode IDE if you don't want to. Rather, you can either use the QtCreator IDE under MacOS/X, or you can simply open up a Terminal window and do a "qmake ; make" in the directory where your Qt-based program's .pro file is, and build it from the command line that way.
If, on the other hand, your question is actually about how to add an icon to the global menu of a MacOS/X desktop, then I don't think Qt has an API for that, so you'll need to drop down to using one of MacOS/X's native APIs. That will probably involve learning some Objective-C (or Objective-C++, if you prefer), but integrating a bit of Objective-C/C++ into your Qt app is doable with a bit of work.

Trying to write a c++ console program to change a setting controlled by a windows checkbox

Is it possible to create a keyboard shortcut to switch between the monitor and portion selection of this wacom preferences window, via a c++ console program?
Sorry if this is poorly worded, I've had trouble trying to find the right words to search for ways to do it.
I think it should be possible, although a bit tedious. You should be able to use the Windows API, and try to EnumWindows/EnumDesktopWindows to identify the respective application Window, and its respective controls (which are also Windows).
You should identify the window title, and class ids, for the app window, and the checkbox button controls, then when you enumerate through all the desktop windows, you can identify the ones you are interested in.
Then you can use the SendMessage() API to send messages to the controls (Windows) of interest to manipulate them.
It's a bit tedious, but sounds possible.
An example of use here to get an idea:
http://www.cplusplus.com/forum/windows/25280/

Is it possible to embed a command prompt in a win32 app?

In linux and when installing packages etc. There are some installers that have a progress bar and a dos window which shows the files being extracted etc. How can i add this window to my C++ Win32 programs so that i can have it showing the tasks im doing? I cannot find any documentation on MSDN.
Question: How can i add a console window (if that's what its called, sure looks like one) in my program to show the details of the task at hand being done?
Here is a window with what i am asking.. (personal info so I erased the details. :]
You cannot embed a real console window inside another window (although a windowed process can have a separate console window). While it looks like a console window / command prompt, it is just a matter of appearances. What you want to do is create a sub-window/control with similar characteristics as a console window and then redirect the console output from the application(s) being run to append to that sub-window. For more information on how to do redirect the console output in Windows, see http://support.microsoft.com/kb/190351.
That "dos window" is a regular edit control: CreateWindow(ES_MULTILINE, EDIT, ...
However, it has the font set to a fixed-width one (Looks like courier). This is done by sending WM_SETFONT to the edit control.
#user995048 says "You cannot embed a real console window inside another window". But "cannot" is a strong word! I can run an entire virtualized computer in a window if I wish. :) So one can quite reasonably intuit that there are ways of doing what you say.
Sure, it is true that what you've seen are almost certainly cases of output redirection into a custom widget, designed to mimic the simple appearance of a terminal. However...if you want to embed one application's window inside another, there are things you can look into which might fit. Cooperative methods exist like GtkPlug, for instance:
http://developer.gnome.org/gtk/2.24/GtkPlug.html
To actually capture a not-designed-to-cooperate app's window and throw it in your app would be trickier. But possible, just as screen captures and virtual machines are possible. Probably best to avoid that sort of thing unless there's really a cause for it, though...
Try this
http://www.codeguru.com/cpp/misc/misc/article.php/c277/
link. I think the solution provided is what you need.
I tried it many years ago and it worked. I have not tried it in newer versions of windows though.

Portable way to hide console window in GLUT application?

Hey, I'm creating a little GLUT application and need help with hiding/removing the console window.
I am developing on windows and I already know of the various methods to hide the console window on a windows system, however is there no portable method of hiding it?
Thanks...
You don't really want to "hide" the console window. What you want is to configure your compiler to generate a "Windows application" instead of a "Console application". That will tell windows to never create a console for your application. You'll need to consult your compiler's documentation to figure out how to do that. For Visual Studio, it is a step on one of the wizards.
There isn't really a good way to control the console inside of a console application. The console is designed so that the application knows nothing about it. While it is possible, as you said, it's not very portable or clean.
The correct approach if you need fine-grained control over the "console" is to implement your own window which provides a text output area where you can print things. Then you can do pretty much anything with your "console" because it isn't really a console, it's just another window owned and operated by your application.