Thursday, October 16, 2003

PocketPC programming... now with menus!

So, it's been a few days since I've had anything worth talking about. Whether I still do or not is questionable, but I'll try it anyway.

I'm trying to pick up developing on my PocketPC. I've gotten the WM2003 SDK and eVC++ 4 (with SP2) installed, and I can make something run on the emulator. It's definately harder to work with than Win32... I chose a dialog based app for a quick test app, and I haven't been able to figure out how to add a menu to the bottom menu bar (the "TaskBar", "CommandBar", or "MenuBar", depending on which documentation you read... a common terminology would be nice, especially since those same docs tend to use one of the OTHER naming choices to talk about the TOP bar). I can make my own CommandBar and add the menu to it, but I lose screen space, since it's created in the client area of the dialog. All the documentaiton that uses the bottom MenuBar talks about doc/view applications and CFrameWnd derived classes, and CDialog is derived from CWnd, not CFrameWnd. Most mention "Oh, yeah, and you can do something similar to this with a CDialog based class", but none go on to educate me further.

There, now that I've bored the non-programmers to tears, maybe I should give them something to read. Or not. I haven't read my daily news articles yet, so not much to talk about. Maybe I should change the order I do things in the mornings...

Update: (Like you care)
I've figured out how to deal with the menu in a PPC Dialog! Apparently... CDialog on the PPC already has a nice shiny CCeCommandBar created and waiting to be filled with menuy goodness. Much easier than I thought. I HAVE found one distressing thing, though. I can't have a nice empty non-popup menu entry on the bar... if there's no sub-items, it doesn't get rendered! So, to have a button that says "Add" on the menu bar, I have to create a graphical ToolBar, and add a BMP with the word "Add" drawn on it. Very silly, in my opinion.