Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: User interface tech - what are the options? (Read 3830 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

User interface tech - what are the options?

I've been adding a dialogue to my foobar component, and am finding creating interfaces using ATL incredibly clunky compared to e.g. WPF. The code is ugly and brittle, and the tools for editing the interface are terrible. I'd rather not continue down this road if I don't have to.

My question is: what other options are available that are compatible with foobar component development? Are there any components using other UI frameworks to create dialogues that integrate nicely with foobar, or do we have to use ATL?

For reference, the current state of my UI code can be seen here: TextToPlaylistDialogue.cpp

User interface tech - what are the options?

Reply #1
You could always buy a Mac and start designing Nibs and accompanying Objective C classes in Xcode. HUEHUEHUEHUEHUEHUE

Seriously, though. WTL was chosen because it is lightweight, not because it's easy to program for. With WTL, you still pretty much have to program raw Win32 API. It was really only moved up to this high a level to support wrapping slightly neater objects around otherwise raw Win32 API.

I doubt it will ever move up to anything as high level as WPF. And didn't you get the memo? WPF is dead.

Maybe you can figure out how to design UI objects using another framework, but to integrate them with the Default UI, or with the 1.0+ preferences page interface, you'll need to learn how to implement the basest of interfaces for those services, and expose your windows as raw HWNDs. And you'll have to work out the magic of storing your instance data for each window, and message handling, and also how to destroy your objects in the right time relative to the window destruction.

The WTL code handles all this for you, usually.

User interface tech - what are the options?

Reply #2
Righto, WTL it is, then! Do you know of any good editors for WTL/ATL dialogues? I find the Visual Studio editor quite awful. I found ResEdit just now that looks a bit more useful, given the screenshots with alignment buttons and the like. Is there anything better?

And while I'm at it, where's the best place to go for WTL documentation? Following links from the website or a google for "WTL" leads to a lot of 404s, redirects and extremely out of date information! It looks like the only reliable source is the samples from their SVN repo.

User interface tech - what are the options?

Reply #3
There is a series of articles on CodeProject by Michael Dunn which I can recommend. There are eight parts but you probably won't need all of them for a foobar2000 component. The first part is WTL for MFC Programmers, Part I - ATL GUI Classes. Destipe the name, you don't actually need to know much about MFC to benefit from the series.

User interface tech - what are the options?

Reply #4
Excellent, that looks like a good start. Thanks!