pouët.net

Go to bottom

Win32 API coding: A Wrapper class for Window Creation

category: general [glöplog]
Although lacking the pouetisation, I am looking forward to see how this Thread will steer too...

Will rudi finally make the Wrapper to conquer Windows? Will Adok be able to show off his Coding Skills? And what about navis and smash? Will they finally learn to code win32, instead of using lame frameworks or assembly?

Stay tuned on pouet.net, the Place where win32 still counts
zed: hehe, what a build-up. you've actually made me went to keep an eye on this pathetic thread. wow, the drama!
added on the 2009-01-06 11:12:43 by button button
I agree with Smash. Use MFC if you are doing your app for Windows.
Usually the "autogenerated" stuff is very bloated and weirdly formatted but it doesn't take long to learn the basics so you don't have to autogenerate your classes.

There are 2 things really that you need to learn and that is Data exchange and how messages are routed in MFC.
added on the 2009-01-06 11:26:11 by pantaloon pantaloon
The opposite of what Smash said.

Get used to Qt and MFC will seem like a monster to you. I really like the design philosophy behind Qt, where rather than defining a "proper way for you to do things", they've designed the system around how you'd expect it to work. If you think it makes sense that a certain class should have a certain method, then it probably does, and it probably does exactly what you expect it to. When in doubt the documentation is excellent, too.

Some of the provided controls aren't great, but if doing custom controls in MFC is a necessity anyway, I don't get why that's a disadvantage. Keep in mind many of the controls ARE good, and there's a wealth of options for creating your own and for tweaking or building on existing ones.

And of course Qt is much more than just a UI toolkit.
added on the 2009-01-06 11:29:00 by doomdoom doomdoom
pantaloon: can old Gorgeous Bum have a hug? I need warmth! all this technologikal talk...it's so cold
added on the 2009-01-06 11:29:55 by button button
Also one option is to learn using user-proven commercial software as demotool, as they can handle most if not all of the stuff that own written demotools would :) (offtopic)
added on the 2009-01-06 11:31:32 by shadez shadez
[rant]
MFC makes me puke. I used it for one project and I sucked like nothing else I had seen before (Well, maybe COM and ActiveX, but that's a different story).
[/rant]
added on the 2009-01-06 11:39:48 by raer raer
hihihi. "I sucked..." should have been "it sucked"... but, well... ;)
added on the 2009-01-06 11:40:56 by raer raer
That's what I call back-fire!
added on the 2009-01-06 11:43:23 by kusma kusma
Thanks for the link to http://www.wxwidgets.org/, it looks interesting. Maybe I'll use this.
added on the 2009-01-06 11:44:31 by Adok Adok
I thought backfire was when your asshole is burning from too much chilis the day before ;D
added on the 2009-01-06 11:45:14 by raer raer
stop all this talk of burning bums!
added on the 2009-01-06 11:51:46 by button button
use qt instead of mfc if you're a windows-hating sissy!
added on the 2009-01-06 12:20:33 by smash smash
isn't the mfc the one with that horrible use of capitals and underscores everywhere ?
added on the 2009-01-06 12:25:02 by Navis Navis
Quote:
our demotool is written entirely using mfc. its been in rolling development for about 7 years, yet the basis is still solid. virtually all the controls are custom controls


So MFC is okay if you spend 7 years rewriting iit? ;))))))))))))))))))))))
we haven't been rewriting anything. we have extended it with custom controls but still MFC is there untouched.

Navis, depends on what coding style you have, but i agree the autogenerated files looks horrible and is almost unreadable.

What i said earlier, don't autogenerate the stuff, if you do you will most likely end up with a big mess.
added on the 2009-01-06 12:35:29 by pantaloon pantaloon
Quote:
So MFC is okay if you spend 7 years rewriting iit? ;))))))))))))))))))))))


no, we didnt rewrite much at all. the base window code and many of our custom common controls (trees, lists etc) are still there almost unchanged, just minor tweaks. we've just added new components and changed the interface slowly over the years, but the core window code remains the same.

after numerous versions of windows, directx, visual studio and so on it's still solid without ever needing large changes to the base, sweeping changes for new lib versions etc. which shows the benefit of building on solid foundations in the first place. :)
added on the 2009-01-06 12:51:37 by smash smash
smash/pantalon: screenshot, please :)
added on the 2009-01-06 13:21:28 by arm1n arm1n
jar_: Here's a screenshot of the FLT demo-tool: BB Image
added on the 2009-01-06 13:38:18 by kusma kusma
best answer, kusma :)

why dont you do it yourself without any ideas of how it should look, so its "elite" in the end ? just be creative and fit your own engine to your own needs...about the look of the engine....its secondary...first get all the functions then think about how you could live with your engine...mine would be black as much as possible f.e ;)


and at the back of that screenshot you can see our realtime terrain in action.
added on the 2009-01-06 14:32:35 by pantaloon pantaloon
I lol'd.
added on the 2009-01-06 14:34:35 by raer raer
I would just like to point out that writing your own GUI library when you're having issues getting a Win32 window to render might be overkill.
added on the 2009-01-06 15:37:47 by sagacity sagacity
cocoon: yeah, like in painfully doing all the idiotic trial-and-error again and again to finally find good solutions instead of learning from others, right.
this is not about copy&paste you know...
I did my fair share of tool coding attempts.
added on the 2009-01-06 16:58:39 by arm1n arm1n
smash & pantaloon: have you considered releasing your tool to public? It looked really good at BP, maybe even as good as ours (cough, cough*) ;)
added on the 2009-01-06 17:04:28 by bonzaj bonzaj

login

Go to top