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. Watch Window Formatting

Watch Window Formatting

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
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.
  • M Offline
    M Offline
    Mark Donkers
    wrote on last edited by
    #1

    A friend of mine introduced me to this "trick" with the watch window. When watching an HRESULT, you can format the result to something that makes a little more sense. Here's an example... If I have a variable HRESULT hr; and if I put hr,hr in the watch window it formats the value of hr into text. So if the hr = 0 the watch window would read "S_OK". Does anyone know of other cool watch window tricks like this? TIA Mark Donkers A witty saying proves nothing. -- Voltaire

    M 1 Reply Last reply
    0
    • M Mark Donkers

      A friend of mine introduced me to this "trick" with the watch window. When watching an HRESULT, you can format the result to something that makes a little more sense. Here's an example... If I have a variable HRESULT hr; and if I put hr,hr in the watch window it formats the value of hr into text. So if the hr = 0 the watch window would read "S_OK". Does anyone know of other cool watch window tricks like this? TIA Mark Donkers A witty saying proves nothing. -- Voltaire

      M Offline
      M Offline
      Martin Ziacek
      wrote on last edited by
      #2

      You mean something like here: http://msdn.microsoft.com/library/en-us/vcug98/html/\_asug\_symbols\_for\_watch\_variables.asp?frame=true don't you? And except that, you can use for example ERR, to show last error, instead of calling GetLastError(). Martin

      M 1 Reply Last reply
      0
      • M Martin Ziacek

        You mean something like here: http://msdn.microsoft.com/library/en-us/vcug98/html/\_asug\_symbols\_for\_watch\_variables.asp?frame=true don't you? And except that, you can use for example ERR, to show last error, instead of calling GetLastError(). Martin

        M Offline
        M Offline
        Mark Donkers
        wrote on last edited by
        #3

        Martin, This is perfect! Thanks a million :-D Mark Donkers A witty saying proves nothing. -- Voltaire

        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