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
0
votes
1 answer

Hook EN_CHANGE in dialog for subclassing CEDIT

I have my own subclassed class for CEDIT as following: class MyEdit : public CEdit.... I subclassed it in DoDataExchange procedure by DDX_control I hook in this subclassed class ON_CHAR and ON_CHANGE (MyEdit::OnChar, MyEdit::OnChange). I need hook…
Michal Hadraba
  • 347
  • 1
  • 11
0
votes
1 answer

How could a textfield respond on

I have some problems to respond on a event like "Enter". I have a dialogbox with a CEdit field, where the user could enter some stuff. How could I respond, if the user press "Enter" in the textfield? I will submit the content in the textfield to a…
Andre Hofmeister
  • 3,185
  • 11
  • 51
  • 74
0
votes
1 answer

MFC: How do I save and restore the CEditView scroll position so contents are correctly scrolled?

Give the need to do a work around for a tab control, I want to save then restore the CEditView contents. What I do is shown below, and while the scrollbars and position go back to where they were properly, the actual contents of the edit control…
user3161924
  • 1,849
  • 18
  • 33
0
votes
0 answers

MFC SetWindowTextA Error. How can I solve this problem

I wanna get a string and put it in EditControl. The Debug Assertion Failed error occurs from the initializing part(SetWindowTextA), but the cause is unknown. m_ChatWindow declared CEdit. Here is the part of the…
0
votes
1 answer

How to manipulate the contents of CEdit?

I have a situation with edit control and I need some guidance. The text editor functions normally in most cases but in other cases, depending on the last few characters before typing and based on the characters typed, the last few characters must be…
David
  • 1
0
votes
0 answers

mfc CEdit control type anywhere

I am looking for a way to implement a multi-line CEdit control that allows you to type anywhere in the text box just like the links below. If there's already an implementation of this, please let me know. Thanks. image example:…
vg8open
  • 57
  • 6
0
votes
0 answers

Customising Horizontal scroll bar using MFC

I m trying to customise the Horizontal scrollbar for a view in MFC edit control. and trying to set ScrollInfo to the same. SCROLLINFO ScrollInfo; ScrollInfo.cbSize = sizeof(SCROLLINFO); ScrollInfo.fMask = SIF_PAGE | SIF_RANGE; …
0
votes
0 answers

Get resource ID from class member CEdit, MFC

I'm using Visual Studio 2010 to create a MFC application. I've created a simple dialog with the help of the recource editor. The dialog contains a number of Edit Controls. I've added members to those Edit Controls by rightclicking on them - > Add…
VTodorov
  • 953
  • 1
  • 8
  • 25
0
votes
0 answers

CEdit in CDialog not working in Japanese and chinese language

I have a unicode MFC Dialog application which has CEdit control. When i change the system language to Japanese/Chinese and enter Japanese or Chinese characters, I don't get EN_CHANGE or EN_UPDATE notification. The text goes to multiple lines. I get…
Sukhas
  • 89
  • 1
  • 8
0
votes
1 answer

How to set an icon in an edit control?

I tried the following snippet but it doesn't show up: HICON hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_ICON1)); myeditcontrol.SetIcon(hIcon, FALSE);
Sandeep Kumar
  • 85
  • 1
  • 3
  • 10
0
votes
2 answers

ON_EN_KILLFOCUS called multiple times

I am using a CEdit control. And I have assigned an event handler for ON_EN_KILLFOCUS message. It gets called correctly. But the problem is that, when ever, I close the dialog box, this event handler gets called four times. How can I prevent this?
RK-
  • 12,099
  • 23
  • 89
  • 155
0
votes
1 answer

How to display std::string into CEdit in C++

I have a MFC project written in C++ and I want to display some text in a CEdit control. So far, I tried this: MFCApplication1Dlg.h ... private: static CEdit m_progress; public: static void setProgress(std::string…
CristianLuca
  • 111
  • 2
  • 10
0
votes
0 answers

GetSel method always returns zero on CEdit control

On a MFC application a CEdit control of a dialogue is subclassed. There is a numerical keypad on another dialogue which is supposed to send values to that text box. If the text is highlighted on the edit control the GetSel method returns the start…
ali
  • 529
  • 4
  • 26
0
votes
1 answer

Bypass trigger of OnFocus/GetFocus event if the application window loses activation c++

I have a text box which take string value. On Focus lost it does a specific function (say function 1). But even if I lost focus on the window, this OnFocus event is getting triggered. Suppose i have the following code : classA::OnTextBoxFocus() { …
mwKART
  • 885
  • 2
  • 9
  • 18
0
votes
1 answer

MFC change mouse cursor on hover over CEdit control

I want to change mouse cursor to custom cursor which i added to project Resource named IDC_MY_CURSOR. i want to change mouse pointer to my cursor whenever mouse is over CEdit control only. Any idea how to do that?
Raja Ayaz
  • 91
  • 12