Search found 203 matches

by eco
Sun Jun 04, 2006 9:20 pm
Forum: C++ Development
Topic: (maybe) stupid C++ question
Replies: 8
Views: 2890

To clarify what lowjoel was saying: "#pragma" is part of the standard. "#pragma once" is not. "#pragma" is for issuing compiler specific directives not covered by the standard. VC, for instance, supports warning disabling like this: "#pragma warning ( disable : 410...
by eco
Fri Jun 02, 2006 11:35 pm
Forum: C++ Development
Topic: (maybe) stupid C++ question
Replies: 8
Views: 2890

The wikipedia article is incorrect. #pragma once also works on GCC 3.4+ (it was un-deprecated) and inclusion guards and #pragma once aren't quite the same thing. The result is the same but #pragma once improves compilation speed (see this Games from Within article for details). Use both to get the s...
by eco
Thu May 18, 2006 12:08 am
Forum: C++ Development
Topic: Problem with CaptureMouse and windows that scrolls
Replies: 7
Views: 2478

Nope, there is no EVT_MOUSE_IS_STILL_OUTSIDE event. wxScrolledWindow does it using a derived wxTimer that continually fires until an EVT_ENTER_WINDOW occurs.
by eco
Tue May 16, 2006 10:52 pm
Forum: C++ Development
Topic: Problem with CaptureMouse and windows that scrolls
Replies: 7
Views: 2478

wxScrolledWindow is scrolling single lines which is exactly what it should do. If you want it to move more than a pixel set your scroll increment to something bigger than a pixel (using SetScrollRate ). Changing this behavior is somewhat complicated but the meat of it is in scrlwing.cpp (wxAutoScrol...
by eco
Fri May 12, 2006 5:27 pm
Forum: C++ Development
Topic: ISO-8859-1 file in ANSI build
Replies: 1
Views: 1021

Although you are extremely lacking in details, I bet you're looking for something like this: wxFile file("somefile.txt"); char buffer[1025]; file.Read(buffer, 1024); buffer[1024] = '\0'; wxString some_iso8859_1_string(buffer, wxConvISO8859_1); Also, I'm sure there is a much cleaner way (wx...
by eco
Thu Apr 13, 2006 9:38 pm
Forum: C++ Development
Topic: wxDateTime::Now() off by 10 hours
Replies: 13
Views: 4670

Vadim's reply: I've just tried it here (VC7.1, HEAD) and it works as expected. I'm not in UTC-9 of course, but I'm not in UTC neither... I have really no idea why it doesn't work for two of you. I suspect you may have to break out the debugger if you want to get to the bottom of the issue. I'm a bit...
by eco
Thu Apr 13, 2006 7:14 pm
Forum: C++ Development
Topic: wxDateTime::Now() off by 10 hours
Replies: 13
Views: 4670

I tried tracing the differences between the two. I didn't see anything glaringly wrong but the path is slightly complicated to trace. wxDateTime uses the default copy constructor so I doubt the issue is there. The first main difference I would think would be that the first one creates a wxDateTime i...
by eco
Wed Mar 22, 2006 6:28 pm
Forum: C++ Development
Topic: Adding Days to wxDateTime
Replies: 2
Views: 1384

Rather than using numbers I suggest using wxDateTime::Jan, wxDateTime::Feb, etc. because there is no guarantee that wxDateTime::Jan will always equal 0. You can also easily add directly to wxDateTime::Jan if you need to iterate through or specifiy arbitrary months. For example for(wxDateTime::Month ...
by eco
Wed Mar 22, 2006 6:21 pm
Forum: C++ Development
Topic: How can my application use the windows xp style?
Replies: 7
Views: 2487

You need a manifest to enable XP style themes (you can get it by including wx/msw/wx.rc in your resource file).
by eco
Sun Mar 19, 2006 8:16 pm
Forum: C++ Development
Topic: My wxWidgets application doesn't run in other computers,why?
Replies: 14
Views: 5092

Re: My wxWidgets application doesn't run in other computers,

idhan wrote:Exists any application that indicates the DLL or files necessary to run the application in other machines? How can I make sure that my wxWidgets application can run in any windows xp machine?
Dependency Walker works like a charm.
by eco
Thu Mar 16, 2006 7:21 pm
Forum: C++ Development
Topic: sizeof(wxChar) == 2 and Unicode
Replies: 2
Views: 1290

The bytes needed depends on the encoding. Not all encodings support all codepoints. I'm unsure what encoding wxString uses internally.
by eco
Thu Mar 16, 2006 12:35 am
Forum: C++ Development
Topic: Set Mouse Position
Replies: 4
Views: 2999

You could fake motion just fine. Technically, the windowing environment just adds the mouse motion vector to the current mouse position rapidly to simulate motion and you could do the same (wxIdleEvent may be a starting point for this) although the user could "fight" you over the position ...
by eco
Wed Mar 15, 2006 6:30 am
Forum: C++ Development
Topic: Set Mouse Position
Replies: 4
Views: 2999

Use wxWindow::WarpPointer. Note, you can't do this on Mac because, as the documentation says: "Apple Human Interface Guidelines forbid moving the mouse cursor programmatically".
by eco
Tue Mar 14, 2006 6:37 pm
Forum: C++ Development
Topic: How to create and use a png resource???
Replies: 6
Views: 2638

I use the method described here which works quite well.
by eco
Fri Mar 03, 2006 11:51 pm
Forum: Platform Related Issues
Topic: wxMSW - My documents - folder
Replies: 8
Views: 2827

wxWidgets seems to get it defined for me by itself. Are you placing the include after the inclusion of <wx/wx.h> (you should be)? Just to be thorough, here is a list of my project wide preprocessor defines: WIN32;_DEBUG;_CONSOLE;__WXMSW__;__WXDEBUG__