Geeks With Blogs
Prabhu Kumar a tech twaddler..
In this series of posts I will show how we can create a basic UI application for a Windows Mobile Professional device from scratch, without having to go through all the hidden stuff that the wizard does to your application (the stdafx's). And there is another reason why I would want to create an application from scratch, while porting applications, which were built using VS2005, to a BSP (in a build environment) I have faced lot of annoying problems. It throws a lot of compilation errors, and its a pain to resolve them. To make the application a little more useful, the application will display all the current running processes, and you will be able to refresh the view. I am planning to use a List View control for this, instead of a stale list box for two reasons, One I have never used a list view control and two you can display icons in a list view, cool right? Anyways, I have just started with the application. More posts coming soon.
Posted on Wednesday, May 13, 2009 8:20 PM | Back to top


Comments on this post: Applications: Creating a simple UI application from scratch

# re: Applications: Creating a simple UI application from scratch
Requesting Gravatar...
Hi Prabhu,

I have just started development on the Windows Mobile platform. It's good to see that you care to share knowledge with others this way.
I am currently working on a usability feature for an application. Now my application has a custom menubar with a few buttons that I had created using SHCreateMenuBar(). I now wish to make this menubar transparent, so that the buttons appear to give a floating effect and the user can get a better experience, and also he gets the ability to view beyond the menubar into the screen, thus utilizing the small screen in a better manner.

I have tried using TBSTYLE_FLAT, TBSTYLE_TRANSPARENT, but they don't seem to do the job.

I would be very grateful if you could help me out in this regard. Hoping to hear from you soon.

Regards,
Sarang.
Left by Sarang Paramhans on May 14, 2009 11:24 AM

# re: Applications: Creating a simple UI application from scratch
Requesting Gravatar...
Sarang,

I too tried the TRANSPARENT and FLAT styles on the menu bar, on a Win Mob 6 Pro emulator, but to no effect. This seems to be an interesting problem, because according to the documentation it should work. My next step would be to do some more searching and then try to override the WndProc of menu bar, intercept the WM_PAINT message and try to paint the entire menubar transparently. Meanwhile if you get some lead on this do let me know. Thanks.
Left by Prabhu on May 15, 2009 4:24 PM

# re: Applications: Creating a simple UI application from scratch
Requesting Gravatar...
Hey Prabhu,

Sorry! I wasn't able to communicate over the weekend. I too tried using the TRANSPARENT and FLAT styles alongwith the CreateToolBarEx function, it does not work in a standalone app, but when i tried using it in my app(the product for which i'm making these usability features), it kind of worked, but did not place the menubar correctly. This method too is not of much help, as I need to refresh the menubar background almost every instant with response to the main window background. The main window background keeps changing every instant, and that change is not recorded into the menubar background, Thus the initial effect is compromised.

I also saw this post from Alex Yekhin, on compelling UI features, he seems to have done something in C#, he has not used any menubar, he has just placed to rectangular buttons in front of the softkeys(but is able to achieve the transparent effect).
You could go through http://msdn.microsoft.com/en-us/library/dd630622.aspx and http://code.msdn.microsoft.com/uiframework/Release/ProjectReleases.aspx?ReleaseId=2315, to see the code.

Thanks for your great support in this regard, hope to hear from you soon.


Left by Sarang Paramhans on May 19, 2009 5:14 PM

# re: Applications: Creating a simple UI application from scratch
Requesting Gravatar...
Hi Sarang,

Well, I tried the things which I mentioned above involving trapping the WM_PAINT message, but guess what, in case of a soft menu bar I never get a WM_PAINT message in my window proc!

Just for curiosity's sake, I tried to intercept the WM_PAINT message of a normal BUTTON, and I was able to do that. In the WM_PAINT message I just drew a string and returned TRUE, meaning I have handled paint and the OS does not need to do anything. But this didn't work out so well, the text never showed.

I am no UI expert but I guess, trying to achieve transparency (or any custom drawing) with native code is some task and I don't know any managed languages (so maybe now is the time to start learning :)

I have seen the webcast by Alex Yakhnin on Creating compelling UI's but its all managed code and I dont know how to relate them to native.
Left by Prabhu on May 19, 2009 10:06 PM

# re: Applications: Creating a simple UI application from scratch
Requesting Gravatar...
hi Prabu,

I have jus started to work on WinCe 6.0 could u help me in creating a customised menu in emulator
Left by sunil on Oct 07, 2010 5:56 PM

# re: Applications: Creating a simple UI application from scratch
Requesting Gravatar...
Hi Sunil,
Take a look at these following posts, they might be helpful to you,
Part 1 of 3
Fun With Menus!
Fun With Menus - Part 2

What do you mean when you say customized menu?
Left by Prabhu on Oct 08, 2010 5:14 PM

Your comment:
 (will show your gravatar)


Copyright © TechTwaddle | Powered by: GeeksWithBlogs.net