Questions tagged [cedit]

Use this tag for questions related to the CEdit class (Windows edit control).

An edit control is a rectangular child window in which the user can enter text.

More in the MSDN documentation.

99 questions
1
vote
1 answer

Child window (CEdit) losing focus

I am programming in C++ using MFC Document/View architecture. I have been trying to achieve something similar to MFC CEdit lose focus handler. I processed the message EN_KILLFOCUS as the answer suggests. Basically, I'm doing this: I have text drawn…
l3utterfly
  • 2,106
  • 4
  • 32
  • 58
1
vote
1 answer

Handling arrow key in cedit control of mfc

I'm making matlab-like command window using cedit control of mfc. For example, after I input several commands, I want to display old command using an arrow key (specifically the up key). I succeeded in displaying old commands, but failed to locate…
babchol
  • 11
  • 2
1
vote
1 answer

Change Color of read only CEdit control Artifacts and Text Highlighting issue

I have an Edit control that is read only that has text in it. I would like to switch the default gray background to white but have been having limited luck. In my first go, I was executing the following code during initialization of the…
RootAtShell
  • 115
  • 1
  • 7
1
vote
1 answer

Is it possible to switch between numeric only and alpha-numeric input modes for a CEdit control?

I have some radio buttons that decide the type of input to be given to the CEdit control. By design, my CEdit control accepts numbers and characters. Is there a way to limit this input to only numbers only when the user clicks on a provided radio…
Anish Ramaswamy
  • 2,326
  • 3
  • 32
  • 63
1
vote
2 answers

MFC CEdit Ctrl Question

I have a CEdit control that I want to be able to take time input from. Now I want this input to come in the form hh:mm:ss. Currently I am using a separate CEdit control for hour, mins, & secs. I know I could require the user enter in colons to…
user150671
1
vote
1 answer

MFC CEdit lose focus handler

I am creating a MFC program using the document/view architecture. In the view I call on a cell class that extends CEdit to draw a text box. That works fine, however, when I try to catch a lose focus message for that text box nothing happens. I…
mgalal
  • 427
  • 12
  • 24
1
vote
2 answers

using SHAutoComplete with CEdit control

I am developing an MFC application, can i use SHAutoComplete with a CEdit control? Also is there any ready made auto complete controls are available? or i need to use write all the code for creating the list box below the edit control as user types…
Sukhas
  • 89
  • 1
  • 8
1
vote
2 answers

Visual C++ get string from Cedit

This is probably a pretty basic question, but I can't seem to get it. I am working on a visualC++ project and I basically want to get a string from a GUI and then use that as a filename. I have written the following thus far, where IDC_FILE_NAME…
Chris Mondiek
  • 153
  • 4
  • 7
1
vote
1 answer

CEdit::GetLine (MFC, VC++6) returns extra characters in Windows 7

m_editText is of type CEdit (from MFC). This has worked fine for years with hundreds of users in WinXP (32bit), but when the same executable file is on Win7 (64bit) some users are getting (in strText) extra weird (i.e. extended, i.e. garbage)…
Bruce
  • 13
  • 3
0
votes
1 answer

CMFCPropertyGridProperty and CEdit text auto select

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…
zacharmarz
  • 203
  • 1
  • 15
0
votes
2 answers

MFC how to automatically select all text in CEdit control

I have a CMFCToolBarComboBoxButton on a CMFCToolBar. I want that whenever the CMFCToolBarComboBoxButton gets the focus its entire text will be selected. What is the most elegant way to implement it? Thanks a lot! Adi Barda
Adi barda
  • 125
  • 10
0
votes
1 answer

Can we use XSL / XML syntax highlighting with CEdit control?

MFC Visual C++ Dialog I have a standard multiline CEdit control: It displays XSL script. It is possible to display this using one of the standard syntax highlighter colour schemes?
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
0
votes
0 answers

Setting the range of a CSpinButtonCtrl

I have four CSpinButtonCtrl objects on my dialog. They are all configured as: Auto Buddy Buddy Integer The respective CEdit objects map to int variables and the maximum range is set to 0-20. Now I need the spin controls to match. I know that I…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
0
votes
0 answers

How do I set the tab stops to 2 spaces in CEdit?

The CEdit::SetTabStops method is confusing me a little. All I want to do is set the tab stops every 2 characters, or atleast a quart of what it is right now. How do I do that with this method?
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
0
votes
0 answers

How deny to exit from CEdit

I have subclassed CEdit clas (CMyEdit) and I am validating continuously user input througth ON_CHAR message. ON_CHAR procedure sets CMyEdit.isOK member variable to true or false. Is there any way how to deny exit from Edit Box, when the value is not…
Michal Hadraba
  • 347
  • 1
  • 11