|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| Using the Windows Template Library Part 1 |
|
![]() Mulligan Member since: 2/11/2002 From: Virginia |
||||
|
|
||||
| Heh, interesting. I think I'll try using that for my next project. |
||||
|
||||
![]() pan narrans Staff Member since: 6/4/2002 From: Leeds, United Kingdom |
||||
|
|
||||
| Yeah, definately worth a look. Very good article. Thanx pan narrans | My Website | Study + Hard Work + Loud Profanity = Good Code |
||||
|
||||
![]() paulecoyote Member since: 7/14/2003 From: Alton, United Kingdom |
||||
|
|
||||
| Well written + informative. Thank you! |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| Wow, that's some good info there... and interesting too. However I have to disagree with your comment about this WTL code being more maintainable than standard Win32 code. All that BEGIN_WHATEVER_MACRO_MESSAGE(stuff) is nasty on the eyes. Also classes--just by their definition--add an often uneeded layer of administration and confusion to the mess. |
||||
|
||||
![]() Leffe Member since: 3/3/2003 |
||||
|
|
||||
Great article, I finally learn what the WTL is quote: #define niceLookIngfunct4r BEGIN_WHATEVER_MACRO_MESSAGE --edit-- Oh, WTL 7.1 is out, yay! [edited by - Leffe on January 15, 2004 2:46:58 PM] |
||||
|
||||
![]() Solo Member since: 2/11/2002 From: Virginia Beach, USA |
||||
|
|
||||
Thanks for the complements! quote: Once you get use to the style it's not quite as unsightly. You'll see more advantages to using objected oriented wrappers around the Win32 windowing API in later articles. quote: [edited by - Solo on January 15, 2004 9:59:24 PM] |
||||
|
||||
![]() cylogic Member since: 10/30/2003 From: Germany |
||||
|
|
||||
| Uhm... another template related article. (but this time a better one). The goods: + I like these "Building from Cratch" - tutorials! + The concrete comparison between Win32 code, MFC code and WTL code was imho not done before. Everybody talks about the differences, but this time we got an concrete example. Nice! + For a noob to WTL (but an experienced ATL/template coder) it covers already the most important things (and that on only 4 sheets - impressive!) The bads: + What i really missed - fortunately one of the Editors mentioned it at the end - is a link to one of the best WTL tutorials on the net imo: WTL for MFC Programmers by Michael Dunn + The comparison between the apps - as good as it is - focuses on code size than on speed. That is for the minimalistic App ok, but for bigger projects, templates in general tends to produce faster but even large-sized code than class hierarchies. This comes through the fact of the much special code generation, e.g. VecImpl< float, 3 > Vecf3; VecImpl< int, 2 > Vec2i; VecImpl< FixedImpl< 32 >, 4 > MtxFix32; + CWindowImpl is only slightly touched in the article... but this is the only template-related paragraph and is at the same time one of the main concepts of WTL. There should be imho some more words about the idea behind it. + I missed a hint to install and use the ATL/WTL wizards, which do already a good job preparing an application. However, nice work. Very good readable and well designed. I wait for the next part =Cy=. [edited by - cylogic on January 16, 2004 4:58:32 AM] |
||||
|
||||
![]() psyho Member since: 4/28/2003 From: Kraków, Poland |
||||
|
|
||||
| Great article! I have a question, though: is WTL flexible enough to use it for making User Interface (in-game windows, menus and so on). If yes, what about it's performance and possibilities of customization? If not - what is its purpose in programming games? Writing an application class (which encapsulates Win API functionality) is one of the easiest activieties when writing a game (correct me if I'm wrong - I'm only a newbie, and maybe there are some difficult parts, which I've never encountered...) thanks for the article Adam 'Psyho' Pohorecki |
||||
|
||||
![]() Solo Member since: 2/11/2002 From: Virginia Beach, USA |
||||
|
|
||||
quote: Comparing speed is difficult at best. 99.9 percent of the time the app is just sitting around waiting for a message to arrive. If the WTL does that better than MFC it'd be hard to tell. quote: True, but here we take advantage of the fact that 90 percent of the classes MFC offers we don't need. You'd have to implement a lot of windows before the size of the app finally caught up. One of the reasons the ATL libraries were created was because, at that time, developers where toying with the idea of using OLE controls on web pages. They needed a lightweight alternative to using MFC to create their OLE controls because the end users were going to be downloading them. cylogic - most of the items you'd like to see will appear as the series plays itself out. Thanks for the comments! quote: Yup. But why reinvent the wheel. You'd be hard pressed to do it better than the WTL does. quote: Hadn't thought about it much but I suppose you could create your own handlers for WM_PAINT, WM_NCPAINT, WM_NCACTIVATE, ect. and do the drawing with DirectX instead of the GDI. I've never had a reason to paint the non client area so I'm not sure how much trouble it would be to do. |
||||
|
||||
![]() Halloko Member since: 2/17/2001 From: Birkerod, Denmark |
||||
|
|
||||
| Nice article you've got yourself there.. it really gives a great alternative to the "oh-so-much-discussed" MFC Anyways, looking forward to the next parts of the article as I've always wondered what WTL was and now it seems I've got an easy chance to find out Keep up the good work :D |
||||
|
||||
![]() Oluseyi Staff Member since: 5/14/2001 From: New York, NY, United States |
||||
|
|
||||
quote:I tried a while back to fool around with the owner-draw features of Win32 controls (which the WTL wraps). Damn-near impossible to do it with DirectX because of the fact that the main context used by DirectX does not generate WM_PAINT messages, for one thing. There were a few other issues, but I forget what. An interesting exploration would be owner-drawing Windows.Forms controls using Managed DirectX... Any takers? |
||||
|
||||
![]() eli_pulsifer Member since: 1/17/2000 From: Austin, USA |
||||
|
|
||||
| I dont use MFC or WTL any more, all managed c and C# Its SSSOOOOOOOO!!!! much better. |
||||
|
||||
![]() Kylotan Moderator - Scripting Languages and Game Mods Member since: 3/8/2000 From: Nottingham, United Kingdom |
||||
|
|
||||
| Good work - nice to see this finally see the light of day. [ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost Asking Questions | Organising code files | My stuff | Tiny XML | STLPort] |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| I strongly recommend people dont use WTL -- because of the virtual complete lack of documentation. It is OK for coders, but for maintainers such as me who have to deal with WTL + ATL + MFC + native it adds an extra level of complexity. I strongly agree with the comment above to forget the whole nightmare and use c# |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|