Search found 120 matches

by Hossein
Mon Aug 27, 2012 8:44 pm
Forum: General Forum Issues
Topic: C++ syntax highligting in posts
Replies: 4
Views: 32420

Re: C++ syntax highligting in posts

I dont know if these still work : https://www.phpbb.com/community/viewtopic.php?f=70&t=2096992 https://www.phpbb.com/community/viewtopic.php?f=69&t=1697035 but in case they dont, you can always use this site to highlight your C++ sourcecodes.maybe adding a link to this site would be a good i...
by Hossein
Fri Apr 13, 2012 5:21 pm
Forum: C++ Development
Topic: threading in wxwidgets
Replies: 7
Views: 3188

Re: threading in wxwidgets

Warning, wxThread::Pause docs mention : Suspends the thread. Under some implementations (Win32), the thread is suspended immediately, under others it will only be suspended when it calls TestDestroy() for the next time (hence, if the thread doesn't call it at all, it won't be suspended). This funct...
by Hossein
Thu Apr 12, 2012 8:12 pm
Forum: C++ Development
Topic: threading in wxwidgets
Replies: 7
Views: 3188

Re: threading in wxwidgets

I doubt there is any thread-related feature missing in boost. However, if you want to use wxThread, there is no difference when using it in a console application compared to a normal gui application. Just derive your own class from wxThread and put the relevant code in wxThread::Entry. Check the &q...
by Hossein
Thu Apr 12, 2012 4:41 pm
Forum: C++ Development
Topic: threading in wxwidgets
Replies: 7
Views: 3188

Re: threading in wxwidgets

If you don't need any gui elements, why do you need wxWidgets? Can't you just use STL + boost all the way? i'm already comming form stl and boost ! the catch here is , boosth threading capabilities are not alot , and it doesnt support many features and capabilities wxwidgets offers and if sb like m...
by Hossein
Wed Apr 11, 2012 6:59 pm
Forum: C++ Development
Topic: threading in wxwidgets
Replies: 7
Views: 3188

threading in wxwidgets

hello all . i'm looking to learn about how to use threading in wxwdiegts .i dont intend on using any GUI components at the moment , i need to work on a console or at best i need to make a dll out of those functions which do the parallel processings . i have some questions that would appreciate if an...
by Hossein
Wed Apr 04, 2012 12:52 pm
Forum: C++ Development
Topic: need help on using wxComboBox
Replies: 11
Views: 3324

Re: need help on using wxComboBox

A simple example of client object usage with wxComboBox #include <wx/wxprec.h> #ifndef WX_PRECOMP #include <wx/wx.h> #endif class Person: public wxClientData { public: wxString m_name; int m_age; Person(const wxString& name, int age) { m_name = name; m_age = age; } }; class MyDialog: public wxD...
by Hossein
Wed Apr 04, 2012 11:26 am
Forum: C++ Development
Topic: need help on using wxComboBox
Replies: 11
Views: 3324

Re: need help on using wxComboBox

Both the "controls" and "widgets" samples use that feature, but these sample are not really focusing on this particular feature, so it might not be so clear on how to use them. But in general there is not much you need to know. The big difference between using untyped and typed ...
by Hossein
Wed Apr 04, 2012 11:03 am
Forum: C++ Development
Topic: need help on using wxComboBox
Replies: 11
Views: 3324

Re: need help on using wxComboBox

You can't achieve the exact same behavior. Check the clientData parameter in the Append call. If you want to attach any data to the entries, that's the way to go. http://docs.wxwidgets.org/stable/wx_wxcontrolwithitems.html#wxcontrolwithitemsappend Use wxControlWithItems::GetClientData() or wxContro...
by Hossein
Wed Apr 04, 2012 10:47 am
Forum: C++ Development
Topic: need help on using wxComboBox
Replies: 11
Views: 3324

Re: need help on using wxComboBox

int SelectedItemIndex = WxComboBox1->GetSelection(); if ( WxComboBox1->GetString(SelectedItemIndex) == wxT("open file")) The code you used looks ok, although just using GetStringSelection() should do the same. If it doesn't work, use a debugger (or old-style printf debugging) to check if ...
by Hossein
Wed Apr 04, 2012 10:26 am
Forum: C++ Development
Topic: need help on using wxComboBox
Replies: 11
Views: 3324

Re: need help on using wxComboBox

doublemax wrote:And what exactly is the problem?
how do i get the currently selected item (object ) .
the documentation is wrong here :
GetCurrentSelection () const
Returns the item being selected right now.
it returns the index of the object not the object itself !
by Hossein
Wed Apr 04, 2012 9:58 am
Forum: C++ Development
Topic: need help on using wxComboBox
Replies: 11
Views: 3324

Re: need help on using wxComboBox

got it . the documentation needs to be updated ! in documentation it says : GetCurrentSelection () const Returns the item being selected right now. that made me think it returns the actual object , which in my case was a simple string ( or WxString ) . although i noticed that virtual int , but was u...
by Hossein
Wed Apr 04, 2012 9:28 am
Forum: C++ Development
Topic: need help on using wxComboBox
Replies: 11
Views: 3324

need help on using wxComboBox

hello all , i wrote a simple snippet of code to actually play with couple of wxWidgets components . i got stuck . can any one please help me get this bit of code to work ? and tell me my problems ? int SelectedItemIndex = WxComboBox1->GetSelection(); if ( WxComboBox1->GetString(SelectedItemIndex) ==...
by Hossein
Mon Apr 26, 2010 5:59 am
Forum: Open Discussion
Topic: can any one do me a favor ?
Replies: 1
Views: 2267

can any one do me a favor ?

hello all, is there anyone who can do me and probably alot of other people a favor ? it would be a great favor if someone re uploads wxPack somewhere else , because with the current sourceforge.com policy , some countries are banned and thus users from those country can't download a thing from sourc...
by Hossein
Mon Apr 26, 2010 2:20 am
Forum: Compiler / Linking / IDE Related
Topic: ld.exe||cannot find -lwxmsw28u_richtext
Replies: 2
Views: 2225

any help why im getting this error ?
by Hossein
Sun Apr 25, 2010 2:42 pm
Forum: Compiler / Linking / IDE Related
Topic: ld.exe||cannot find -lwxmsw28u_richtext
Replies: 2
Views: 2225

ld.exe||cannot find -lwxmsw28u_richtext

hello all , i have'nt coded with wxwidgets for almost 2 years . i downloaded the source code (2.8.11) and compiled it as i used to in the past, but now the irony is i get the error "ld.exe||cannot find -lwxmsw28u_richtext" when i try to compile a sample wxwidgets application . All done in ...