locked
Is it possible to drag and drop any controls in home window via Resource in Windows Mobile 6.0 Professional SDK C++ Win32 development? RRS feed

  • Question

  • Hello,

    It may be a simple question, but as i'm new to Windows Mobile development, i'm wondering where i can get the help of creating button controls for Windows Mobile 6.0 Professional SDK development for PPC devices?
    I am developing an application, where i have to keep three buttons in the center of the application home window. As same in the other mobile platform development, i thought i can drag and drop button controls or any controls from project resources and handling it in code. But i, no where found the home screen window of my application in project Resource and add button control there. [Note: I created a project in WIndows Mobile 6 Professional Visual C++ Smart Device Win 32 project]. 
    Is it possible in Windows Mobile 6.0 rofessional SDK development for PPC devices to drag and drop any button controls in home window or any other window of the application? (Or) Is it only way to create all resources programmatically and run the app to see the output?

    Thanks. I appreciate your response and direct me the links or samples.


    MartinNov.


    Thursday, February 25, 2010 10:35 AM

Answers

  • >>Is it possible in Windows Mobile 6.0 rofessional SDK development for PPC devices to drag and drop any button controls in home window or any other window of the application? (Or) Is it only way to create all resources programmatically and run the app to see the output?

    You can create a dialog based MFC application. To do so click File > New project > Visual C++ > Smart Device > MFC Smart Device Application, and then select "dialog based" as the application type in the wizard.

    Please read the following guides for more information (they are a bit old but you get the idea):
    A Beginners Guide to Dialog Based Applications - Part One
    http://www.codeproject.com/KB/dialog/dialogapptute.aspx 
    Visual C++/MFC Tutorial - Lesson 5: Dialog-Based Applications
    http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c841 


    Please mark the post that helps you, and unmark that does not. This benefits our community.
    • Marked as answer by warrentang Wednesday, March 3, 2010 5:48 AM
    Monday, March 1, 2010 7:04 AM
  • The following article will help you then:

    Program with a Dialog Box as the Main Window
    http://www.relisoft.com/Win32/windlg.html 

    Please mark the post that helps you, and unmark that does not. This benefits our community.
    • Marked as answer by MartinNov Wednesday, March 3, 2010 8:52 AM
    Wednesday, March 3, 2010 7:20 AM

All replies

  • Martin, when you create a Win32 application for Windows Mobile 6 Pro using the application wizard, then the code that is generated by the wizard does not use dialogs (if you don't count the About dialog), the main screen window is created programmatically using CreateWindow(), that is why you don't see it in the resource editor. If you open the 'About' dialog in the resource editor, then you ll see that you are able to drag and drop buttons and other controls on it.

    Sometime back I wrote a post on creating a Win Mob application from scratch, without using any auto-generated code. You can take a look here , might be useful.


    Prabhu
    Thursday, February 25, 2010 1:10 PM
  • >>Is it possible in Windows Mobile 6.0 rofessional SDK development for PPC devices to drag and drop any button controls in home window or any other window of the application? (Or) Is it only way to create all resources programmatically and run the app to see the output?

    You can create a dialog based MFC application. To do so click File > New project > Visual C++ > Smart Device > MFC Smart Device Application, and then select "dialog based" as the application type in the wizard.

    Please read the following guides for more information (they are a bit old but you get the idea):
    A Beginners Guide to Dialog Based Applications - Part One
    http://www.codeproject.com/KB/dialog/dialogapptute.aspx 
    Visual C++/MFC Tutorial - Lesson 5: Dialog-Based Applications
    http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c841 


    Please mark the post that helps you, and unmark that does not. This benefits our community.
    • Marked as answer by warrentang Wednesday, March 3, 2010 5:48 AM
    Monday, March 1, 2010 7:04 AM
  • Hi Prabhu,

    You are correct. I got it now. But, i want to have home screen window( which has already created by CreateWindow() ). But as you said, why do i need to open About dialog and add button controls there though it is possible? I want to have three buttons in the center of home screen(windows), not anywhere else. Please advise how can i add button controls in the home screen window whether through resource or program.

    Thanks

    Martin.
    Wednesday, March 3, 2010 6:26 AM
  • Thanks Chunsheng Tang . But i want to do in win32.
    Wednesday, March 3, 2010 6:26 AM
  • The following article will help you then:

    Program with a Dialog Box as the Main Window
    http://www.relisoft.com/Win32/windlg.html 

    Please mark the post that helps you, and unmark that does not. This benefits our community.
    • Marked as answer by MartinNov Wednesday, March 3, 2010 8:52 AM
    Wednesday, March 3, 2010 7:20 AM
  • Wednesday, March 3, 2010 8:29 AM