Page 1 of 1

ATL and Smartphone 2002

PostPosted: Jan 25, 2003 @ 1:13am
by Jay Mattis
Hey everyone. I'm trying to get PocketFrog running under Smartphone 2002, but the problem is that it doesn't support ATL. I don't know much about ATL unfortunately. How much work would it take for me to remove the ATL dependency from PocketFrog? Does anyone know?

PostPosted: Jan 25, 2003 @ 4:28am
by Kzinti

PostPosted: Jan 25, 2003 @ 4:45am
by adde
Ouch! You don't want to do that. PF uses ATL to create the window in which PF draws all it's graphics. But also, to implement the window message map (like the mouse/stylus and keyboard and all other events). BUT, I guess it's possible, using regular SDK calls to create the window and writing your own message map interpreter (this is how it was done before ATL (and MFC) came along). It's a lot of work though.

I found it strange that it doesn't support ATL though, since ATL is (basicly) just a wrapper of the win32 SDK calls, and I was right. Look at this link:


I quote: "ATL version for Smartphone is included in Smartphone SDK ...".

So, you just have to reinstall the SDK and make shure that ATL is included this time.

The article also describes how to install WTL, which is an extention to ATL and has some very nice GUI components you might want to take a look at. Using ATL/WTL is pretty much the only option you have if you want to develope GUI:s on Smartphone (or WinCE for that matter) that run fast and have a small footprint.

MFC (not available on the Smartphone I think) is nothing you want to bother with on WinCE. It's just to bulky. Read a few tutorials on how to use WTL/ATL instead and benefit from good programming style.

PostPosted: Jan 25, 2003 @ 4:50am
by adde
Well, there you go.. Thierry beat me to it (writing a much shorter note =).

What I said still stands though. He only confirmed that all you need to change (if you by any chance don't like ATL) is the game.cpp (and game.h) file to use standard win32 SDK (or MFC, but that's just beeing silly) calls to create the window and implement the message map.

Just make shure you pass a valid window handle to the PocketPC::CreateDisplay() function and you're set.

PostPosted: Jan 25, 2003 @ 6:00am
by Jay Mattis

PostPosted: Jan 25, 2003 @ 5:52pm
by adde