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. Japanese character

Japanese character

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
7 Posts 4 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.
  • R Offline
    R Offline
    Ram Murali
    wrote on last edited by
    #1

    Dear all, I would like to display japanese character in my editbox, and the no of characters should be 32. that means its not 32 japanese characters. its 32 keyboard strokes. If a user enters 32 keyboard strokes, then the edit box shouldnt display the character which was pressed after 32. Can anyone please help me on this? Thanks in advance.

    Regards, Ram

    V R 2 Replies Last reply
    0
    • R Ram Murali

      Dear all, I would like to display japanese character in my editbox, and the no of characters should be 32. that means its not 32 japanese characters. its 32 keyboard strokes. If a user enters 32 keyboard strokes, then the edit box shouldnt display the character which was pressed after 32. Can anyone please help me on this? Thanks in advance.

      Regards, Ram

      V Offline
      V Offline
      Vikram A Punathambekar
      wrote on last edited by
      #2

      It's been a long time since I did C++, but surely it should be easy to handle the event and maintain a character count? Of course, make sure to _reduce_ the count if the user hits Backspace/Del. Also, you shouldn't increase the count if a non-char key, like Ctrl or the arrow keys was pressed. Also, pay attention to the paste operation!

      Cheers, Vıkram.


      After all is said and done, much is said and little is done.

      R 1 Reply Last reply
      0
      • V Vikram A Punathambekar

        It's been a long time since I did C++, but surely it should be easy to handle the event and maintain a character count? Of course, make sure to _reduce_ the count if the user hits Backspace/Del. Also, you shouldn't increase the count if a non-char key, like Ctrl or the arrow keys was pressed. Also, pay attention to the paste operation!

        Cheers, Vıkram.


        After all is said and done, much is said and little is done.

        R Offline
        R Offline
        Ram Murali
        wrote on last edited by
        #3

        I was trying to catch the character by the onchangeeditbox() function. But if i press a char in keyboard it doesnt come to that function. after i press enter only it will go to that function. thats why i couldnt able to count the no of chars.

        Regards, Ram

        1 Reply Last reply
        0
        • R Ram Murali

          Dear all, I would like to display japanese character in my editbox, and the no of characters should be 32. that means its not 32 japanese characters. its 32 keyboard strokes. If a user enters 32 keyboard strokes, then the edit box shouldnt display the character which was pressed after 32. Can anyone please help me on this? Thanks in advance.

          Regards, Ram

          R Offline
          R Offline
          Rajkumar R
          wrote on last edited by
          #4

          Hi, I donot know whether u have tried this. CEdit::SetLimitText(32)

          R 1 Reply Last reply
          0
          • R Rajkumar R

            Hi, I donot know whether u have tried this. CEdit::SetLimitText(32)

            R Offline
            R Offline
            Ram Murali
            wrote on last edited by
            #5

            ya i tried this too. I set a limit to 32. may be let me explain a bit about japanese fonts using English keyboard. the OS will wait until a user presses enter to confirm the char. otherwise all the typed characters will be in buffer. So once i reach 32 charecters, i can still type characters without pressing enter. if i press enter, anything more than 32 chars will be truncated off.

            Regards, Ram

            R S 2 Replies Last reply
            0
            • R Ram Murali

              ya i tried this too. I set a limit to 32. may be let me explain a bit about japanese fonts using English keyboard. the OS will wait until a user presses enter to confirm the char. otherwise all the typed characters will be in buffer. So once i reach 32 charecters, i can still type characters without pressing enter. if i press enter, anything more than 32 chars will be truncated off.

              Regards, Ram

              R Offline
              R Offline
              Rajkumar R
              wrote on last edited by
              #6

              Normally, SetLimitText() will not allow more than the specified characters. It doesnot require pressing enter key. Iam not sure about japanese fonts. If SetlimitText doesnot work i thing u need to handle many windows events like WM_KEYDOWN, ...

              1 Reply Last reply
              0
              • R Ram Murali

                ya i tried this too. I set a limit to 32. may be let me explain a bit about japanese fonts using English keyboard. the OS will wait until a user presses enter to confirm the char. otherwise all the typed characters will be in buffer. So once i reach 32 charecters, i can still type characters without pressing enter. if i press enter, anything more than 32 chars will be truncated off.

                Regards, Ram

                S Offline
                S Offline
                Sameerkumar Namdeo
                wrote on last edited by
                #7

                As you earlier said that the control comes to onchangeeditbox() only when you press ENTER key, then let the control come to this function. Afterwards you can take the data of Edit box in some array and do the necessary manipulation in array i.e make the data 32 character long....and then display the data in this modified array in Edit box.

                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