Is it possible to superclass a group of edit boxes within a modal dialog box. The dialog box is created from a menu item on the main window.
Posted on 2001-08-02 12:37:24 by Mel
Why not?
Indeed, if you want change wnd proc for all edit in the
modal box you can do it by couple calls using SetClassLong
instead of SetWindowLong.
For example in WM_DIALOGINIT section if some of your
editbox has ID 10 this code change cursor on all edit boxes
in the Dlg:
invoke LoadCursor,400000h,3 ;ID of curs in rc
mov ebx,eax
invoke GetDlgItem,hWnd,10
invoke SetClassLong,eax,GCL_HCURSOR,ebx

The same with WndProc for edit boxes. Only GCL_WNDPROC and
address of your subclass proc.
Save return value to some var to use it sending for default processing.

If there are some boxes you don't want to subclass on the dlgbox -
use SetWindowLong only for those you want to subclass.
The rest to explain - Win32.hlp - and if I'm right I recall that Iczelion wrote a tut on the topic. Very clear one.
The Svin.
Posted on 2001-08-03 01:41:28 by The Svin
Thanks Svin, I'll give it a go:alright:
What I wasn't too sure about was whether or not you could take control from windows in a Dialog box, being as it does most of the work for you behind the scenes so to speak.
Boy! am I on a steep learning curve at the moment
Posted on 2001-08-03 13:49:41 by Mel