Archive for the ‘Programming’ Category

Ever wondered how contact application searches using all the character mapping of a key?When you press the “2” key it matches all the contacts 

with ‘a’,’b’ and ‘c’. If you want to have the same kind of functionality in your application then the magic lies in the following registry key:

 “KeyboardMappings” = REG_SZ

This has the mappings for all the keys and there corresponding character values.


Read Full Post »

When trying to display notification ballon you must have observed that they are displayed at the bottom of the screen.Whereas applications like volume control,clock display it at the top of the screen.This is much more intutive and user freindly, especially in the scenario when you are displaying it in response to user clicking at your icon. You can also do the same :

In the SHNOTIFICATIONDATA structure give the following value to the clsid member:

{ 0x99de7411, 0x772f, 0x43d0, { 0x81, 0xf0, 0x66, 0x83, 0x36, 0xca,
0x65, 0x1b } }

Read Full Post »

Crating status bar windows is easy enough, you just need to use CreateStatusWindow function and you won’t forget to set WS_VISIBLE and WS_CHILD flag, would you?

When you are trying to set the background color of the status bar it’s easy again, if its simple, you just need to send SB_SETBKCOLOR message to status part. But the fun starts when you have set parts in your status bar. In this case parts would have the default color,so it would look as if border color has been setup.

To solve this issue you would need handle WM_DRAWITEM message in your WndProc. The lParam in this case is a pointer to LPDRAWITEMSTRUCT.

Eg.: code inside WM_DRAWITEM


HBRUSH hBrush;



FillRect(lpDrawStruct->hDC, &lpDrawStruct->rcItem, hBrush);

Read Full Post »

Recently I was trying to extend the menu of the Phone context in windows mobile 6 device.We hit a strange problem.As long as we were inserting Menu it was fine,but when we tried to insert Sub menu, all the main menu items were automatically inserted in the Submenu. E.g. If main Menu has a menu item “Create Note” the same menu item would reappear in the submenu. And what was really weird was that when you click on that it would launch the Note application. After lot of head scratching we couldn’t solve it. We later came to know that it is a bug and has been solved in Windows Mobile 6 AKU 0.3.

So guys if you hit this issue, please don’t scratch your head 🙂

Read Full Post »

Came across these interesting links for white-papers on Security on Windows Mobile.

1.Security considerations for Windows Mobile Messaging in the Enterprise: This white-paper covers the security consideration on the device,Security considerations within the corporate network and Security considerations on the network.

2.Security Model for Windows Mobile 5 and Windows Mobile 6: This white-paper deals with provisioning and managing windows mobile 5/6 device.

Read Full Post »

Came across this interesting link today. Channel 9 guys have created a wiki for the Wince base port development. I am sure this would be welcomed whole heartedly by whole lot of BSP developers,since there are only a couple of books that I know of of Windows Ce BSP development,and they are quite old.

This should be fun to follow,here is the link:

Big Book of BSP

Read Full Post »

Windows Mobile 6 SDK comes with a real kool tool called “Cellular Emulator”.Check it out if havent already.It lets you simulate a 2G and 3G network on an emulator.You can also send sms from cellular emulator to wm6 device emulator and vice versa. It also supports making phone calls,making it realy helpful tool when you are developing application which would use these features.Eg. An application to intercept incoming call notifications or SMS notifications.

It is realy easy to setup also.

  1. Run Cellular Emulator on desktop PC. Check the status bar for the COM port. eg. it displayes COM3 in mine.
  2. Run the Windows Mobile 6 emulator.
  3. In the emulator go to File->Configure->Peripherals-> in the serial port 0,give the COM port as what is shown in the status bar of Cellular Emulator. For.eg. COM3
  4. Perform soft reset of emulator

You are ready to rock and roll 🙂

Read Full Post »

Older Posts »