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. What is the value of Ctrl+Z in terms of CString?

What is the value of Ctrl+Z in terms of CString?

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
11 Posts 7 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.
  • L Le rner

    Hi all, please help me to tell about the the String value of Ctrl+Z. please tell me what string i use in place of Ctrl+Z. thanks in advance.

    K Offline
    K Offline
    KingsGambit
    wrote on last edited by
    #2

    What is meant by string value of Ctrl+Z?

    L 1 Reply Last reply
    0
    • K KingsGambit

      What is meant by string value of Ctrl+Z?

      L Offline
      L Offline
      Le rner
      wrote on last edited by
      #3

      i want to use it over serial port so i need this. i mean How to write ctrl-z to a serial port?

      Mircea PuiuM K _ 3 Replies Last reply
      0
      • L Le rner

        i want to use it over serial port so i need this. i mean How to write ctrl-z to a serial port?

        Mircea PuiuM Offline
        Mircea PuiuM Offline
        Mircea Puiu
        wrote on last edited by
        #4

        The value for CTRL-Z (^Z) is 26 (decimal). It is often used as an end-of-file marker (DOS). You might also find useful to know that CTRL-A (^A) is 1 and that all the others, i.e. CTRL-B through CTRL-Y characters fall in between (CTRL-B is 2, CTRL-C is 3, and so on). char c[2]; c[0] = (char)26; c[1] = 0; CString cstring; cstring = CString( c);

        SkyWalker

        1 Reply Last reply
        0
        • L Le rner

          i want to use it over serial port so i need this. i mean How to write ctrl-z to a serial port?

          K Offline
          K Offline
          KingsGambit
          wrote on last edited by
          #5

          Following ascii chart shows value of Ctrl+Z is 26: http://www.physics.udel.edu/~watson/scen103/ascii.html[^]

          1 Reply Last reply
          0
          • L Le rner

            i want to use it over serial port so i need this. i mean How to write ctrl-z to a serial port?

            _ Offline
            _ Offline
            _Superman_
            wrote on last edited by
            #6

            Try this -

            CString cs;
            cs.Format(_T("%c"), 26);

            «_Superman_» I love work. It gives me something to do between weekends.
            Microsoft MVP (Visual C++)

            L 1 Reply Last reply
            0
            • _ _Superman_

              Try this -

              CString cs;
              cs.Format(_T("%c"), 26);

              «_Superman_» I love work. It gives me something to do between weekends.
              Microsoft MVP (Visual C++)

              L Offline
              L Offline
              Le rner
              wrote on last edited by
              #7

              Thanks for all ur support its done now. its real value for serail port is "\x1A\r\n"

              K 1 Reply Last reply
              0
              • L Le rner

                Thanks for all ur support its done now. its real value for serail port is "\x1A\r\n"

                K Offline
                K Offline
                KingsGambit
                wrote on last edited by
                #8

                Yes 0xA1 is 26 in decimal.

                D 1 Reply Last reply
                0
                • K KingsGambit

                  Yes 0xA1 is 26 in decimal.

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #9

                  0x1a = 26 0xa1 = 161

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "Man who follows car will be exhausted." - Confucius

                  1 Reply Last reply
                  0
                  • L Le rner

                    Hi all, please help me to tell about the the String value of Ctrl+Z. please tell me what string i use in place of Ctrl+Z. thanks in advance.

                    C Offline
                    C Offline
                    Cool_Dev
                    wrote on last edited by
                    #10

                    i think Ctrl+Z key combination genrates an end of file marker character which is defined by the EOF macro. --Cool_Dev--

                    1 Reply Last reply
                    0
                    • L Le rner

                      Hi all, please help me to tell about the the String value of Ctrl+Z. please tell me what string i use in place of Ctrl+Z. thanks in advance.

                      A Offline
                      A Offline
                      armecos
                      wrote on last edited by
                      #11

                      Do you want to know the value of Ctrl+Z? It's so easy! You don't need to ask anyone,you don't need the characters table. What you need to do is: Run ComTrace, then type the "Ctrl+Z" in HyperTerminal,It's ok! You can get '1A' http://www.armecos.com/en/comtrace.html[^]

                      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