Search found 195 matches

by cpp
Tue Apr 04, 2006 9:23 pm
Forum: C++ Development
Topic: How do I return Parent that is top level window?
Replies: 9
Views: 4074

wxApp::GetTopWindow() returns the top window for the application, it doesnt necerarily mean that it will be the top parent of the requested control, And wxWindow::GetGrandParent() is a just the same as calling GetParent()->GetParent(), so if the control whos parent you want is "deeper" than 2 parent...
by cpp
Mon Apr 03, 2006 10:34 am
Forum: C++ Development
Topic: Menu alignment using wxWidgets 2.6.3
Replies: 3
Views: 761

mhh, 2.6.3 was supposed to be a "bug fix release", now i understand what "bug fix release" means. They add new bugs to the exsisting ones! :D :D

J/K
by cpp
Mon Apr 03, 2006 12:54 am
Forum: C++ Development
Topic: How do I return Parent that is top level window?
Replies: 9
Views: 4074

mhh, i dont think there is a wxXxx function to do it, but i think you can do it yourself, for a quick & dirty example: wxWindow* GetTopParent(wxWindow* pWindow) { wxWindow* pWin = pWindow; while(true) { if(pWin->GetParent()) pWin = pWin->GetParent(); else break; } return pWin; } HTH
by cpp
Fri Mar 31, 2006 9:08 pm
Forum: C++ Development
Topic: list ctrl bug?!
Replies: 2
Views: 611

i do that (associate some data to each item) all the time, and i must say ibe never had any problems. Im pretty shure its a bug/mistake in your code.
Can you post some code so we can help you see whats wrong?
by cpp
Thu Mar 30, 2006 10:00 pm
Forum: C++ Development
Topic: driving me mad.. deleting menu items
Replies: 2
Views: 746

every time you call Destroy() (or Remove()), the menu item count decreases in the menu, and so, the indexes (or position) of the menu items change too. Plus, (im not shure about this) i think those are zero based. try something like: while(Interface->GetMenuItemCount()>=2) interface->Remove(Interfac...
by cpp
Thu Mar 30, 2006 9:20 pm
Forum: C++ Development
Topic: BAD wxString bug in 2.6.3 !!?? (SOLVED, not bug, my fault)
Replies: 10
Views: 2391

ahh, now i get it. (it seems pretty obvious now, thanks to your help) The wxString::operator const char* DOES work, thats why i can pass a wxString to say a function like void SomeFunction(const char* pStr); .... wxString str("whatever"); SomeFunction(str); it works because SomeFunction in explicitl...
by cpp
Thu Mar 30, 2006 8:23 pm
Forum: C++ Development
Topic: BAD wxString bug in 2.6.3 !!?? (SOLVED, not bug, my fault)
Replies: 10
Views: 2391

Thanks for your answer, I guess that would work, but imagine in a more complex "real life" scenario, if the message had to be formated with something like: _("An Error occured in %. The error was %s\n in module %s bla bla bla %s") and what is the point of the (pasted from the docs) wxString::operato...
by cpp
Thu Mar 30, 2006 7:44 pm
Forum: C++ Development
Topic: BAD wxString bug in 2.6.3 !!?? (SOLVED, not bug, my fault)
Replies: 10
Views: 2391

Holly Crap!, Now im REALLY confused. So you guys mean ibe been using wxString::Format()incorrectly all along? ibe passed wxStrings to Format() 1000s of times!. According to the docs, all wxString::Format() does is call Printf(), and basically you are saying that i should NOT pass wxStrings to it, if...
by cpp
Thu Mar 30, 2006 6:03 am
Forum: C++ Development
Topic: BAD wxString bug in 2.6.3 !!?? (SOLVED, not bug, my fault)
Replies: 10
Views: 2391

Thanks for your answer.
Hm, isn't %s expecting a const char*/const wchar* ?
yes, and i assume that the char* operator of wxString kicks in.
NE way, the point is it did worked in 2.6.2, and it even works in 2.6.3 IF you dont compile with wxUSE_STL
by cpp
Thu Mar 30, 2006 5:30 am
Forum: C++ Development
Topic: BAD wxString bug in 2.6.3 !!?? (SOLVED, not bug, my fault)
Replies: 10
Views: 2391

BAD wxString bug in 2.6.3 !!?? (SOLVED, not bug, my fault)

this simple code: wxString str1; str1=_("string 1"); wxString test = wxString::Format(wxT("The whole string %s %s"), str1, _("string2")); causes an Access violation on line 1828 of string.cpp. *ALLWAYS* im using Visual C++ 2005 Express, Static linking to both wxWidgets & the CRT. and i defined both ...
by cpp
Wed Mar 22, 2006 8:35 pm
Forum: C++ Development
Topic: Procesing events AFTER wxWidgets does?
Replies: 5
Views: 1017

Thanks for your answer Jamie. using the patch should work with the EVT_SIZE issue, but there have been other cases when i needed to get my hands on the event after wxWidgets (sorry i dont remember a specific case right now). So the real question is, Is there any reason i i should not call the base c...
by cpp
Wed Mar 22, 2006 8:25 pm
Forum: C++ Development
Topic: How can my application use the windows xp style?
Replies: 7
Views: 1711

Hi, i think your problem is with the manifest.
take a look at the following post:
http://forums.wxwidgets.org/viewtopic.php?t=6261
pay special attention to the manifest part you need to include wx.rc, like eco told you, but you also need to do a couple of other things

HTH
by cpp
Tue Mar 21, 2006 10:48 pm
Forum: C++ Development
Topic: Procesing events AFTER wxWidgets does?
Replies: 5
Views: 1017

Thanks for your answer. The reason i asked is that sometimes, getting my hands on certain events before wxWidgets does, is not very usefull. Consider this scenario (just an example): you have a wxListView, inside some sizer, inside some panel (inside a frame). you want to set the size of the columns...
by cpp
Tue Mar 21, 2006 2:36 am
Forum: C++ Development
Topic: Procesing events AFTER wxWidgets does?
Replies: 5
Views: 1017

Procesing events AFTER wxWidgets does?

Hi! to handle events in wxWidgets, we setup our event table, implement handler functions, and inside our handler functions we (sometimes) call event.Skip(), so that wxWidgets can do its "default" procesing after our own procesing (that is, after our handler function returns). This is all very nice &...
by cpp
Sun Mar 19, 2006 4:11 am
Forum: Compiler / Linking / IDE Related
Topic: HOWTO: wxWidgets + VC2005 Express WITH ONLINE HELP!!!
Replies: 23
Views: 33784

i havent had any problems like the one you describe. Theres only 3 thing i can think about: A) the directory where your wxWigets lives is read only. (but i think VC would warn you about this) B) The "original" projects & solution (wx.dsw) that come with wxWidgets, are VC6 version, when you open them...