NetUIHWND and DirectUIHWND [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Using Spy++ tool, it seems that some Microsoft apps use NetUIHWND and DirectUIHWND window classes; e.g.: Word 2010's ribbon seems to be a NetUIHWND, instead Windows Live Messenger window seems to be a DirectUIHWND.
These window classes seem to host kind of cool graphics (with shadows, gradients, etc.); is it possible to use these window classes in our own Win32 C++ apps? Is there any documentation about them?

Yes, it has been around for a while already. But it gets especially a lots of usage in Windows7. Unfortunately, they keep this one to themselves, it is undocumented. You can try to reverse-engineer it, use a ListView as a guide to what it might do. But your code will almost certainly break in the next version of Windows. Which I think was the point of not documenting it, they need something they don't have to keep backwards compatible to be able to improve the look-and-feel of the operating system.

NetUIHWND and DirectUIHWND are the Win32 class types for different GUI toolsets.
From Win32 perspective they are a self drawn panel.
So you wouldn't use these classes directly, you would use the other GUI toolsets to build the UI.

Not sure about the Messenger UI, but you can use the ribbon control in your own apps.
On WTL: https://www.codeproject.com/Articles/54116/Relook-your-Old-and-New-Native-Applications-with-a
On MFC: https://learn.microsoft.com/en-us/cpp/mfc/reference/cmfcribbonbar-class

Use the Microsoft Active Accessibility API:
There is no need to reverse engineer this thing, you can enumerate this class structure using the Microsoft Active Accessibility API.

Related

Cortana from Win32 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
This is a rather directionless post I'm afraid an I apologize. I'm trying to figure out how to use Cortana from win32 (non universal) applications. I found this link but I can't tell if there is a way to access these APIs from non-managed code. That sent me on a rabbit trail to find out what this UniversalApiContract stuff is and how to use it form native code but so far I am coming up very empty.
Could someone please provide me with some direction!! What do I even need to search for to begin to learn how to access these APIs natively? Is there some reading on windows runtime that I should undertake?
Thanks in advance and again I apologize for the general questions - not sure where else to turn.
[Expressed displeasure over how many people voted to close the thread without any useful response or suggestions]
Now, on to science.
After spending some time with this it would seem this is not possible. I was able to call the API from Win32 by using the Visual C++ Component Extensions. This allows you to use windows runtime and CLR like concepts but results in purely native code. As a side note, since I wanted to link this with an application that I did not want to recompile with this extension, I did this in a DLL and delay loaded it.
Unfortunately the call to install the voice command definition file failed with a COMException: The process has no package identity. This means I can successfully call the API, however it requires a package identity - in other words, it must be called from a Modern/Store/Universal App context with an application identity.
The only way remaining to me seems to be to use the Cortana background API to interface with a modern app I write in the background, and use it to broker calls from my Win32 app to Cortana through some sort of custom communication. Icky.
I hope this helps save someone else time.

Cross platform way to create file dialog in C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am writing an application in which I need to be able to browse for an existing file and to create a new one. I need to create user interface for that. Is there any good cross-platform free library to help me do that?
If you're not already using a cross-platform UI library, then it doesn't make a lot of sense to introduce a dependency upon a huge library just to display a file dialog.
Since recommendations for a cross-platform UI library have already been hashed out repeatedly in other questions (use the search feature to find them if you're interested) and are probably off-topic anyway,
I'm going to take the liberty of assuming that such is not your question.
Therefore, the answer is that no, there is no reliable, cross-platform way of creating a file dialog. Each platform provides a different interface/API for this, so you'll need to write code to detect the current platform and then display the dialog as instructed by each platform's documentation.
You can do this either at run-time (if you want to have a single binary), or at compile-time by using conditional compilation (#if statements).
This is basically all that any UI library would be doing, and for such a simple requirement (a single feature) it makes sense to me at least to just do that work yourself.
You can give wxWidgets a try, a GUI library in C++, free, open-source,... and work with the native graphics libraries.

Recommend fast C++ UI library with small memory footprint [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to write an app that reacts for global shortcuts and accepts commands (the way launchy does).
I'm trying to minimize the time between pressing the shortcut and the moment the window appears on the screen and is fully operational.
Can you suggest a good UI library (with some argumentation) that could be helpful?
I looked into QT and wxWidget but I'm afraid the app will get heavy (in memory / processing speed way) - and all I need is a small window that doesn't even need to be pretty.
.. or should I just go with native Windows libraries? (the main target is my Windows 7 machine)
Fast? Small? Windows-only? Sounds like you want WTL.
Caveat: You'll need to use VC++.
Also, I recommend grabbing the source straight out of SVN, as a new release hasn't been packaged in quite some time despite the fact that the project gets updated with some regularity.
I recommend FLTK!! www.fltk.org
Win32++ no mfc required neither ATL.
If you already know the winapi this is definitely for you. If not it helps a lot.
http://sourceforge.net/projects/win32-framework/
http://www.codeproject.com/KB/winsdk/framework.aspx
If you want the smallest memory footprint and are using windows just directly call the winforms routines provided by windows. This eliminates all the code in all these third party libraries. It's smaller and will be faster.

Looking for an application GUI library for C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm thinking about writing a very simple paint program. I would like a more advanced method of inputting data into my program like colors, thickness of the brush, etc. I would like to use a GUI library so I can program buttons and menus to make input easier.
Any suggestions?
(I'm running Visual C++ 2005 SP1)
Qt is a pretty solid GUI application framework. It is cross-platform, well documented, supported, and free.
wxWidgets is a cross-platform, open source GUI library that has some nice graphics features.
Does GTK+ not suit your needs? It has a lot of advanced controls for handling colour input (being originally design for GIMP). gtkmm is:
the official C++ interface for the
popular GUI library GTK+. Highlights
include typesafe callbacks, and a
comprehensive set of widgets that are
easily extensible via inheritance. You
can create user interfaces either in
code or with the Glade User Interface
designer, using libglademm. There's
extensive documentation, including API
reference and a tutorial.
Qt is also a possibility. Both will allow you to write [mostly] platform independent code.
Why not use either ATL or MFC, as they're both supplied with VS2005 anyway...
Another option would be WTL, which comes recommended by some former colleagues of mine.
A few of your options:
Win32 API
Qt
.NET framework (using C++/CLI)
wxWidgets
My usual choice: Win32 API
My recommendation for you: Qt
EDIT: Actually a simple paint program sounds very doable using only Win32 API and GDI+. If you feel brave enough, then you may want to give that a try. (I tend to be kind of biased to lightweight solutions.)

Register hotkeys in Linux using library for c++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
are there any libraries for Linux wrote with C++, that could register global hotkeys for my application? Thanks.
You'll have to provide more information.
In Gnome, the global functionality varies by window manager. Metacity has configurable global shortcuts, as do Compiz and Sawfish, and they're all configured differently. Xhotkeys can also be used for the same functionality. However, these are all limited to starting applications only.
Within the KDE application framework, KAction can register global shortcuts which perform actions inside your program. These are actually handled by a module in kded (launched on demand), so they work even outside of the KDE desktop environment.
If you don't use the KDE framework, but are still using X11, you can use the xlib API to call XGrabKey on the root window.
For shortcuts that work outside of X, as long as you are running as root (or permissions are changed permissively) on a 2.6 kernel, you can directly open /dev/input/event*, and poll for the desired key events.
I wrote a simple C library a while back to make registering global X11 hotkeys a little less painful. There are some examples with the code. You can get it at:
https://github.com/jwmcode/xhklib/