hi there!

i am having some problem with button handling in POL. i am at my COtherForm 
class. a second form after being redirected from CMainForm. i managed to get 
the up and down working but not the other hard buttons, even rocker's left and 
right i not working. how do i go around this? anything is that, the simulator 
gave me chr = 30, 31, 28, 29 for rocker's up down left right respectively. do i 
need to include any files or of that sort inside?

here is what i did in my COtherForm.

Boolean OnKeyDown(EventPtr pEvent, Boolean& bHandled);

EVENT_MAP_ENTRY(keyDownEvent, OnKeyDown)

Boolean COtherForm::OnKeyDown(EventPtr pEvent, Boolean& bHandled)
{
        switch(pEvent->data.keyDown.chr) 
        {
                case vchrPageUp:
                        move = "up";
                        break;                          
                case vchrPageDown:
                        move = "down";
                        break;
                case vchrHard1:
                        move = "left";
                        break;
                case vchrHard2:
                        move = "left";
                        break;
                case vchrHard3:
                        move = "right";
                        break;
                case vchrHard4:
                        move = "right";
                        break;
                case vchrRockerUp:
                        move = "up";
                        break;                          
                case vchrRockerDown:
                        move = "down";
                        break;
                case vchrRockerLeft:
                        move = "left";
                        break;
                case vchrRockerRight:
                        move = "right";
                        break;
                case 30:
                        move = "up";
                        break;                          
                case 31:
                        move = "down";
                        break;
                case 28:
                        move = "left";
                        break;
                case 29:
                        move = "right";
                        break;          
                default:
                        break;
                        
        }
        return true;
}
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to