473,395 Members | 1,999 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

MFC - problem with RichEdit and ES_NOHIDESEL

18
I have two classes derived from CRichEditView - on one, when I bring up the context menu with a r-click or a ctrl-F, I can search for a string in my text and it will highlight the text while the search dialog still has focus ... exactly what is expected if ES_NOHIDESEL is specified in the style at creation, or if I do


Expand|Select|Wrap|Line Numbers
  1. MyCtrl->SetOptions (ECOOP_SET, ECO_NOHIDESEL );
However, when I have the identical creation code for the other CRichEditView class, and even though, when I check the options right before the Popup Menu is called, the NOHIDESEL flag is indeed set (0x100) - it will do a search, but will only show the highlighted text when focus is returned to the frame-view ... which is completely irritating to anyone doing a search:

Expand|Select|Wrap|Line Numbers
  1. UINT uOptions = MyCtrl->GetOptions();  // NOHIDESEL is set
  2. MyApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_EDIT, point.x, point.y, this, TRUE);  // does not highlight text like it should
These Rich Edits have sufficiently different functionality that I don't want to simply meld one into the other ... but there is seemingly no difference in their initialization.

Also interesting is that whether I include ES_NOHIDESEL in the window style seems to have no relation to the presence of the ECO_NOHIDESEL option ... indeed it seems to be set by default even though the documentation says it is not default behavior.

Something is fishy! .
Jul 26 '13 #1
0 1186

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: murlbrown | last post by:
I am using a class library built by michael kennedy that creates a system wide hook on the WH_KEYBOARD_LL, but I wanted to changed it to become a hook for a RichEdit box in another application. ...
1
by: Peter Taylor | last post by:
I am developing a word processor using MS Vis C++ 6 with MFC. I need to get the text of the current line of where the cursor is. I am using richedit (not a control). Does the EM_GETLINE work...
1
by: P | last post by:
Hi. I am writting application and I need html richedit. When I will use: control_name.text="<img sroc=\"1.jpg\">" I wanna have image in richedit. But I dont know where can I find that...
0
by: PowerPlane | last post by:
Hi, all Happy valentine I am struggling to insert an animated-gif into a CRichEditCtrl. Before I post this question here, I did some googling. And I found an article to introduce how to insert a...
1
by: Patty O'Dors | last post by:
Hi I'm trying to create an application with a RichEdit control, I found that CreateWindow always returns a null hWnd unless I call LoadLibrary("riched20.dll") first (the error code from...
0
by: brett forsgren via .NET 247 | last post by:
Long story short, I had an EditBox but when I tried to displaythe Latin letters with macrons (lines) over them, I got strangeresults. If I install support for East Asian Languages, theproblem goes...
0
by: murlbrown | last post by:
I am using a class library built by michael kennedy that creates a system wide hook on the WH_KEYBOARD_LL, but I wanted to changed it to become a hook for a RichEdit box in another application. ...
2
by: Senapathy | last post by:
VC++ .NET 2003 Standard Edition Win XP, SP2 Hi, I have a code that builds under VC6.0, but fails to link in VC7.1. The offending code is as follows: _AFX_RICHEDIT_STATE* const pEditState...
1
by: Claire | last post by:
I'm writing an application with custom skinned controls. I have a text editor form with a rich edit control. Because there's no toolbuttons in the skinned control set, I have to use normal ones for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.