1

i want to design sample form for in windows phone 8 like below screen shot:

enter image description here

below code for hello world example

// Include header files for S3E (core system) and IwGx (rendering) modules
#include "s3e.h"
#include "IwGx.h"

// Standard C-style entry point. This can take args if required.
int main()
{
    // Initialise the IwGx drawing module
    IwGxInit();

    // Set the background colour to (opaque) blue
    IwGxSetColClear(0, 0, 0xff, 0xff);

    // Loop forever, until the user or the OS performs some action to quit the app
    while(!s3eDeviceCheckQuitRequest()
          && !(s3eKeyboardGetState(s3eKeyEsc) & S3E_KEY_STATE_DOWN)
          && !(s3eKeyboardGetState(s3eKeyAbsBSK) & S3E_KEY_STATE_DOWN)
          )
    {
        // Clear the surface
        IwGxClear();

        // Use the built-in font to display a string at coordinate (120, 150)
        IwGxPrintString(120, 150, "Hello, World!");

        // Standard EGL-style flush of drawing to the surface
        IwGxFlush();

        // Standard EGL-style flipping of double-buffers
        IwGxSwapBuffers();

        // Sleep for 0ms to allow the OS to process events etc.
        s3eDeviceYield(0);
    }

    // Shut down the IwGx drawing module
    IwGxTerminate();

    // Return
    return 0;
}

i tried lots of search about how to create button and textbox and add listener for button using c++ code on marmalade sdk but didn't find any thing any one help me will be greatly appreciated.

0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184
Stack Overflow User
  • 4,052
  • 6
  • 29
  • 47

1 Answers1

2

You need to use IwUI api. Check the examples which came with marmalade SDK or use the launchpad. There're some nicely commented examples which demonstrate the use of IwUI and if you want native looking controls you can try IwNUI too. The IwNUI module is not yet added for Windows 8 platform due to some bug, but will be added soon.

0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184
  • thanks for your answer! can you tell me how to create textbox in windows phone 8 with marmalade? – Stack Overflow User Jul 12 '13 at 10:01
  • You mean TextLabel? I'd recommend you to see IwUIRSS example or IWUI Kitchen sink example. I can briefly explain it here. You'll need to have a CIwUILabel and assign it to IwUIViewCOntroller.Or you should have a CIwUIElement as a parent and assign all the CIwUILabels as children and assign the Parent to the ViewCOntroller. FOr more details check the examples. – 0xC0DED00D Jul 12 '13 at 10:09
  • CIwUILabel is supported on windows phone 8? i want get input form user how to do that can you give any tips? – Stack Overflow User Jul 12 '13 at 10:19
  • IwUI is supported on Windows Phone 8, that's what is mentioned in the doc atleast. If you want to take input from users, you might want to use CIwUITextField, instead of CIwUILabel. – 0xC0DED00D Jul 12 '13 at 10:24
  • +1 thanks for guidance :) can you tell me how to get text from CIwUITextField? – Stack Overflow User Jul 12 '13 at 10:34
  • CIwUITextField tf; tf->GetCaption(); – 0xC0DED00D Jul 12 '13 at 11:05
  • i have only one doubt s3e compass is supported in windows phone 8? – Stack Overflow User Jul 12 '13 at 11:13
  • You should ask separate question for that. In one post you're allowed to ask just one question. – 0xC0DED00D Jul 12 '13 at 11:46