Questions tagged [editcontrol]

Edit controls let a user view and edit text.

92 questions
0
votes
1 answer

WM_SETTEXT writes Chinese letters

I want to set the text of my Edit Control. When I do, the new content is Chinese. For example, this: [DllImport("user32.dll")] public static extern int SendMessageW([InAttribute] System.IntPtr hWnd, int Msg, int wParam, string…
0
votes
1 answer

C++ How to replace new lines when pasting a text to the Edit control?

I've got a simple chat program. I use "CreateWindow" function for the typing box: chat_handle_11 = CreateWindow("EDIT", "", WS_BORDER | WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | WS_EX_CONTROLPARENT, 226, 447, 424, 23, hWnd, NULL, NULL,…
Mona
  • 187
  • 12
0
votes
2 answers

How can I handle event of changing caret pos?

I need to handle the event of changing caret pos in edit control (not richedit control). I know how to handle event of changing text in the edit, but I don't know how to handle the event of changing caret position in edit control. I hope someone…
0
votes
1 answer

PreTranslateMessage method is not getting called inorder to implement Ctrl+A in C++

I am trying to implement ctrl+A in note edit control :m_editNoteTypeView" which is instance of cEdit inside class NoteDialog. My note edit is created like below. NoteDialog::initDialog() { …
0
votes
1 answer

MFC Edit control - WM_DROPFILES message register for drag and drop

According to this article, to allow Drop Only on the Target, we have to Use SubclassDlgItem() to re-route that one message to the dialog object so that all of the handling can be done there. Mr. DanRollins (the author of the article) also…
123iamking
  • 1,735
  • 2
  • 22
  • 44
0
votes
0 answers

How to change the color of a scrollbar in a CEdit Control?

I'm using a CEdit Control with the WTL framework and I've been searching around and I'm having trouble finding how to change the color of the scrollbar. Is there an easy way to do this or do you need to subclass the control?
LucasN
  • 203
  • 2
  • 10
0
votes
0 answers

MPI command on mfc application

I'm executing an executable file through cmd while parallel processing. The command I use is mpiexec -n 2 Solution.exe I want to run this file in a MFC project. I have a dialogue box like the picture below, when I press the OK button on this…
0
votes
1 answer

WINAPI save dialog opens twice when clicking on EDIT control

I have an Win32 EDIT control with an assigned ID (IDC_FILE_NAME_INPUT) and I want the Save Dialog to open up when this control is clicked. I handle this in the WM_COMMAND message of the window processor: case WM_COMMAND: { switch…
ali
  • 10,569
  • 20
  • 77
  • 128
0
votes
0 answers

How to detect rich edit content in C++

How could I detect whether an edit control support rich content in windows with C++ code, for example, I could copy/paste an image into it. Additionally, If I get the HWND of the foreground window, how could I get the edit control, but not the frame…
Chen
  • 1
  • 1
0
votes
1 answer

Alphabets-only MFC editbox

I have a Dialog-based applicaton which consist of 3 editboxes which are of CString type. The editboxes are for Firstname, Middlename and Lastname. My editboxes are Alphanumeric since all are of type CString. Now my question is how can I validate my…
BaluS
  • 55
  • 6
0
votes
0 answers

How to set text color to Edit Contol in ATL Control?

I have a ATL ActiveX Control with Edit Control. I want to set text color to the control of as per specific conditions. I cannot use setTextColor as there is no MFC support to the the control. I am also not able to use 'WM_CTLCOLOREDIT' message as I…
0
votes
0 answers

How do I find the bounds of a Win32 API text/edit control?

I am working on a program that will allow the user to record steps of simple tasks and then generate a file to send to people that show these steps. So if you left click on a window it will say "User Left Clicked on Google Chrome" with an…
Kraizee
  • 31
  • 3
  • 7
0
votes
1 answer

How to block mouse inputs on dialog box in MFC

I have a dialog based MFC application. I have a hidden Edit Control on it which has the default focus for reading USB connected scanner input. All other controls on the dialog are read only. But when user clicks on any of the controls, the hidden…
SGP
  • 35
  • 9
0
votes
1 answer

Edit control does not behave as officially documented

I have created edit control with the style ES_AUTOHSCROLL in my main window. Documentation states that When the user presses the ENTER key, the control scrolls all text back to position zero. I have entered very long text, positioned caret at the…
AlwaysLearningNewStuff
  • 2,649
  • 3
  • 21
  • 72
0
votes
1 answer

Three questions about editbox?

I have three questions about editbox control in WINAPI (i can't find information on msdn about this) 1. How to disable moving typeing cursor with mouse, arrows, backspace in editbox ? I want to make typing like in command line in dos, but with out…
piotrek
  • 1,265
  • 4
  • 16
  • 34