Search found 2465 matches

by PB
Sat Dec 25, 2010 9:36 am
Forum: C++ Development
Topic: Redirecting fprintf to wxMessageBox.
Replies: 1
Views: 776

1. Replace all "fprintf(stderr," occurences with a function of your choice, probably some of wxLog* functions ? Using the proper tool, it shouldn't take much time, even if you have to do it whenever the 3rd party source code changes (e.g. as a one of precompile steps). 2. I never used this one but t...
by PB
Fri Dec 24, 2010 9:11 am
Forum: C++ Development
Topic: Migrate from WTL to wxWidgets
Replies: 54
Views: 8436

is it somehow possible to add statusbar to wxAuiMDIChildFrame? Override its virtual wxStatusBar* CreateStatusBar(int WXUNUSED(number) = 1, long WXUNUSED(style) = 1, wxWindowID WXUNUSED(winid) = 1, const wxString& WXUNUSED(name) = wxEmptyString) { return NULL; } ? But I doubt it's that easy as wxAui...
by PB
Thu Dec 23, 2010 11:53 pm
Forum: C++ Development
Topic: Migrate from WTL to wxWidgets
Replies: 54
Views: 8436

I've checked docs for trunk and it says While all images have RGB data, not all images have an alpha channel. Before using wxImage::GetAlpha you should check if this image contains an alpha channel with wxImage::HasAlpha. Note that currently only the PNG format has full alpha channel support so only...
by PB
Thu Dec 23, 2010 11:32 pm
Forum: C++ Development
Topic: Migrate from WTL to wxWidgets
Replies: 54
Views: 8436

Well, there might be some issues with 32-bit bitmaps and transparency after all. Anyway, using wxImage is a portable way, as far as I know wxBitmap can load Windows bitmaps only on Windows. Or do you plan to convert all of them to XPMs? Just out of curiosity, how did you load the bitmaps into toolba...
by PB
Thu Dec 23, 2010 11:05 pm
Forum: C++ Development
Topic: Migrate from WTL to wxWidgets
Replies: 54
Views: 8436

Mmm, looks just fine to me on both Windows 7 and Windows XP: http://img46.imageshack.us/img46/5012/toolbard.png I did it like this, ugly code but it's just to see if those icons of yours work in wxAuiToolBar m_pMainToolBar= new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_...
by PB
Thu Dec 23, 2010 4:53 pm
Forum: C++ Development
Topic: Migrate from WTL to wxWidgets
Replies: 54
Views: 8436

Have you tried to use your icons in AUI sample? Did they appear as they should? If they didn't here's a hint, I might be wrong though. I think wxAUIToolbar is not a Windows ToolBar wrapper, it draws the toolbar by itself using wxBitmap, see wxAuiDefaultToolBarArt::DrawButton. Similarly with wxAuiDef...
by PB
Thu Dec 23, 2010 10:39 am
Forum: Compiler / Linking / IDE Related
Topic: how to compile wxWidgets to mswd directory
Replies: 3
Views: 976

I think wxWidgets 2.9 kinda expect you to use UNICODE, so unlike 2.8 they don't even provide ANSI configurations in .DSW files. Even if there's only 0.1 difference in versions, 2.9 are more like 3.0. If you're starting a new application, it seems Unicode is the way to go. If you're maintaining an ol...
by PB
Thu Dec 16, 2010 11:36 am
Forum: C++ Development
Topic: Display wxYES_NO in English regardless of OS language
Replies: 5
Views: 1221

Or, if you're using recent (2.9+) wxWidgets there's a wxMessageDialog . To my surprise, changing locale works but users don't usually appreciate one application having settings different from those system-wide - e.g. decimal separator. It's sometimes very annoying. On MS Windows, the default behavio...
by PB
Mon Dec 13, 2010 7:20 pm
Forum: C++ Development
Topic: Problem using MimeTypesMgr to find command to open a file
Replies: 11
Views: 1893

Thanks for your answer. I do not make more complex things and thus, this function would perfeclty fit... if it was available on wxWidgets 2.8.10 (which if I am not wrong, is not the case). I'm sorry, I didn't realize the function is not available in 2.8 branch - I am new to wxWidgets so I use trunk...
by PB
Mon Dec 13, 2010 5:07 pm
Forum: C++ Development
Topic: Problem using MimeTypesMgr to find command to open a file
Replies: 11
Views: 1893

I use the MimeTypesMgr for two purposes : - first one: display the default system icon next to the attachment name. This part works correctly. - second one: open the attachment when the user double-click on it. This part works fine for all files tested except zip ones. wxFileType* file_type = wxThe...
by PB
Mon Dec 13, 2010 1:11 pm
Forum: C++ Development
Topic: Excel file read
Replies: 25
Views: 9121

Hi doublemax! Unfortunately, I don't know much about wxAutomation. As I wrote in my previous post, before I started reading this thread I had no idea how it works. I also I don't have any previous experience with OLE/Automation. The code I posted here is only demonstrating how to interact with MS Ex...
by PB
Mon Dec 13, 2010 9:39 am
Forum: C++ Development
Topic: Excel file read
Replies: 25
Views: 9121

I use wxWidgets 2.9 current SVN trunk, of course in Unicode. I don't get how did you solve the problem I deemed to be unsolvable? I mean lack of certain VARIANT types support in wxVariant. Did you use Range.Value2 to bypass currency problems? Or that ugly hack in oleutils.cpp I suggested earlier? Ev...
by PB
Sun Dec 12, 2010 4:19 pm
Forum: C++ Development
Topic: Excel file read
Replies: 25
Views: 9121

One last thing. Below is a quick hack that allows you to get (and only get) values from Excel even if the type of VARIANT is VT_CY. wxVariant type will be set to double. Precision is just 4 digits to the right , if the cyVal is REALLY big it might overflow. Insert the following lines right before th...
by PB
Sun Dec 12, 2010 1:45 pm
Forum: C++ Development
Topic: Excel file read
Replies: 25
Views: 9121

I've spent some more time looking into the issue and I think I have bad news. I believe that OLE wrapper layer in wxWidgets is fundamentally flawed. This is not a surprise, as it is a part of wxWidgets specific only to MSW port and probably very rarely used. See e.g. lack of responses in this thread...
by PB
Sat Dec 11, 2010 3:13 pm
Forum: C++ Development
Topic: Excel file read
Replies: 25
Views: 9121

I'm really confused. I pasted Your code in my project, and still not working. I'm testing on Excel 2003. I've attached my *.xls file named a.xls . It is really a very simple file. I don't see any file attached to your post. Please post the file so I can test it. Here is my output. Sheet.UsedRange p...