-
February 1st, 2011, 05:33 PM
#1
Edit Scroll bar Processing Messages
Hello,
First I appreciate your replies to my first post, they were very helpful. I am having an issues now with an edit control that is a child of the parent window.
hSGroups = CreateWindowEx(0, TEXT("EDIT"), NULL, WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | WS_BORDER | ES_LEFT, rc.left+200+120, 20, 500, 250, hWnd, (HMENU)SGroups_Identifyer , hInst, NULL);
When I click in the edit field of the control I get a message in my WndProc in the command field. When I click on the edit controls vertical scroll bar....... I get no messages. I have read that the edit control processes its own messages for scrolling. I have also read that a messages is supposed to happen though the command field after I click the vert scroll button.
I also notice that when ES_MULTILINE is specified, pressing the scroll bar (once active / entered text has gone past edit window limit), the message generated is the correct message and it is sent to the WndProc and can be caught by the command field.
I want a one line edit window with vert scroll message that can be caught by my main window / WndProc without the ES_MULTILINE specified. Any help is appreciated.
-
February 3rd, 2011, 01:43 AM
#2
Re: Edit Scroll bar Processing Messages
If its one line edit box where from the vertical scroll comes into view ?
-
February 3rd, 2011, 03:28 PM
#3
Re: Edit Scroll bar Processing Messages
Edit control without ES_MULTILINE style does NOT (and cannot) have a vertical scrollbar.
Victor Nijegorodov
-
February 4th, 2011, 07:38 PM
#4
Re: Edit Scroll bar Processing Messages
Well, I was hoping to do a numerical increment/decrement with the scroll attached to the single line edit. I guess I will just put some custom buttons to do the job. Thanks, I appreciate all of the input.
-
February 5th, 2011, 01:42 AM
#5
Re: Edit Scroll bar Processing Messages
Originally Posted by JPatchSPSU
Well, I was hoping to do a numerical increment/decrement with the scroll attached to the single line edit. I guess I will just put some custom buttons to do the job.
Use a spin button (up-down) control and set the edit control as its buddy. Then, you can handle WM_VSCROLL message sent to parent window.
-
February 9th, 2011, 10:29 PM
#6
Re: Edit Scroll bar Processing Messages
"Use a spin button (up-down) control and set the edit control as its buddy. Then, you can handle WM_VSCROLL message sent to parent window".
Hmm did some research.. is the spin button part of the MFC library? If so thanks anyway, because that would cause me to rewrite all my code to use that -> to use the encapsulation library.
if not, I was wondering if I could get one or two good references on some code that uses only the win32 API and shows how the buddy thing works. (please excuse me if my jargon is a little off)
Thanks in advance
-
February 10th, 2011, 02:10 AM
#7
Re: Edit Scroll bar Processing Messages
Originally Posted by JPatchSPSU
is the spin button part of the MFC library? If so thanks anyway, because that would cause me to rewrite all my code to use that -> to use the encapsulation library.
Why not just go to the link Ovidiu provided for you and read about this control and its using?
Yes you can use MFC class CSpinCtrl but this control is just one of the Win32 controls with its own class name, styles, messages, structures and so on...
Victor Nijegorodov
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|