flarb
05-13-2002, 01:51 AM
Before I read the Qualcomm FAQ, I used to simply pass all key down events to the message handler of the currently active control. This meant I just called that control's HandleEvent function and passed it the message in my applet's key event handler case.
However, if the FAQ states that the correct way to use controls is to pass all messages to the control. That is, if the applet does not handle any messages itself, you simply pass that message to the control's message handler.
This means that key down, and a zillion other messages get sent to my control.
The theory is, the control will ignore all irrelevant messages. Perhaps one day a newer version of BREW will require custom messages sent to it. Therefore, if you just pass all unhandled messages to your control--your control will get these other messages instead of just routing only keypresses.
When I change to this method, the controls go berzerk! For instance, my menu will leap through several items with a single keypress. For some reason, I think it is intepreting many different messages as a keypress.
Has anyone had any success doing controls the Qualcomm way? Or are you just simply only sending key downs to your controls?
However, if the FAQ states that the correct way to use controls is to pass all messages to the control. That is, if the applet does not handle any messages itself, you simply pass that message to the control's message handler.
This means that key down, and a zillion other messages get sent to my control.
The theory is, the control will ignore all irrelevant messages. Perhaps one day a newer version of BREW will require custom messages sent to it. Therefore, if you just pass all unhandled messages to your control--your control will get these other messages instead of just routing only keypresses.
When I change to this method, the controls go berzerk! For instance, my menu will leap through several items with a single keypress. For some reason, I think it is intepreting many different messages as a keypress.
Has anyone had any success doing controls the Qualcomm way? Or are you just simply only sending key downs to your controls?