Search found 120 matches

by Cursor
Thu Dec 22, 2005 8:57 am
Forum: Component Writing
Topic: Panel with Elements as Button - Click only works on panel
Replies: 11
Views: 3545

It is the normal process. If you look at the wxMouseEvent, it directly derives from wxEvent and not from wxCommandEvent so it is not passed to the parent window if not processed. If you want this process, you must derive your own wxStatic* from the bases, use an event table to intercept mouse events...
by Cursor
Tue Dec 20, 2005 7:55 pm
Forum: C++ Development
Topic: wxListCtrl w/ checkbox
Replies: 11
Views: 3253

You can do it by derivate the wxListCtrl and handly add checkbox placement.
You just have to handle size and scroll event and use GetItemRect/GetItemPosition functions to retrieve item position and move checkbox consequently.
Tip : you can store checkbox address in the ListItem extra data.
by Cursor
Tue Dec 20, 2005 7:48 pm
Forum: C++ Development
Topic: Events and wxTreeCtrl
Replies: 2
Views: 639

Simply use the appropriate wxEvent derivate class.
The wxMenu event fires a wxCommandEvent and you intercept a wxTreeEvent.

Replace :
void PrjTree::OnAddCardCmd(wxTreeEvent& event)
by :
void PrjTree::OnAddCardCmd(wxCommandEvent& event)
by Cursor
Sun Dec 18, 2005 7:38 pm
Forum: C++ Development
Topic: Bitmap/Icon copy.
Replies: 2
Views: 587

Ho yes, it is a very good idea.
It works perfectly.

Thank you.
by Cursor
Sat Dec 17, 2005 8:59 am
Forum: C++ Development
Topic: Bitmap/Icon copy.
Replies: 2
Views: 587

Bitmap/Icon copy.

Hello everybody. I would know if a copy function exists to clone a bitmap/icon in order to modify it. All the fast constructor and assignment function are only copy the objectref address. And I want to fastly and easily create a copy of a bitmap to modify it without modify the source. Or must I crea...
by Cursor
Mon May 09, 2005 5:57 am
Forum: C++ Development
Topic: wxClientDC
Replies: 4
Views: 1048

First, when you erase a background, you must not create a wxClient/PaintDC, you must use one provided by the wxEraseEvent param [1]. Secondly, if you want to erase the entire content of the client surface, wxDC::Clear is usefull [2]. [1] : http://www.wxwidgets.org/manuals/2.6.0/wx_wxeraseevent.html#...
by Cursor
Mon May 09, 2005 5:49 am
Forum: C++ Development
Topic: registry.cpp not #if wxUSE_CONFIG wrapped?
Replies: 4
Views: 836

IMHO it is not. wxUSE_CONFIG is for the wxConfig classes but you can use the registry (windows only) without the wxConfig classes. No preprocessor definition is present to disable the registry class. But is is not a problem because wxRegistry is support only on windows and all windows plateform supp...
by Cursor
Mon May 09, 2005 5:43 am
Forum: C++ Development
Topic: Iterating through controls with control ID number
Replies: 4
Views: 1495

Yes you can by the wxWindow::FindWindowByID [1]. You have just to pass the parent adress and the ID, and it return the corresponding child wxWindow adress. You can also use the wxWindow::GetChildren [2] but it is useless. [1] : http://www.wxwidgets.org/manuals/2.6.0/wx_wxwindow.html#wxwindowfindwind...
by Cursor
Thu May 05, 2005 6:30 am
Forum: C++ Development
Topic: Activating multiple items in a wxListCtrl?
Replies: 1
Views: 695

First, the style must not have wxLC_SINGLE_SEL.
Second, if I understand correctly, your can use GetSelectedItemCount() and GetNextItem() with correct params.

wxListCtrl::GetNextItem (with an example) : http://www.wxwidgets.org/manuals/2.6.0/ ... etnextitem
by Cursor
Thu May 05, 2005 6:24 am
Forum: C++ Development
Topic: Custom Events
Replies: 5
Views: 1133

Simply use a ProcessEvent from wxEvtHandler (base class of all wxWindow and wxApp).

http://www.wxwidgets.org/manuals/2.6.0/ ... ocessevent
by Cursor
Thu May 05, 2005 6:20 am
Forum: C++ Development
Topic: GetClientSize()
Replies: 4
Views: 1376

Perhaps beacause when you maximize, your frame client zone is greater than virtual one, so could you test with the max of them ?
by Cursor
Mon Apr 11, 2005 2:22 pm
Forum: C++ Development
Topic: Custom EventHandler, custom events, and threads
Replies: 2
Views: 899

Have you test with wxMutexGuiEnter and wxMutexGuiLeave [1] arround your ProcessEvent call ?

[1] : http://www.wxwidgets.org/manuals/2.5.4/ ... exguienter
by Cursor
Tue Apr 05, 2005 3:07 pm
Forum: C++ Development
Topic: Network functions within wxFrame constructor (solved)
Replies: 8
Views: 1715

You must not create a new type of event. You can use an existing event (a wxCommandEvent used with a wxEVT_COMMAND_MENU_SELECTED event type is ok. But you must post it and not process it immediatly. http://www.wxwidgets.org/manuals/2.5.4/wx_wxevthandler.html#wxevthandleraddpendingevent http://www.wx...
by Cursor
Tue Apr 05, 2005 2:00 pm
Forum: C++ Development
Topic: Network functions within wxFrame constructor (solved)
Replies: 8
Views: 1715

Hello. The wxSocket* must be executed after all GUI creation at the begining of any application. IMHO, it is because some wxSocket* internal initialization are done after GUI creation. So if you can, put your code into a function called from a menu (or a button). Or if you must have an automatic wxS...
by Cursor
Mon Apr 04, 2005 10:12 am
Forum: C++ Development
Topic: disable days in a wxCalendarCtrl
Replies: 1
Views: 593

You can intercept the EVT_CALENDAR (or other changement)
event and prevent it to change. The wxCalendarEvent is derived from wxCommandEvent so you can intercept to prevent changements.
Moreover, you can change the aspect of a day with wxCalendarCtrl::GetAttr.