Search found 22 matches

by martin27
Fri Mar 16, 2007 5:40 am
Forum: C++ Development
Topic: Problem with wxTimeSpan::getDays
Replies: 0
Views: 270

Problem with wxTimeSpan::getDays

inline int wxTimeSpan::GetDays() const { return GetHours() / 24; } I noticed this while doing a calculation that spanned a daylight savings time shift. I believe it should be something like: inline int wxTimeSpan::GetDays() const { return (GetHours()+1) / 24; } Am I wrong? Subtracting last Saturday ...
by martin27
Mon Jan 22, 2007 8:54 pm
Forum: Platform Related Issues
Topic: wxActiveX compiling
Replies: 11
Views: 2306

I'm assuming that min finds the minimum value between two parameters, so I just did the following: // int n = min(prepend.size(), cb); int n = prepend.size(); if (n > cb) n = cb; It's a funny thing why it compiles in other places and not there. I'm guessing it has to do with references to stl header...
by martin27
Mon Jan 22, 2007 5:26 pm
Forum: Platform Related Issues
Topic: wxActiveX compiling
Replies: 11
Views: 2306

Forgot one other thing that I changed to get wxActiveX to compile. References to "wx/setup.h" needed to be changed to "wx/msw/setup.h" Don't ask me why. I have no idea what's going on with setup.h, where it's supposed to exist, and where it's not supposed to exist.
by martin27
Mon Jan 22, 2007 4:43 pm
Forum: Platform Related Issues
Topic: wxActiveX compiling
Replies: 11
Views: 2306

I just compiled wxActiveX against 2.8 and there were a couple of errors that were easily fixed: 1. SetTransparent() seemed to no longer be in 2.8 in that form. 2. min(x,y) didn't seem to work. This was easily replaced with some minimizing code. It's probably better to use wxMozilla, though because i...
by martin27
Sun Jan 21, 2007 8:46 pm
Forum: Platform Related Issues
Topic: True MDI on Linux
Replies: 6
Views: 1064

I think the way MS has used MDI in the past, for instance in Office as Jorg pointed out, is a bit silly. However, there are specialized applications where it makes sense. The application I'm interested in is for accounting information. So users are interested in: 1. A variaty of different views of t...
by martin27
Sun Jan 21, 2007 12:41 am
Forum: Platform Related Issues
Topic: True MDI on Linux
Replies: 6
Views: 1064

OK, so I didn't notice that there was a wxaui sample in the wx samples directory. I built it and looked at it on Linux. That particular sample doesn't appear to have any MDI functionability. MDI seems rather simple. All you're doing is making sure that a child frame window gets clipped by its parent...
by martin27
Sat Jan 20, 2007 11:47 pm
Forum: Platform Related Issues
Topic: True MDI on Linux
Replies: 6
Views: 1064

Hmm, I couldn't get wxAUI to build on my Linux system, but from looking at the code it seems unlikely that it would support its own MDI classes. It appears to merely implement wx's MDI classes as part of its docking window manager. It just uses MDI as a feature to put the undocked windows into an al...
by martin27
Sat Jan 20, 2007 11:11 pm
Forum: Platform Related Issues
Topic: True MDI on Linux
Replies: 6
Views: 1064

True MDI on Linux

Do any of the wx Linux versions support a true MDI interface? I just tried the MDI sample on GTK/Linux and it had fixed tabbed windows instead of floating MDI panes. Is this something that anybody has tried or has any desire to do in wx/Linux? I've done some searching on MDI and Linux and it seems t...
by martin27
Sun Jan 14, 2007 1:50 am
Forum: Platform Related Issues
Topic: MFC using wxWidgets
Replies: 6
Views: 1150

I don't think naming/linking conflicts would be the problem. You wouldn't link to the MFC libs, obviously. There are subtle problems like the MFC macros. I'm not a C++ macro expert but I believe MFC's c++ compiler is not standard. For instance the following: BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) ...
by martin27
Sun Jan 14, 2007 12:23 am
Forum: Platform Related Issues
Topic: MFC using wxWidgets
Replies: 6
Views: 1150

I don't think there would be licensing issues. There have been companies in the past that have done MFC Unix ports, and I don't think those companies pay royalties to Microsoft. The idea of making a bullet proof version of MFC on top of wxWidgets makes me shudder. There are so many problems includin...
by martin27
Sun Jan 14, 2007 12:16 am
Forum: C++ Development
Topic: wxControlContainer::HandleOnNavigationKey
Replies: 1
Views: 305

I sort of solved this problem by picking up the popup dismiss event and doing what I need to do there. It's getting very messy, though, with lots of dealing with special cases and exceptions.
by martin27
Sat Jan 13, 2007 3:24 am
Forum: C++ Development
Topic: wxControlContainer::HandleOnNavigationKey
Replies: 1
Views: 305

wxControlContainer::HandleOnNavigationKey

I'm trying to make a wxGridCellEditor and I'm having some problems with wxControlContainer::HandleOnNavigationKey snatching my keyboard events. I thought the contract was that the focus window always got first crack at the keyboard events? Is that not correct? wxWidgets seems to be routing certain k...
by martin27
Sat Jan 06, 2007 3:48 pm
Forum: Component Writing
Topic: What happens to keyboard events when a combo
Replies: 2
Views: 828

OK, I think the problem was that I was trying to trap the keyboard messages in the combo control rather than the listview popup. However, I've changed the structure of the combo to use a wxVListBox to do the list popup. I think this will give me more control, and it it also captures keyboard events.
by martin27
Sat Jan 06, 2007 1:50 am
Forum: Component Writing
Topic: Deriving from wxcontrol or wxbutton?
Replies: 3
Views: 1448

If you know when the button's clicked, why don't you just draw from there, at least on the first time it's clicked?
by martin27
Sat Jan 06, 2007 1:45 am
Forum: Component Writing
Topic: DrawText offset help
Replies: 1
Views: 776

Is the offset systematic? I mean either fixed or proportional to the size of the font? If you do a DrawText and it doesn't draw to the correct location it sounds like a bug. You could always use GetTextExtent to see what the dimensions of the text are and draw what you want accordingly. Here's some ...