PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Do I need to call base.WndProc in this scenario?
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Do I need to call base.WndProc in this scenario?
![]() |
Do I need to call base.WndProc in this scenario? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi all,
I have been working around the notorious 'Automatically scroll selected control into view' 'feature' of the .net framework using the following code. Now I read that if I do not call base.WndProc, this can cause problems like 'Error creating Window Handle' and I am getting this error. My code is as below. How do I modify it to prevent the WM_SETFOCUS from being handled but still call base.WndProc()? Thanks! private const int WM_SETFOCUS = 0x0007; protected override void WndProc(ref Message m) { // Listen for operating system messages. // The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus. if (m.Msg != WM_SETFOCUS) { base.WndProc(ref m); } } |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

