🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How developp my own GUI with Visual C++?

Started by
3 comments, last by Xas 24 years, 8 months ago
Check out the article series that Mason wrote ... http://www.gamedev.net/reference/programming/features/gui/ ... it covers what you are wanting to do I believe.

The trick is in Sub-Classing or Super-Classing your controls so that they use your own WndProc() instead of the default.

- Chris

Advertisement
Have you looked at Mason's series Developing a GUI Using DirectX and C++? That's probably a good place to start. The features page has links to the four parts of it.
Also, I am making a GUI, but not for a specific game. I would appreciate any input people may have. The site is www.inet.net.nz/~dmitchell .

Thanks

I'm trying to program an application with my own user interface (like Sonique, for example) and I need some tips...
Is it only programming window with Region functions or CreateWindow with BS_BITMAP style for button ? Or are there others ways (for example, again in Sonique, how animate the 'close' button, or 'minimize' button...

Ok, i hope my english is comprehensive, and sorry for fault...

Thanks,
Xas

I think there's two ways to do it.

The first way is what you described - basically bending the Win32 API to support cool GUI stuff. This might mean using bitmaps as window backgrounds, subclassing controls, etc. Goods: (Presumably) less code than the other method. Bads: There are some things that are practically impossible to do (alpha blts), and you have to deal with the sluggishness of GDI.

The second way is to just create a windowed DirectDraw app and then strip off its title bar. Pluses: By using DDraw, you can do anything - complex animation, nifty alpha effects, etc. Minuses: Lots of code. You've got to redo most of the GUI processing (animating the button clicks, figuring out what button the moues cursor hit, etc). If you go this way, my GUI articles should be able to help you.

It *might* be possible to use some bizarre combination of (invisible) controls and windowed DirectDraw, so as to trick Windows into sending you the correct WM_COMMANDs, but I've never done it, so I don't know how difficult it would be.

Hope it helps...

Mason McCuskey
Spin Studios
www.spin-studios.com

Founder, Cuttlefish Industries
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!

This topic is closed to new replies.

Advertisement