none
Writing text to an LCD screen / WinCE6.0+VS2005

    Question

  • Anyone have any idea why won't this code won't work for WinCE6.0/PlatformBuilder/VS2005+MFC for an LCD on a smart device ARM development kit?  It works in the OnPaint() function only, but nowhere else in the code like from a button control handler:

    CPaintDC dc2 (this);

    dc2.SetTextColor (RGB (0,0,255));

    dc2.SetBkColor(RGB(255,0,0)); 

    int num2 = 123;

    WCHAR string2[11];

    size_t strlen2 = 11;           //max string length of integer

    LPCTSTR format2 = L"%s %d";

    WCHAR* insert2 = L"screen";

    StringCchPrintfW(string2,strlen2,format2,insert2,num2);  //convert int to LPCTSTR `

     ExtTextOut(dc2,50,50,0,NULL,string2,strlen2,NULL);      //wcslen for wide characters

    (Tried using a Rectangle, but that made no difference.)

    Thanks for your help.  CM007


    • Edited by CodeMan007 Thursday, February 16, 2012 3:40 PM
    Thursday, February 16, 2012 5:11 AM

Answers

All replies