tags:

views:

95

answers:

1

Hello,

I am creating a Windows Mobile 6.0 Professional SDK based Win 32 smart device project in Visual Studio. I need to create three button controls in the center of the home screen window of my app. I am new to Windows Mobile development. After i created the project, i am seeing in the project resource (.rc file), none of the item shows the main home window there. Also, toolbox is empty. How can i create button controls through project resource in WM 6.0 professional SDK using Smart device Win32 application? I didn't find any nice article though to go ahead.

Could some one guide me?

Thank you.

A: 

Sorry, it's not really an answer.

I created a new project in VS 2008 SP1 by choosing in 'Project type', Other languages / Visual C++, Smart Device, then in Templates: Win32 Smart Device project, then chose the WinMo 6 Pro SDK and Windows application.

In the resource view, under Dialog, I have 2 about boxes. Double-clicking one gets me the designer, with the toolbox containing the usual array of controls.

If your toolbox is empty, try 'Reset toolbox' from its context menu. If you still don't get anything, you may need to repair VS or the Mobile SDK.

Edit: What you can do in order to get designer support for the main window is an application whose main window is a dialog box. When the dialog box is closed, the app terminates. This way, you get designer support for your main window.

In order to do this, edit the VS-generated InitInstance method and instead of:

ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);

return TRUE;

at the end, have:

DialogBox(g_hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, About);

return FALSE;

Here I show the about box as an example, of course, you'll create another window in the designer.

Timores
I'll try your suggestions and get back. Thank you.
Hi Timores, whatever you have said on a Dialogbox.That's fine for me too.But i want to have home screen(form?) of my application where i need to place three buttons in center of the screen, which i don't know how to create home screen form and add buttons.Not in About dialog boxes.
I've edited the answer.
Timores