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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. edit control

edit control

Scheduled Pinned Locked Moved C / C++ / MFC
helpwpfquestion
4 Posts 3 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
    kumar_mk
    wrote on last edited by
    #1

    Hi, this is a low priority bug of my application, i have an Edit control (READ-ONLY property is TRUE, TABSTOP property is FALSE) which is used to display some Message. The problem is that the "Message" of the edit control is getting selected when i am pressing the UP arrow key from the OK and CANCEL buttons of the dialog box, the "Message" should not get selected, how?? one thing i have written this code in OnInitDialog() to show the message in BOLD/BIGGER font CFont myFont; myFont.CreatePointFont(120, _T("Arial"), NULL); CEdit* pBoxOne; pBoxOne = (CEdit*)GetDlgItem(IDC_STATUS_EDIT); pBoxOne->SetFont(&myFont, TRUE); i have tried checking and unchecking all the styles, extented styles in edit properties, but of no use, may be this problem is arising because of the code i have written for the FONT, do i need to add anything extra in the code?? Pls Help!!!

    thanx in advance kumar

    N A 2 Replies Last reply
    0
    • K kumar_mk

      Hi, this is a low priority bug of my application, i have an Edit control (READ-ONLY property is TRUE, TABSTOP property is FALSE) which is used to display some Message. The problem is that the "Message" of the edit control is getting selected when i am pressing the UP arrow key from the OK and CANCEL buttons of the dialog box, the "Message" should not get selected, how?? one thing i have written this code in OnInitDialog() to show the message in BOLD/BIGGER font CFont myFont; myFont.CreatePointFont(120, _T("Arial"), NULL); CEdit* pBoxOne; pBoxOne = (CEdit*)GetDlgItem(IDC_STATUS_EDIT); pBoxOne->SetFont(&myFont, TRUE); i have tried checking and unchecking all the styles, extented styles in edit properties, but of no use, may be this problem is arising because of the code i have written for the FONT, do i need to add anything extra in the code?? Pls Help!!!

      thanx in advance kumar

      N Offline
      N Offline
      Nishad S
      wrote on last edited by
      #2

      kumar_windows wrote:

      may be this problem is arising because of the code i have written for the FONT

      Why didn't you try to comment out this code and try? ;) Actually what you got is the basic behaviour. I would like to handle this problem in PreTranslateMessage of the dialog... :)

      - NS -

      1 Reply Last reply
      0
      • K kumar_mk

        Hi, this is a low priority bug of my application, i have an Edit control (READ-ONLY property is TRUE, TABSTOP property is FALSE) which is used to display some Message. The problem is that the "Message" of the edit control is getting selected when i am pressing the UP arrow key from the OK and CANCEL buttons of the dialog box, the "Message" should not get selected, how?? one thing i have written this code in OnInitDialog() to show the message in BOLD/BIGGER font CFont myFont; myFont.CreatePointFont(120, _T("Arial"), NULL); CEdit* pBoxOne; pBoxOne = (CEdit*)GetDlgItem(IDC_STATUS_EDIT); pBoxOne->SetFont(&myFont, TRUE); i have tried checking and unchecking all the styles, extented styles in edit properties, but of no use, may be this problem is arising because of the code i have written for the FONT, do i need to add anything extra in the code?? Pls Help!!!

        thanx in advance kumar

        A Offline
        A Offline
        Akt_4_U
        wrote on last edited by
        #3

        Pls make the "Disabled" property of Edit control TRUE. Then it will not get selected. Praveen

        Akkott

        K 1 Reply Last reply
        0
        • A Akt_4_U

          Pls make the "Disabled" property of Edit control TRUE. Then it will not get selected. Praveen

          Akkott

          K Offline
          K Offline
          kumar_mk
          wrote on last edited by
          #4

          thank you very much:)

          thanx in advance kumar_windows

          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