Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. reg Display in static control with UNICODE aware project!!!

reg Display in static control with UNICODE aware project!!!

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    ganesa moorthy
    wrote on last edited by
    #1

    Hi, My Project is set to unicode aware, and it is fine. But when i am go for displaying a text in static control in run time, like CStatic *p = (CStatic *)GetDlgItem (IDC_STATIC1); p->SetWindowText ("&Login"); The text on static control should display the text as Login and the letter "L" should accompany a underline; It is working fine with MBCS projects but not with UNICODE, How to resolve this issue? Anyone please help, :confused:

    Thanks in advance!!!!

    C 1 Reply Last reply
    0
    • G ganesa moorthy

      Hi, My Project is set to unicode aware, and it is fine. But when i am go for displaying a text in static control in run time, like CStatic *p = (CStatic *)GetDlgItem (IDC_STATIC1); p->SetWindowText ("&Login"); The text on static control should display the text as Login and the letter "L" should accompany a underline; It is working fine with MBCS projects but not with UNICODE, How to resolve this issue? Anyone please help, :confused:

      Thanks in advance!!!!

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      ganesa moorthy wrote:

      It is working fine with MBCS projects but not with UNICODE

      Please when you have a problem, give a clear description. It's not working is quite vague, there could be a lot of different situations. I suppose here that your code doesn't compile. Add a _T macro in front of your string literal: p->SetWindowText (_T("&Login"));

      Cédric Moonen Software developer
      Charting control [v1.3]

      G 1 Reply Last reply
      0
      • C Cedric Moonen

        ganesa moorthy wrote:

        It is working fine with MBCS projects but not with UNICODE

        Please when you have a problem, give a clear description. It's not working is quite vague, there could be a lot of different situations. I suppose here that your code doesn't compile. Add a _T macro in front of your string literal: p->SetWindowText (_T("&Login"));

        Cédric Moonen Software developer
        Charting control [v1.3]

        G Offline
        G Offline
        ganesa moorthy
        wrote on last edited by
        #3

        it is fine if i give p->SetWindowText(L"&Login");, Thanks a lot once again! :)

        Thanks a lot

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups