Log in

View Full Version : PPC development using .NET CF, C#


zapp
03-31-2004, 12:52 AM
I really want to pick up PPC development, and have written a few basic apps in C#, but I am having a hard time using more advanced features...

Things I'm having a hard time with, if anyone could give me any hints on them, I'd appriciate it:
Writing a SIP
listening for hardware button presses (even from w/in a SIP)
Playing a sound
Waking the device if it is turned off
...


It seems like all the APIs are for embedded C++, which looks pretty confusing.

So you understand where I'm coming from, I have mostly developed in Java, but have done a small bit of (NON-MS/Windows) C++.

I picked up C# because it looked like Java, looked simpler than eC++, and I flat out hate VB. Oh, and I have a Ipaq 4155 (WM2003) and Dev Studio .NET Pro 2003


Thanks!

Glohamar
03-31-2004, 04:05 AM
There is some good information that should help you over at pocket pc developers network http://www.pocketpcdn.com

Might also try the Microsoft Newsgroups. Good info there in the developers section.

Kowalski
04-02-2004, 01:00 AM
do yourself a favour and learn c++
if you are intended to be a programmer there is no escape!
and once you learn this powerfull language belive me you wont need anything else

zapp
04-02-2004, 02:42 AM
do yourself a favour and learn c++
if you are intended to be a programmer there is no escape!
and once you learn this powerfull language belive me you wont need anything else

OK. In that case, can anyone describe the various "forms" of Windows/PPC C++. I am familiar with "normal C++", but when I look at any Windows based source, i'm lost. Once I know what each of these things does, I can research it on my own, but its tough not knowing the difference between them. Just a quick explanation of each would really help:

MFC
Win32
COM
<any other basics I overlooked>

I know a lot of the confusion is just typedefs, cuz I look at all these LRESULT, ATOM, HWIND, HINSTANCE, WPARAM, LPARAM, etc and get lost pretty quickly. Also, is any of it object oriented, or is it all procedural?

marcelol
04-05-2004, 09:36 PM
Zapp....

I get the impression you're rather new to programming itself. What you may want to do is pick up a book called VisualStudio.NET for dummies ( or Visual C++ for dummies ). That's not a jab, but a serious suggestion. To Learn, you probably have to unlearn some things.

All those #defines and typedef's you see are there for a reason. That reason is that at it's core, Windows was ( and very much still is ) a procedural environment. You ask for something, it's ( or the necessary result ) returned ( within reason ) in response to your request. Sometimes those requests are synchronous ( API calls ), some of them are asynchronous (Messages/Callbacks).

What you're seeing in those header files are a bunch of definitions, think of it as a bunch of post it's from the compiler/linker/program codeto themselves, which help them keep common values and information about the who, what, and where of things within Windows.

Back in the day of Windows 16 bit, WPARAM and LPARAM were different, but nowadays, they're both simple 32 bit values. Those 32 bit values can be a combination of a BUNCH of things, what those values are, and what they mean depend upon the context of:

A) What you're trying to do
B) What Windows is trying to tell you
C) What you're give to Windows to operate on

IF you want to learn about coding itself within Windows, there are absolutely dozens of websites you can look into ( codeproject is one of my personal favs ). About learning PocketPC development, there are fewer, but by all means....familiarize yourself with animal, before you try to tame it.

The SDK includes several MFC ( Microsoft Foundation Classes ) C++ example programs, as well as "SDK" ( straight C, or "old-school" <of which I am one> ) code examples. What language you choose in part depends on what your goals are, and your level of knowledge.

Obviously, you can always ask questions here, and I'm sure there's going to be someone who can lend a quick hand.

Marcelo

Kowalski
04-05-2004, 09:59 PM
marcelol thank you because of this short and clear post :D
i say if you learn the inner workings of windows once, than everything comes clear no matter what platform( as long as windows in it) and any language seems easy to you, because you know and use the building blocks.
but if you use a high level and stupid language like VB, thigs get confusing every time a new runtime or something comes out

zapp
04-06-2004, 12:34 AM
marcelol, thank you for your reply. I suppose I am somewhat new to the professional world of programming, since I'm a few weeks short of graduating and entering the workforce if possible, but I am definitelly 100% new to programming in the Windows world. Simply knowing now that Windows is procedural helps so, so much. I will try to follow your advise and start with the building blocks :)

Kowalski
04-06-2004, 09:52 AM
here is another advice to you:
dont push too hard. learn win32 api structure befoure jumping into mfc.
learn oop well befoure jumping into win32
and learn c++ aspects befoure sticking into oop

and for the information refer to the reverse engineers first, because they have the best knowledge around

zapp
04-06-2004, 03:10 PM
Thanks. I am familiar with OOP, and a good bit of C++, but of course you can always learn more. I've already done some work with OpenGL, but used Qt as the windowing toolkit so it would be portable to Linux. Having done lots of GUI work in Swing and Qt before (both completely object oriented), Windows seemed pretty foreign. Anyway, I'll try and pick up some dummies books, and who knows, maybe by the time we have Windows Mobile 2005 I'll have a "Hello Pocket World" made :)

ChrisClarke
04-07-2004, 12:47 PM
hi,
if i was you and you are about to embark on a career as a programmer i would learn C# definately.. if you are wanting to write business systems that is.. if you are wanting to get into writing device drivers, hardcore maths programs and such like learn C++, otherwise don't bother..

your right its very good to have a grounding in how windows works however part of the point of .net is that it provides abstraction from windows.. so i would argue its not as important as it used to be.. learning what is in the framework and where it is is much more important..

also learn XML... learn it very very well.. the new versions of windows and the dev tools that go with it are VERY VERY reliant on XML and all the techs that go with it..
the other thing to understand is managed code.. learn as much as you can about managed code as again this is very key to how windows development is going..

hope this helps..
rgds
chris

ps. vb.net rocks ;-) you can do nearly everything in vb.net that you can do in C# and if anybody tells you otherwise tell them to learn how .net works ;-)