The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Duracell on August 03, 2007, 10:47:50 AM

Title: [winapi/asm] EditBox problem with multiline
Post by: Duracell on August 03, 2007, 10:47:50 AM
Hi,

I have problem with EditBox.
I want know when msg from editbox send is to Scroll and vica versa.
I try with EN_VSCROLL, EM_LINESCROLL and EM_SCROLL but that don't do that what I want.

I'm using subclassing
My code...:


EditProc ...
...
.elseif uMsg == EN_VSCROLL
invoke MessageBox,hWnd,offset MDI,offset MDI,MB_OK
.else
...


Duracell

P.S. I don't want WM_VSCROLL use. I want only know when edit is sending msg to scroll and vica versa. I know i can use WM_VSCROLL that isn't that what i want. Why? Becouse when in editbox is next line active WM_SCROLL isn't send.
Title: Re: [winapi/asm] EditBox problem with multiline
Post by: MichaelW on August 03, 2007, 11:56:51 AM
I'm not sure what you are trying to do, but the  EN_VSCROLL notification (http://msdn2.microsoft.com/en-us/library/ms672118.aspx) is sent in a WM_COMMAND message, so the code would need to be something like:

.elseif uMsg == WM_COMMAND
  mov eax, wParam
  shr eax, 16
  .if eax == EN_VSCROLL
    invoke MessageBox,hWnd,offset MDI,offset MDI,MB_OK
  .endif
.else

Title: Re: [winapi/asm] EditBox problem with multiline
Post by: Duracell on August 03, 2007, 12:25:10 PM
Thank u... I forgot about notification. Here I have error and second I wanted subclassing. Now ererything is ok... thx one more time.

And can i catch a msg [EM_LINESCROLL]?