Search found 1195 matches

by mc2r
Thu Mar 19, 2009 2:51 am
Forum: C++ Development
Topic: Parsing wxRichTextCtrl - s... l... o... w...
Replies: 2
Views: 554

Re: Parsing wxRichTextCtrl - s... l... o... w...

Kenneth Camargo wrote:Does anyone have a better idea?
I've never done a comparison but you could try grabbing all of the text with GetValue(), and then use wxStrings substring functions to find each of the spaces and there index.

-Max
by mc2r
Wed Mar 18, 2009 10:54 pm
Forum: C++ Development
Topic: Get Windows serial number
Replies: 6
Views: 1168

Re: Get Windows serial number

Marcus Frenkel wrote:Hi,

Is there any wx function to get the registration serial number of the running MS Windows OS?

Marcus
No, you will have to use system specific api's. To keep it as portable as possible wrap the code in ifdefs...

Code: Select all

#ifdef WIN32
    //win32 code to check serial number
#endif
-Max
by mc2r
Wed Mar 18, 2009 9:46 pm
Forum: C++ Development
Topic: What are the parameters for wxComboBox::Create?
Replies: 3
Views: 533

Re: What are the parameters for wxComboBox::Create?

comboctrl -> Create(mydrawingArea, -1, _T("Choose one"), wxPoint((100, 100), wxSize(100, 20), 6, wxDefaultValidator, DisplayArray); You have an extra "(" in you wxPoint, maybe thats the cause wxPoint((100, 100), does this work? comboctrl -> Create(mydrawingArea, -1, _T("Choose one"), wxPoint(100, 1...
by mc2r
Wed Mar 18, 2009 8:50 pm
Forum: C++ Development
Topic: Project Browser
Replies: 11
Views: 1550

Hi, I never did this myself but believe this could help you : http://docs.wxwidgets.org/stable/wx_wxgenericdirctrl.html#wxgenericdirctrl I don't think this is exactly what the OP is looking for. IIRC... it will do what the OP wants for one directory but not with the dozen directories they are looki...
by mc2r
Wed Mar 18, 2009 8:46 pm
Forum: C++ Development
Topic: Project Browser
Replies: 11
Views: 1550

I'd use wxDir(http://docs.wxwidgets.org/stable/wx_wxdir.html#wxdir) to enumerate the files under each directory. To add them to the tree control make a hidden root and then add the listed directories to it as children and they will show up as if they were each individual root items. http://docs.wxwi...
by mc2r
Wed Mar 18, 2009 2:16 am
Forum: C++ Development
Topic: Some problem with wxRegEx.ReplaceAll
Replies: 6
Views: 1153

all seems ok,all look like the example in the wxWidgets doc,but can't work for replace.Did I miss something? ps:It works for <img \1> ps2:It seems it now ok.But,if it it the different dreamweaver and wxRegEx? Yup, you missed the docs The replacement text may contain back references \number which wi...
by mc2r
Tue Mar 17, 2009 5:41 pm
Forum: C++ Development
Topic: Disabling font smoothing?
Replies: 3
Views: 759

Not sure if this is what you mean, but wxFont has a flag for antialiased or not antialiased
http://docs.wxwidgets.org/stable/wx_wxfont.html#wxfont wrote:wxFONTFLAG_ANTIALIASED = 1 << 4,
wxFONTFLAG_NOT_ANTIALIASED = 1 << 5,
Maybe setting the font to one which is not antialiased will work for you.

-Max
by mc2r
Tue Mar 17, 2009 3:46 pm
Forum: C++ Development
Topic: Some problem with wxRegEx.ReplaceAll
Replies: 6
Views: 1153

Please post the lines where you are actually assigning the regex to a wxString or char* or whatever. You still haven't posted the regex's as they appear in your code. It will be very very difficult for someone to tell you why a regular expression doesn't work without seeing it. If this is being ent...
by mc2r
Tue Mar 17, 2009 4:10 am
Forum: C++ Development
Topic: Some problem with wxRegEx.ReplaceAll
Replies: 6
Views: 1153

Please post the lines where you are actually assigning the regex to a wxString or char* or whatever. And remember in your assignment that escapes(\) are eaten by the C compiler before they get to wxRegEx at runtime. so any of them you have should be doubled up. ie.. if you want to pass \$ to wxRegEx...
by mc2r
Mon Mar 16, 2009 10:19 pm
Forum: C++ Development
Topic: write to wxTextCtrl in parent object
Replies: 2
Views: 539

half of the problem is that you are calling a member function of a pointer before checking if it is valid. Worse, it is nested, pointer to a pointer to a pointer to a member function. this->pToNnetGUIBase->m_projHisWin->AppendText(wxT("Hallo")); Don't do this. If any of those pointers aren't valid y...
by mc2r
Mon Mar 16, 2009 3:56 pm
Forum: C++ Development
Topic: Using images from resource file
Replies: 8
Views: 2860

The problem isn't that wxBitmap and wxImage won't load png and jpeg images. They will. The problem is that the images as you are using them are embedded in the app through an rc file. The wxBitmap constructor implicitly loads the binary data using the BITMAP resource type. You could try adding a png...
by mc2r
Mon Mar 16, 2009 5:54 am
Forum: C++ Development
Topic: Using images from resource file
Replies: 8
Views: 2860

I found the thread where I posted the code for loading any resource type (any binary file not just images) from an rc.

http://forums.wxwidgets.org/viewtopic.p ... hlight=png

-Max
by mc2r
Mon Mar 16, 2009 5:48 am
Forum: C++ Development
Topic: Using images from resource file
Replies: 8
Views: 2860

I also want to load PNG files etc... so I want to know how to use different image formats loaded from the .rc file in the wxBitmap function -Please Help! you can try adding the bitmap type to the bitmap constructor wxBITMAP_TYPE_BMP Load a Windows bitmap file. wxBITMAP_TYPE_BMP_RESOURCE Load a Wind...
by mc2r
Mon Mar 16, 2009 3:12 am
Forum: C++ Development
Topic: Using images from resource file
Replies: 8
Views: 2860

For your rc declaration you should be doing this

Code: Select all

wxBitmap *bitmap = new wxBitmap("Splash"); 
Are you sure the path is correct and the .rc is compiling and getting linked to the app?

-Max
by mc2r
Sun Mar 15, 2009 4:13 pm
Forum: C++ Development
Topic: onclick wxcommand event and sending pointer to function
Replies: 3
Views: 803

but can you give me any example of how to do it? (especially the second way) i assume that the first way of doing is nothing but making pointer to the array in class declaration instead of making it global, but i completely don't understand that second way... Its the same thing. First example you a...