|
WTL is the Windows Template Library. It is an extension to ATL. WTL is a set of wrappers around most of the Win32 API functions that are used for windowing. WTL is very lightweight, and it is designed with the same template paradigm that ATL is.
The main drawback with WTL is that there is no official documentation from Microsoft, so in order to use and learn it you will need to use any examples that you can find on the internet. There is a good two part series at www.sellsbrothers.com. In order to get WTL you will need to goto Microsoft.com to download it.
I prefer WTL, because it is closer to the operating system, and you can pick and choose the pieces that you want to use. However with MFC, there are plenty of books, documentation, and it has a lot more features.
Good Luck
|
|
|
|
|
WTL is GOD!!!
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Which one of these are better, "by opinion" for programming a 2D RPG game?
Thanks
~SilverShalkin
|
|
|
|
|
That is really hard to say.
IMHO, WTL has less baggage. After all, I doubt you will need MFC's document stuff.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Ok,... i was going to do everything in MFC, but because of Tim Smith's view of WTL which is, if you didnt see "WTL IS GOD! " and this recent file from Kilowatt, where it says that MFC has allot of documentation that i wouldnt really need... I think im going to give WTL a try
Ill be asking questions soon, i warn thee
While im here, WTL has similer coding to win32app?
Thanks for your help!
~SilverShalkin
Clear skies are better to look at
then stormy ones
|
|
|
|
|
No, if anything, WTL looks similar to ATL because it's a template library, I *believe* based on the windowing support in ATL. However, just like MFC, it doesn't hide/remove any Win32 stuff, so anything you can't do in WTL you can do in Win32. Given the nature of your app, I didn't respond but expected DirectX under Win32 to be the clear winner. I don't see what MFC or WTL will bring to the party when you'll be basically just wanting a window to draw your own stuff in.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
I believe what he is developing at this point is the development tool that will help him design the maps and levels. That is why he is concerned with which tool to use for windowing support.
|
|
|
|
|
I would go with WTL too if you are comfortable with reading code.
For the most part however, WTL is fairly straight forward, and you shouldn't have any problems.
There is even an APPWizard that comes with WTL to generate your application shell for you.
|
|
|
|
|
Ive downloaded all my files for WTL, and printed out the headers that ill be using... But how do i exactly start programming in WTL? is it just by puting a atlapp.h header at the top? or can you open WTL as a project?
Directx looks vary interesting, I'll give it a look to, but what do you do with it? is it graphic rendering,... or what?
I also, after im done with the looks "windows such" i want the engine to do everything for the game creation to uploading the maps to the internet. Im building a tool and want to start in the right place at least
if it all comes down to it,... i could use DirectX and WTL together couldnt I?
Thanks for your help!
~SilverShalkin
I see storms again rose:
|
|
|
|
|
SilverShalkin wrote:
Directx looks vary interesting, I'll give it a look to, but what do you do with it? is it graphic rendering,... or what?
DirectX is a combination of APIs, DirectDraw is the one you'll want for 2D drawing, and DirectSound if your game will have sound. You can't seriously write a game engine without it or OpenGL, and for a 2D game, I'd go DX.
SilverShalkin wrote:
if it all comes down to it,... i could use DirectX and WTL together couldnt I?
They are unrelated, you can use DX where-ever you can use COM.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
SilverShalkin wrote:
Ive downloaded all my files for WTL, and printed out the headers that ill be using... But how do i exactly start programming in WTL? is it just by puting a atlapp.h header at the top? or can you open WTL as a project?
The easiest thing to do to get started is to make sure that you have installed the app wiard that comes with the installation. When you create a new project, select a ATL/WTL AppWizard. For your application you will want to select the single threaded SDI app. There will be choices to have toolbars and status bars if you want.
Once you create that you will have a shell of an app that you can expand upon.
As far as what elements do you need to specifically have to have a WTL app? After you create you app from the wizard, if you still want that question answered, post another question and I will help you.
|
|
|
|
|
At the moment im tired and i dont know if i should make any big disicions. Ill try the WTL tomarrow "and post any new questions then and there" as for DX, i think im leaning towards it a little more, that and Direct sound. But can i use DX to make a window and be able to make a tool from it, that'll allow me to do everything i need, "that WTL could"?
And where do you start programming DX? just in a normal win32app? where do i find info that'll help me begine in this area?
Thanks again
~SilverShalkin
I dont see anything now
Just can feel the relaxed
feeling of rest as my eyes
close and i fall in deap venturaus
dreams
|
|
|
|
|
DirectX is a set of classes that provide an interface to the video card. it is used for painting.
You can create a DirectX application with minimal windowing support, or you can create a small directX window in an application that is a large windows application.
One thing to be aware of with DirectX is that you have to write a lot of code to get started, it is not as simple as the GDI. A good place to start with DirectX is the sample programs that come with the directX SDK.
|
|
|
|
|
SilverShalkin wrote:
But can i use DX to make a window and be able to make a tool from it, that'll allow me to do everything i need, "that WTL could"?
I made another post but it seems it was lost.
At this point, I'd suggest you need to sit back and consider the ratio of the project you're considering and how little you know of how to go about it. It may well be better for you to first write some simple DX code before jumping into an engine and living with the design mistakes you're bound to make if a couple of hours ago you had no idea what DirectX was.
I'd suggest www.flipcode.com as a good resource for gaming programming info.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Check it out - this guy is going to JAIL !!!! I presume his source is the electronic versions that come with a lot of books, but whatever it is, I doubt that Microsoft are giving away titles like 'Programming Windows' and 'Programming Applications for Windows'.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Please can anyone explain to me with an example how to use the CFtpConnection::Command function. Ive tried it in both VS6 and VS.NET but when it comes to compiling it, both give an error that its not a valid member of the CFTPConnection class even though in MSDN it is listed as being one. I cant seem to find any articles on this either. I know theres the WinInet alternative FTPCommand, but was curious as to why this function doesnt work! ??
The MSDN link is below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/vclrfCFtpConnectionCommand.asp
|
|
|
|
|
Hi all -
I'm writing a C++ wrapper class around a GPIB instrument control interface. The interface is predominantly controlled by a trio of functions:
viPrintf()
viQueryf()
viScanf()
These functions are fairly similar to Printf, scanf, etc., in that they take a variable number of parameters. viQueryF() takes a pair of const char * -- it effectively does a concurrent viPrintF and viScanF via just one function call.
So here's my problem: how can I expose such functionality in my class? I can write a function that takes a variable number of parameters. I can access those, no problems.
But how can I take the variable length variable list and transform it into a single function call?
I thought up how to handle the viPrintf function -- basically use sprintf in sequence. However, the viScanf(instrument id, const char * str, ...) function requires return addresses of where responses will be stored.
Is there any way I can construct such a function call? ie, pass in all the arguments at once? Or do I have to attempt something astonishingly brilliant that I can't even conceive?
Thanks,
Andrew
|
|
|
|
|
I don't quite get your problem, but if what you want is forward the arguments passed in viPrintf to printf , use vprintf and va_list just like this:
void viPrintf(const char* fmt,...)
{
va_list v;
va_start(v,fmt);
vprintf(fmt,v);
va_end(v);
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Well, actually it's more that I want:
void MyWrapper(const char * fmt, ...)
{
va_list v;
va_start(v,fmt);
viPrintf(fmt, v);
va_end(v);
}
I saw mention of some parameterized version of the viPrintf function I'm wrapping that might accept an argument array as above... I suppose I'll have to try.
Is there any other way such magic might be worked?
|
|
|
|
|
OK, now I think I got what you're after. Indeed you can construct the variable argument list at run-time (non-portably) with some hackery along this:
char vargs[10000];
char *pargs=&vargs[0];
int x=5;
*((int *)pargs)=x;
pargs+=sizeof(x);
char *pc;
*((char **)pargs)=pc;
pargs+=sizeof(pc);
printf("%d %s",args); The idea is reserving space in the stack with args and fill this up with the parameters needed. This can be combined with reading the parameters from a va_list in an obvious manner (left as an exercise ).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
What caused MSOffice open doument file or ACDSee open image files?Is that only extension of file?I need to do something that MSOffice(or other programms) could not open .txt or .doc files but also I shouldn't change the file extension.Any suggestion for doing this?
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
As you guessed, it is only file extension that drives the system to select a program to open a particular file. If you want to change the "opening program" of extension .xxx to be program A , do the following:- Open a Windows Explorer and locate a
.xxx file.
- Right click on it while pressing the shift key. Select "Open with..."
- A dialog box appears for selecting the program to open the file with. Select program
A and tick on the checkbox "Use always this program..." (sort of, my OS is in Spanish).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you Joaquin,but my problem is not that,I wanna do something IN MY PROGRAM,that .doc files become unavaible for Office or ANY OTHER program to open,I don't want to change extension or delete content of files.
Do not tell this to anybody Joaquin,I can say its kind of VIRUS.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Do not tell this to anybody Joaquin,I can say its kind of VIRUS.
(in low voice) I don't have the slightest idea, but please tell me when you figure it out.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
(in low voice) I don't have the slightest idea, but please tell me when you figure it out.
Sure
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|