Author |
Topic: WINLIB2B Notifications (Read 946 times) |
|
Malvern
Guest
|
 |
WINLIB2B Notifications
« Thread started on: Aug 12th, 2013, 9:26pm » |
|
The WM_NOTIFY passes many, many, NM_CUSTOMDRAW events. A recent look saw some 65 such events just displaying a dialog with buttons and an edit control. How would it be possible to modify the dialog message loop to screen out this event type so that the ON SYS did not get overwhelmed. I don't mean all WM_NOTIFY, just those with a code of -12.
Vern
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: WINLIB2B Notifications
« Reply #1 on: Aug 13th, 2013, 05:04am » |
|
on Aug 12th, 2013, 9:26pm, Malvern wrote:How would it be possible to modify the dialog message loop to screen out this event type so that the ON SYS did not get overwhelmed. |
|
Are you specifying *SYS 1 in your program? If so I would recommend removing that command, or changing it to *SYS 0, to avoid the ON SYS getting flooded. Of course that would mean that you receive no WM_NOTIFY messages at all; can you live with that? Most 'important' notifications arrive as WM_COMMAND messages (which of course always activate ON SYS) rather than WM_NOTIFY messages.
To filter WM_NOTIFY messages selectively would require assembler code, unfortunately.
Richard.
|
|
Logged
|
|
|
|
Malvern
Guest
|
 |
Re: WINLIB2B Notifications
« Reply #2 on: Aug 13th, 2013, 1:24pm » |
|
Quote:To filter WM_NOTIFY messages selectively would require assembler code, unfortunately. |
|
Yes I understand that and that was really what I was asking for, a modification to the message loop. I want some WM_NOTIFY events but this one code seems very common and unneeded for me and probably anyone writing an application in BASIC.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: WINLIB2B Notifications
« Reply #3 on: Aug 13th, 2013, 1:59pm » |
|
on Aug 13th, 2013, 1:24pm, Malvern wrote:I want some WM_NOTIFY events but this one code seems very common and unneeded for me and probably anyone writing an application in BASIC. |
|
If you're prepared to resort to assembly language you should be able to adapt the code in the DIRPRINT example here:
http://www.bbcbasic.co.uk/bbcwin/examples/dirprint.html
The routine you need is PROCassemble (at the end of the listing). As it stands that intercepts HDN_ITEMCLICKA notifications and converts them to WM_COMMAND messages. You should be able to adapt it to intercept just the notification(s) you want to receive, and ignore the rest by not using *SYS 1.
The scomp and ncomp routines can be ignored or deleted, unless you need them for sorting.
Richard.
|
|
Logged
|
|
|
|
Malvern
Guest
|
 |
Re: WINLIB2B Notifications
« Reply #4 on: Aug 14th, 2013, 02:56am » |
|
The DIRPRINT example did give me the clue I was after to modify WINLIB2B since I did want other WN_NOTIFY events. Thank you.
|
« Last Edit: Aug 15th, 2013, 1:33pm by Malvern » |
Logged
|
|
|
|
|