Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7055783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:47:24+00:00 2026-05-28T03:47:24+00:00

What I have read here (When the user selects an edit control, …. and

  • 0

What I have read here (When the user selects an edit control, …. and highlights its text by using reverse video) and if I understand it right, CEdit should highlight (I hope it’s the same as select) text when I click on it.

I’m using CMFCPropertyGridCtrl with CMFCPropertyGridProperty. But when I click on grid (one property value), it doesn’t select anything.

What I have found out: Property creates internally CEdit, which is for manually editing property value. It’s created, its font is set etc. Then SetFocus is called and after that UpdateWindow – this redraws edit box and sets cursor before first character. After this, mouse click is evoked again to click on edit box – this seems correct. But no text is selected.

I have also tried to create my own property class, which derives from CMFCPropertyGridProperty. I have called SetSel after all this. It really selects my text, but then it just deselects it (in next Redraw). What I have also achieved was that after Redraw only text from begining to mouse click was selected (when I clicked after 4th character, only first 4 characters were selected).

My questions:

Should CEdit really select automaticaly text after first mouse click? (do you have some resources?)

Don’t you know, why this is not working in CMFCPropertyGridProperty?

CMFCPropertyGridCtrl and CMFCPropertyGridProperty can be found in afxpropertygridctrl.h/.cpp in mfc source code directory.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:47:25+00:00Added an answer on May 28, 2026 at 3:47 am

    So what I have finally found out:

    CEdit probably doesn’t select text after clicking on it. This has to be done manually by for example SetSel function.

    But in CMFCPropertyGridCtrl, if you click, it’s passed to CMFCPropertyGridProperty and there is click repeated. So if I used SetSel, it deselects text. So I had to write my own class which inherits CMFCPropertyGridProperty and skips this step (clicking again). It’s enough to SetFocus and SetSel (which also sets cursor to CEdit window).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read the post here about using setTimeout() during intensive DOM processing (using
I have read quite a few selcet+update questions in here but cannot understand how
I have got the following code from here to read an Excel file using
I have read some posts on here about not mixing parameters when passing into
I have read so many times, here and everywhere on the net, that mutexes
Am tearing my hair out here. Have read many examples which describe how to
I have read that using database keys in a URL is a bad thing
I have this problem. I read with BufferedReader text from one system file, this
ok, here is the story... I have 3 textfield for user to select.... [textfield
I have read through several reviews on Amazon and some books seem outdated. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.