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. How to find out the window is read-only?

How to find out the window is read-only?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialvisual-studiodebuggingquestion
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.
  • K Offline
    K Offline
    Kurotora
    wrote on last edited by
    #1

    Hi, If you see a caret on window, you can type character in or not depending on the purpose of the window. For Edit class window, we can find out the window is read-only or not by checking window style bit (ES_READONLY). Though, for user defined window class(es), I don't know how to do this. For example, debug output window of VC IDE has caret but that window is read-only. I want to know a way to find out given window which has a caret is a read-only or not. Why? The reason is I'm writing a tool that shows caps-lock status using tiny icon that chases caret, but for read-only window, I want to disable this chasing. If you don't understand what I want to do in my app, please just igonre this. Important thing to me is, a way to know window is read-only or not. (FYI: Have you ever heared about IME (input method editor)? IME seems to know a way I want to do.) I love Code Project, do you? Kurotora

    L 1 Reply Last reply
    0
    • K Kurotora

      Hi, If you see a caret on window, you can type character in or not depending on the purpose of the window. For Edit class window, we can find out the window is read-only or not by checking window style bit (ES_READONLY). Though, for user defined window class(es), I don't know how to do this. For example, debug output window of VC IDE has caret but that window is read-only. I want to know a way to find out given window which has a caret is a read-only or not. Why? The reason is I'm writing a tool that shows caps-lock status using tiny icon that chases caret, but for read-only window, I want to disable this chasing. If you don't understand what I want to do in my app, please just igonre this. Important thing to me is, a way to know window is read-only or not. (FYI: Have you ever heared about IME (input method editor)? IME seems to know a way I want to do.) I love Code Project, do you? Kurotora

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      For example, debug output window of VC IDE has caret but that window is read-only. Probably because it's based on a RichEdit control. Read-only RichEdit windows will allow a user to click and place the cursor. In fact, if you write to a read-only RE window, the text could get placed wherever the user has placed the cursor. :eek: For what you're doing, why does checking the status of the window not work?

      K 1 Reply Last reply
      0
      • L Lost User

        For example, debug output window of VC IDE has caret but that window is read-only. Probably because it's based on a RichEdit control. Read-only RichEdit windows will allow a user to click and place the cursor. In fact, if you write to a read-only RE window, the text could get placed wherever the user has placed the cursor. :eek: For what you're doing, why does checking the status of the window not work?

        K Offline
        K Offline
        Kurotora
        wrote on last edited by
        #3

        Why do you think that debug output window is based on RichEdit? It dosen't seem to me so. I inspected that window using spy and nothing tells me it's read-only. I love Code Project, do you? Kurotora

        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