About DocumentWindow handle mouse events


#1

I’m not sure these is or isn’t BUGS, the current situation is:

1, setUsingNativeTitleBar (true);
Content component’s museDown () and mouseUp () will receive error message when I double-clicking the window title bar, e.x == current mouse position. Shouldn’t be so. User’s purpose is to maximize the window, rather than generate additional mouse events.

2, setUsingNativeTitleBar (false);
Problem goes away, the mouse events to determine the correct of just maximize the window. However, after maximum, if I set the auto-hide the Windows status bar, move the mouse pointer to bottom of the screen, the status bar will never automatically emerge. New problems, in Article 1 these doesn’t exist.

Is it possible that I missing something important?


#2

AFAIK clicking a native title-bar won’t generate any mouse-events (?)

And which OS are you using?


#3

Windows 7 X64.

After double-clicking the window title bar (maximized the window), the mouse just right be located in the content component, its position was captured by mouseUp (). The following code will be result in unwanted results:

   void mouseDown (const MouseEvent& e) {
        mouseDrag(e);
    }

    void mouseDrag (const MouseEvent& e) {
        // playPosition was a double data member of this class..
        playPosition = double(e.x) / getWidth() * transportSource.getLengthInSeconds(); 
        // ...
        if (playPosition < 0)
            playPosition = 0.00;
    }
   
    void mouseUp (const MouseEvent&) {
        transportSource.setPosition (playPosition);
    }

DocumentWindow set setUsingNativeTitleBar (false); there is no problem.


#4

Ok, thanks. I’ll try it when I’m next doing some win32 work.