[ wxwindows-Bugs-1720516 ] toolbar does not get a painting events

SourceForge.net noreply at sourceforge.net
Sat Jun 2 23:03:20 PDT 2007


Bugs item #1720516, was opened at 2007-05-17 07:00
Message generated for change (Comment added) made by jrgadd
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1720516&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxMSW specific
Group: Fatal
>Status: Closed
>Resolution: Invalid
Priority: 7
Private: No
Submitted By: ONEEYEMAN (oneeyeman)
Assigned to: Nobody/Anonymous (nobody)
Summary: toolbar does not get a painting events

Initial Comment:
Attached please find the modified files from the docvwmdi sample.

I saw it with the 2.8.1 wxMSW on WinXP SP 2 with MSVC.

Steps to reproduce the problem:
0. Copy new.xpm file from the toolbar sample to the docvwmdi directory.
1. Compile the docvwmdi sample.
2. Run the sample.
3. Click the button on the first toolbar (or select File->New).
4. Select "Drawing" from the list and click OK.
5. Second toolbar will be created along with the drawing view.

Try to click the button on the second toolbar (the one that is being vertical). Nothing happened.
Drag the MDI child window over the second toolbar. The toolbar will be erased on the space you are dragging the mdi child over.

----------------------------------------------------------------------

>Comment By: Jamie Gadd (jrgadd)
Date: 2007-06-03 06:03

Message:
Logged In: YES 
user_id=1193054
Originator: NO

Have another look.

----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-06-03 04:24

Message:
Logged In: YES 
user_id=1325635
Originator: YES

Jamie,
The code you put on will work. I am not arguing this.
If you tried to run my files, you would've see that I'm creating 2
toolbars: one main toolbar (for the application), and one local toolbar
(for the view command).
The second toolbar (local one) does not get updated. In fact it does not
receive any events/messages at all.
When I looked at your code I found only one toolbar created....

Thank you.

----------------------------------------------------------------------

Comment By: Jamie Gadd (jrgadd)
Date: 2007-06-02 00:43

Message:
Logged In: YES 
user_id=1193054
Originator: NO

File Added: fix.diff

----------------------------------------------------------------------

Comment By: Jamie Gadd (jrgadd)
Date: 2007-06-02 00:42

Message:
Logged In: YES 
user_id=1193054
Originator: NO

This is because you don't adjust the size for the wxMDIClientWindow, see
fix. This is demonstrated clearly in the toolbar sample.

Some suggestions:

Why were these lines included?
        wxSize test = GetMainFrame()->GetClientSize();
        test.y -= 2;
No need for the call to CreateStatusBar()
Don't use TABs
Don't include additional headers unnecessarily e.g. "wx/notebook.h"

I have attached a sample of your files with the excess removed as an
example of how you should submit these in the future. Try and have it in
this format next time please.

File Added: bugreport.diff

----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-05-17 07:04

Message:
Logged In: YES 
user_id=1325635
Originator: YES

File Added: view.cpp

----------------------------------------------------------------------

Comment By: ONEEYEMAN (oneeyeman)
Date: 2007-05-17 07:02

Message:
Logged In: YES 
user_id=1325635
Originator: YES

File Added: docview.h

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1720516&group_id=9863




More information about the wx-dev mailing list