Related
Hey,
I'm trying to make a User Interface for a program using Visual C++ 2005.
I have two options for Smart device applications.
1. A project for Windows Mobile and other Windows CE-based devices that uses the Active Template Library.
2. An application for Windows Mobile and other Windows CE-based devices that uses the Microsoft Foundation Class Library.
Which is the right one to use for Pocket PCs?
No idea 27 - I've never used either ATL or MFC. I do all my stuff in pure Win32. It's not necessarily the best way, but it's worked fine for me so far, but I do very limited GUI stuff.
BTW - regarding your signature:
"A tiger does not have to proclaim its tigri-tude."
Click to expand...
Click to collapse
clearly Wole Soyinka hasn't met Tigger.
V
vijay555 said:
No idea 27 - I've never used either ATL or MFC. I do all my stuff in pure Win32. It's not necessarily the best way, but it's worked fine for me so far, but I do very limited GUI stuff.
V
Click to expand...
Click to collapse
I see.
I'm trying to make a GUI app for WindowsMobile. Any ideas?
Hi 27,
I'm not sure what you want your GUI to contain but a simple Embedded MFC app with a dialog might be a good way to get going?
best of luck...
dav
I've been developing for big Windows since '92 and have done one or two small CE projects. Straight API programming is a bit tedious but it's pretty straightforward and will help you learn the fundamentals. It also produces the tightest code, an important consideration if you're looking to run on smartphones.
Avoid MFC like the plague -- MFC apps tend toward the large side, and it tends to force you into a document/view model that might not be appropriate for your app. I did quite a bit of MFC work in the early and mid 90s; most of my time went to working around MFC's limitations.
If you go the ATL route check out WTL, a set of C++ template classes that extends the UI functionality of ATL considerably. I've been using it since it first came out and wouldn't switch back to MFC if you put a gun to my head.
I agree. MFC makes everything less straight forward. Why use something designed to hide how it works? I use plain win32. After the pain of starting from scratch you eventually build up your own code base to reuse.
both can be used
MFC is old and bulky but many things are don automaticly
compared to win32 sdk
you can also use .net but they are somewhat slow
but dont use much space
win32 sdk is the fastest and can do anything but it's the most work
3waygeek said:
I've been developing for big Windows since '92 and have done one or two small CE projects. Straight API programming is a bit tedious but it's pretty straightforward and will help you learn the fundamentals. It also produces the tightest code, an important consideration if you're looking to run on smartphones.
Click to expand...
Click to collapse
How can i do this on VisualStudio 2005?
I'm a bit new to this.
Strange question - you develop in Win32 by NOT developing in MFC or ATL
The other frameworks are built on top of the native Win32 API. So learning the bareknuckle stuff first helps you to learn how to get the most out of the other stuff.
V
27 ask a importent question imho
can ppl make nativ CE api projects in 2005
or do you need embedded c++ to do that?
btw i believe that embedded c++ is free so if 2005 cant do it
ppl can just get the embedded version
VS2005 does native Win32 (2003, Smartphone and WM5).
EVC is of course free, and runs much better IMHO (eg no bugs in the Remote Tools etc, faster). I can't think of a good reason to upgrade unless you're developing expressly for WM5 or using non C++ languages, for which VS2005 is required.
V
Hello,
After a decade of not doing C, I find that alot of things have changed when programming c++ native for CE. Even things like:
string somestring;
no longer function. Wow!.
strcpy has been replaced with StringCchCopy. Wow, MS has done a number here... and so on...
Anyhow I searched xda and found allot of good threads. But what if I'm looking at re-learning C++, with a focus on CE programming only? What books and other resources would you recommend, its almost like starting from scratch. I got vs2005 + emu + been reading allot of MSDN, did some basic apps. etc.
BTW: How the .... do you declare a variable length string???
and in VS2005 is running the debugger the only way to get the app to start automatically ???
Thanks
*bump*, anyone?
Couple of notes:
1) I strongly recommend avoiding VS, it is unbearably slow and balky.
2) strcpy and all the other functions are still supported by c runtime on CE (VS 2005 complains about them but you can ignore it). The problem is all windows API on CE use UNICODE so you have to declare strings as WCHAR (thats MS speak for unsigned short) and use wcscpy, and such.
3) The only book I know on CE specifically is this and I only read the two sample chapters online, so can't really recommend it. (Though the sample chapters were very useful). What you need is to get a good book on Win32 programming that will get you well on your way.
4) There is an MFC class CString which wraps up all string related functions very nicely. If you are not using MFC but clean C/C++ the only thing I can think of is malloc and free or the C++ versions new and delete.
Check out the links in my sig if you want to see code examples of small but functioning apps.
I disagree with levenum's comment on VS, but agree at the same time (weird I know). I wouldn't use VS for native development because it has A LOT of extra features that I think would be useless for native developers. Also, the lighter eVC++ has pretty much everything you need to write native apps.
I had this book called "Programming Windows CE 3.0" or something along those lines a few years ago. I got it for like $3 on Amazon. If you can find an updated version of that (or even the old version would be useful) then you should buy it. It will show you all you need to know to get started. You can learn the new api's from browsing msdn.
If you're only a little rusty with C/C++ I would suggest jumping right in to the Sdk samples and seeing how they do things.
Thanks, the reason why I wanted to use VS is so that maybe later I wouldn't mind going into MFC. So having one platform would be nice.
So far I have done some basic things, like drawing, etc, but I find I'm having a harder time making strings and including the api's to work. Almost all of the msdn examples fail to compile properly.
I have an old book MFC for Windows 95 by MS, is it even worth looking at ?
robp said:
I disagree with levenum's comment on VS, but agree at the same time (weird I know). I wouldn't use VS for native development because it has A LOT of extra features that I think would be useless for native developers. Also, the lighter eVC++ has pretty much everything you need to write native apps.
I had this book called "Programming Windows CE 3.0" or something along those lines a few years ago. I got it for like $3 on Amazon. If you can find an updated version of that (or even the old version would be useful) then you should buy it. It will show you all you need to know to get started. You can learn the new api's from browsing msdn.
If you're only a little rusty with C/C++ I would suggest jumping right in to the Sdk samples and seeing how they do things.
Click to expand...
Click to collapse
could you provide some links for msdn. also i know how to program in c but how do i compile a program for windows ce could you recommend a free one. thanks
The only way to code for Windows Mobile for free is to use embedded Visual C++. You'll have to google it to find a link.
Once you have that downloaded, check out:
http://msdn2.microsoft.com/en-us/library/bb158662.aspx
The new solution files most probably won't open in eVC++ but you can create new projects and add the source files yourself.
You'll want to look at the samples in the Win32 folder.
robp said:
The only way to code for Windows Mobile for free is to use embedded Visual C++.
Click to expand...
Click to collapse
That's not entirely true - there's still ceGCC (it works on linux or windows using cygwin) - however this one lacks resource (window, forms, etc) editor (but if you have resources already created it will compile/link properly). But it works great with apps where you want to handle all the graphics and user interaction by yourself (like games, or programs with 100% custom UI), for example using SDL, pocketHAL, etc.
Also, wxWidgets seems to have support for windowsCE, and might be made to work with ceGCC, but i haven't tested it yet.
Sorry, I actually meant to put "(I think)" after that sentence lol.
Actually I think you should be able to use any C++ compiler as long as you have the necessary libraries, and I think all the libs you need are in the sdk download. But the easiest route for beginners in native coding is probably eVC++
Well, now i can agree with you
That is, unless you want to create games - in that case ceGCC+XFlib might be a good way to go for someone with general programming knowledge, but not familiar with winCE-specific coding. Some games coded with it (and their sources) can be found on XFlib homepage: www.xflib.net.
thanks for the info
Ok, as I wouldn't mind at a later time going into MFC, and building dll's for mobile. How much "harder" would it be for me to learn VS2005 native for ce instead of using evc++ ?
Just trying to weight the cons and the pros. BTW where can I get eVC ?
Thank you.
Two more free options: PellesC and Lazarus + WinCE add-on
I don't think it would much harder. Once you get the hang of it you'll find that it makes life much easier. If you buy a boxed retail version it comes with a nice book that will take you from n00b to master in a few hours (not really but it's still a great reference).
I think the hardest part of upgrading to newer versions of VS is learning the new project file setup. Atleast that's what it looks like from watching other students at my school go from VS6.0 to VS2k5 and 2k8.
Also, I should note that I prefer VS2008 hands-down, but I don't disagree with other people who say eVC++ is faster. While I haven't done any real native development since eVC++ 4 was new, I still dabble a bit (especially since getting active on this forum) and VS2005 works great to me.
So, my advice would be to use the newest tools available to you, unless money is an issue. But don't be worried about upgrading. Your life will only get easier once you do.
robp said:
Also, I should note that I prefer VS2008 hands-down, but I don't disagree with other people who say eVC++ is faster. While I haven't done any real native development since eVC++ 4 was new, I still dabble a bit (especially since getting active on this forum) and VS2005 works great to me.
So, my advice would be to use the newest tools available to you, unless money is an issue. But don't be worried about upgrading. Your life will only get easier once you do.
Click to expand...
Click to collapse
Well I just got eVC and will give it a try too. But I am pretty much used to vs2005. I do not think I can't afford the vs2008 right now. How much difference is there between 2005 and 2008 when it comes to programming for WM?
I'm looking to create some commercial applications for WM. For the last 10 years I'v been doing .com apps, now I figured I would do some for the mobile platform. We have all the graphics/design/marketing guys for .com, so it should work out just fine for WM.
One thing we noticed when working with exec type people is their frustration, I see exactly how we can help them resolve their frustration with WM, Symb, and java type phones...
Thanks
marek101 said:
Well I just got eVC and will give it a try too. But I am pretty much used to vs2005. I do not think I can't afford the vs2008 right now. How much difference is there between 2005 and 2008 when it comes to programming for WM?
I'm looking to create some commercial applications for WM. For the last 10 years I'v been doing .com apps, now I figured I would do some for the mobile platform. We have all the graphics/design/marketing guys for .com, so it should work out just fine for WM.
One thing we noticed when working with exec type people is their frustration, I see exactly how we can help them resolve their frustration with WM, Symb, and java type phones...
Thanks
Click to expand...
Click to collapse
Honestly I wouldn't rush to upgrade. VS2008 is better, but doesn't add much to the WM development arena.
And if you already have VS2005 and are used to it, I would stick with that and forget about eVC++. You should give the compact framework a try. I promise you'll love it
compact framework, that's a part of the .NET isn't it?.
For the time being, for learning purposes, I think I will stick with the native for now. Once I get a grip, I will explore .net. The thing is I really don't like bulky apps for WM. Most of the apps I came across that required the .net framework were slow, any apps that use the .net with a today plug in seem to really slow down my phone.
BTW is HTC Home plug in written with the .net?
Thanks
marek, it seems to me that you are under the impression that you need VS 2005 to use MFC.
eVC fully supports MFC as well as creating DLLs and MFC DLLs.
It admit the reason I don't like VS is because I only write in native and don't like .NET languages a lot.
Since you want to create commercial apps you should note that any app created with WM 5 SKD will not be backwards compatible with WM 2003 which reduces your clients range.
You should compile with WM 2003 SDK which is forward compatible.
Our primary target audience would be WM6. We will make every effort to make WM5 compatible apps. Yes it does reduces significantly the client base, but also there are many positives...
We are still looking for more programmers for the simple concepts we have developed. I believe this will work out just fine. Having WM5 support is a "would be nice" but not required. WM5 has a bag of problems, 2003 I don't even want to touch it.
Thanks
I have to admit that I love VS because I love using .net
But VS is also a much more powerful editor in general than eVC is. It's still nice but the experience isn't as smooth as it is in newer versions, which is expected since the newer versions build on the previous ones.
Hi,
I'm the author of a fairly popular j2me chat application, and I've been pondering making a native WinMo version for a while now. I've thought about a .net port, as it would probably be easiest, but all the .net programs I've used seem dead slow. Or am I totally off base with that?
Is there another environment I should look at as an alternative? Keep in mind, I don't have visual studio.
jonnycat26 said:
Hi,
I'm the author of a fairly popular j2me chat application, and I've been pondering making a native WinMo version for a while now. I've thought about a .net port, as it would probably be easiest, but all the .net programs I've used seem dead slow. Or am I totally off base with that?
Is there another environment I should look at as an alternative? Keep in mind, I don't have visual studio.
Click to expand...
Click to collapse
You can still stick with j2me, you'll just have to change a few things to make the program compatible with the java midlet managers for WinMo. You should read up on the Mildet Bible: http://forum.xda-developers.com/showthread.php?t=339579
Hope this helps
From testing open source apps and they ones I have made I found that C++ is faster and c# is easier but a little slower. I used c++ for along time but have moved on to C# and love it.
u can just develop in any .net language, then use tool like SmartAssembly to optimize and convert the code to binary.
jonnycat26 said:
Hi,
I'm the author of a fairly popular j2me chat application, and I've been pondering making a native WinMo version for a while now. I've thought about a .net port, as it would probably be easiest, but all the .net programs I've used seem dead slow. Or am I totally off base with that?
Is there another environment I should look at as an alternative? Keep in mind, I don't have visual studio.
Click to expand...
Click to collapse
Hello, I strongly recomend to use c++ for winmo dev.
cheers,
Hlov
The fastest and leanest method is C++, available in Visual Studio Professional, or as a standalone free download as Embedded C++ version 4. The development models are MFC, (Microsoft Foundation Classes), ATL (Active Template Library), or good old fashioned WIN32.
Of these WIN32 is the leanest, all the others, including .NET are wrappers around it. If you haven't used or seen WIN32 before, expect a pretty steep learning curve. Look at the Hello World example it generates, to try and figure out what the hell is going on. Basically you respond to WM_XXXXXX messages fired at your application by the operating system. Limit the main menu to two items, and WinMo 5/6 will display it correctly, with the main menu options either side of the keyboard/SIP icon, and accessible by the left and right menu buttons. Otherwise it will switch to a WM 2002/3 menubar, which you then have to click on to use.
If you want to go any lower down than this, you will need to brush up your ARM assembly language.
Unless you are developing graphics intensive applications, using c# is fine for applications. C++ is necessary if you are writing games and the like but the SLIGHT performance decrease is not that big of a deal otherwise.
Soul_Est said:
You can still stick with j2me, you'll just have to change a few things to make the program compatible with the java midlet managers for WinMo. You should read up on the Mildet Bible: http://forum.xda-developers.com/showthread.php?t=339579
Hope this helps
Click to expand...
Click to collapse
I'm using J2ME polish, so I can (and have) built a build specifically for WinMo, but I want a native version so I can multitask (can't do that with Esmertec) and I'd also like to develop a homescreen plugin.
My app is here:
http://www.buildhigh.com/jonnychat/
If anyone has any suggestions on what I should do with a port, I'd love to hear them.
stephj said:
The fastest and leanest method is C++, available in Visual Studio Professional, or as a standalone free download as Embedded C++ version 4. The development models are MFC, (Microsoft Foundation Classes), ATL (Active Template Library), or good old fashioned WIN32.
Click to expand...
Click to collapse
It's been a long time since I've done standard Win32 development, and I really don't plan on going back down that road again. For starters, I imagine Visual Studio would be a dog in a VM (I only run windows in a VM these days, won't run it on actual hardware if I can avoid it).
It's looking like I"m going to try C++ or C# for this. I'd like to do C# because that's pretty close to Java, but I also have moral qualms about using a language designed to usurp a good and popular language just because MSFT didn't develop it.
Decisions, Decisions....
You can also try using Ruby with the Rhodes framework: http://www.rhomobile.com/home
Or you can try using Mysaifu which may allow multitasking (haven't tried any of my programs on it yet): http://www2s.biglobe.ne.jp/~dat/java/project/jvm/index_en.html
I have barely developed anything since the BASIC days on the C64 and Amiga, and now feel inspired to create some financial applications for the Australian market - such as superannuation projections.
How hard is it to develop? A few standard calculations like you would see on a spreadsheet would work, with some graphing.
Most financial applications I have found are pretty basic and don't account for inflation in rising wages and fees, etc.
I believe I could attract at least a dollar for a well developed application for superannuation alone.
I have installed the Android 2.2 SDK and have no idea where to start. I presume this is some sort of emulated Android device I can test my applications on.
Are there any tutorials on how to get started? What's the development language?
All I need to do is create a simple text interface to input a few parameters to run some complex financial calculations on the back end.
A really sophisticated application would pull live interest rates or other data and enter that in.
Start with this:
developer.android. com/resources/tutorials/ hello-world.html
(take away the spaces, I cant post links yet )
These are all great tutorials that will walk you through the basic processes and applications/layouts. The only issue you will have is when/if you decide to go through the "Tabs View" tutorial, there are a lot of errors in the code, and I have no idea why no one have changed it, but you can PM me for the correct version.
If you want some basics on Java, just do a google search, there are a lot of great tutorials out there for beginning Java. I recommend doing this first, just so you have a good understanding of Java(which is the development language), it will *REALLY* help out. You can incorporate other languages, but for the time being, stick with Java.
Yes, the SDK comes with an emulator so that you can test your programs without having to install them on a real device. In addition to what Jimmy said (and I can't stres highly enough that you should start with the Android Developer's website and tutorials), you can go to Stack Overflow which is a programming Q&A website. People there are generally very helpful, as long as you've shown you've actually put some effort into solving your problem before you posted your question.
Fair enough... So it's basically about learning to programme for Java? How hard would it be, realistically, for someone with no application development experience?
You need a basic grasp of objected oriented design & programming, along with an understanding of the Java language. When it comes to gui aspects & all communication with other apps/data on the device, you have Android, rather than the usual Java class libraries such as awt or swing.
How hard? It's doable, imo, but will depend on aptitude. Start with Java & then add in Android when you feel like more material to get your head around.
So basically getting started requires me to learn application development like on any other platform, in OO and Java. I may as well do a course or something then. Would a few weeks doing some sort of intro course help?
I'm sure an appropriate course could be very helpful. Though I'd steer clear of those short courses claiming to turn anyone into a valuable skilled programmer in only xx weeks, if only because the tutor will probably know less than you on the subject. Better one which makes credible claims regarding its introductory nature. A couple of degree level intro modules on OO or Java should be of help.
I am not to sure if this is the correct area for this. But I am wondering how hard it is to make a Android game? This isn't something I want to just jump into, but learn while I am doing it and take my time.
So how challenging is it to someone who has no experience?
Thank You
Do you have any programming experience at all?
If you know languages like C++ or Java you're pretty close already. Android is programmed in Java, and you need to be familiar with Java's memory management to understand what happens behind the scenes since memory is critical on a mobile device. Also you should get some experience with multithreaded programming, since most times you'll need threads to complete tasks without getting the UI stuck.
Android uses a component based architecture that might be a bit unfamiliar in the beginning, since there's no 'main' entrypoint and you have to split your app into 'activities' that talk to each other through 'intents'.
Games present additional challenges, since they often require you to take care of several things involved with graphics and audio, so maybe they're not the ideal first step into programming.
I started programming for my phone on my Touch HD (windows mobile 6.5, using c#). I'd done some java (not a lot, really, and I hated it), some c (a bit, liked it much more) and quite a few script languages.
I have to say, I got into c# with the compact .NET framework VERY easily. It was very straightforwards, nicely syntaxed ... it was just programming as I'd known it. I've made some office apps, one or two games (just for fun, although the apps were meant to be sold ... **** MS for going wp7 and incompatible!; they were solid pieces of software engineering, if I say so myself)
Two weeks ago I got my Desire HD and a few books on programming Android ( O'Reilly, Sam's) and went looking through developer.android.com .
And I have to say, I find it hard! The concepts and how they work together are a bit ... uhm ... distributed. Good software design, but hard on the programmer (and ****ing verbose to actually type in the porgamming! Sheesh!). It took me a while to grok how all these systems are fitting together: to be honest, I'm still trying to make it all jell. All these intents, services, activities, broadcast receivers ... very interesting, but just thinking of the best (or even correct!) way of setting up your porgram is kinda difficult.
But, that's just me, in two weeks time in my spare time. I am getting it now and it is interesting (and, actually, very well set up for what they want android to do/be). c# was just easier, friendlier and faster to get into.
Sorry if this sounds negative: learning a new language isn't EASY, but it is FUN And very informative. If you have a few hours to start off with and then an hour a day, go for it ... but keep in mind there are easier/more straightforwards programming languages/environments than android (or so I think).
I would like to know this too because I got my HTC Wildfire for a few months now and I just rooted my phone yesterday to get into the whole development and modding.
I would like to learn how to make a widget first and then move onto a app/game. My goal would be to know how to create a 2D based side scroller, I would like to recreate "Bio Menace" for the Android. (I have the sprites and maps, now I only need to learn to make it into a game). (Bio Menace was my all-time favorite game when I was a child and I sometimes still play it on dosbox, but I would like to take it with me on transits to work)
I have no experience in Programming at all, I only did graphical stuff (Photoshop, 3DS Max) I know a little html for basic websites, but this was also more in Dreamweaver with the layout to designer.
So I found these books on android, but before I begin to read any of them. Can somebody tell me which book is best to start on first or which book to skip? I also like a video tutorial, but has anybody seen it? Is it any good?
Ebooks
Apress: Beginning Android 2 http://apress.com/book/view/9781430226291
Apress: Pro Android Games http://apress.com/book/view/9781430226475
Apress: Pro Android 2 http://apress.com/book/view/9781430226598
CommonsWare LLC The Busy Coders Guide to Android Development http://commonsware.com/Android/
Sam's Sams Teach Yourself Android Application Development in 24 Hours http://www.amazon.com/Teach-Yourself-Android-Application-Development/dp/0321673352
O'Reilly Media: Building Android Apps with HTML CSS and JavaScript http://oreilly.com/catalog/0636920010067
O'Reilly Media: Hello Android 3rd Edition http://oreilly.com/catalog/9781934356562
Video tutorial
O'Reilly Media: Developing Android Applications with Java, Part 1 http://oreilly.com/catalog/0636920001690
Sorry to threadjack you, but it made no sense to me to start a new thread on the same topic. There really should be an own section for noobs or a good sticky with this kind of information for noobs.
lol Im in the process of learning java right now, basic java though.
Mathods
Interfaces
Static Methods
Im pretty interested in what I need to know for development on the andriod platform. By mid/late spring I should know quite a bit more. Taking an Advanced java course. Current I only know C#, C++, and Visual Basics.
Never worked on a GUI before =(.