BBC BASIC for Windows
« WINLIB2B Notifications »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:32pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: WINLIB2B Notifications  (Read 946 times)
Malvern
Guest
xx 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
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx 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.
User IP Logged

Malvern
Guest
xx 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.
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx 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.
User IP Logged

Malvern
Guest
xx 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 » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls