Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I'm having strange behavior on my device. Using the Brew MP app
wizard in VS2008, I use to be able to get the "Hello World" display on
my device, but for some reason, I can't get it to display. It shows up
in the simualtor but the screen just goes blank on the device.

 

What odd is I can draw a filled rectangle to the same display an dit works in both the simulator and the device.

 

My code below is straight from the App wizard with the addition of the red rectangle lines I added.

 

 

  // If the text was successfully loaded from resource file into buffer:

    if (0 <  nStrLen) {

        // Set user-text color to black:

        oldTextColor = IDisplay_SetColor(pMe->piDisplay, 

                                         CLR_USER_TEXT, 

                                         MAKE_RGB(255,0,0));

 

        IDisplay_DrawText(pMe->piDisplay, // Display instance.

                        AEE_FONT_BOLD, // Use Bold font.

                        szBuf,         // String buffer containing text.

                        -1,     // Automatically compute string length.

                        0,      // x-coordinate ignored since IDF_ALIGN_CENTER.

                        0,      // y-coordinate ignored since IDF_ALIGN_MIDDLE.

                        NULL,   // No clipping.

                        IDF_ALIGN_CENTER | // Center-align horizontally.

                        IDF_ALIGN_MIDDLE); // Middle-align vertically.

    }

 

    // Restore previous color:

    IDisplay_SetColor(pMe->piDisplay, CLR_USER_TEXT, oldTextColor);

 

// Draw a red rectangle on the screen

    SETAEERECT( &rc, 30, 30, 30, 30);

    IDisplay_DrawRect(pMe->piDisplay, &rc, RGB_BLACK, MAKE_RGB(255,0,0), IDF_RECT_FILL);

 

 

    IDisplay_Update (pMe->piDisplay);

String may not be successfully loaded and hence nStrLen might be 0,
failing  if (0 <  nStrLen) condition. I think string resource is
loaded from BAR file, did you loaded BAR file to device?. Please debug
on device using Click2Debug VS plug-in.

String may not be successfully loaded and hence nStrLen might be 0,
failing  if (0 <  nStrLen) condition. I think string resource is
loaded from BAR file, did you loaded BAR file to device?. Please debug
on device using Click2Debug VS plug-in.