Search found 109 matches

by ssigala
Wed Sep 07, 2005 10:54 pm
Forum: C++ Development
Topic: wxGrid can be very slow
Replies: 8
Views: 2192

Well not quite, drawing the grid is still O(N^2), but it's way better than O(N^4).
Oops, sorry. I meant that MyGridCellAttrProvider do not need to scan a list internally to know the attribute at row,col.
by ssigala
Wed Sep 07, 2005 4:08 pm
Forum: C++ Development
Topic: InterlockedIncrement?
Replies: 10
Views: 1518

I am looking for single statement atomic increment and decrement. I assume you are using threads. The current solution I use is the class wxCriticalSectionLocker: static wxCriticalSection gs_critical; int my_shared_obj; // ... void MyClass::Mumble() { if (i_have_to_increment_object) { wxCriticalSec...
by ssigala
Wed Sep 07, 2005 4:00 pm
Forum: General Development
Topic: Programming in C
Replies: 2
Views: 594

Re: Programming in C

nicolas_faf wrote:Hello, does exist a C version ? Or only a c++ version ?
C++ only with a lot of other languages bindings (Python, Perl, Lua, .Net, etc) but no C.
by ssigala
Wed Sep 07, 2005 3:56 pm
Forum: C++ Development
Topic: Question about Connect
Replies: 10
Views: 1090

Sure, but I suggest you of macros: 1.) they are more easy, atleast for me :D 2.)its a standard, atleast if you are from windows background. 3.)Its the primary method in wxWidgets. 4) Are more readable, IMHO. It is common to define the event macros at the top of the class implementation file, usuall...
by ssigala
Wed Sep 07, 2005 3:48 pm
Forum: C++ Development
Topic: wxGrid can be very slow
Replies: 8
Views: 2192

Re: wxGrid can be very slow

It works just fine when I have small matrices, but as I approach 100x100, it slows down to the point of being unbearable. ... The cells along the diagonal get set to gray, but I don't think that's as much of a problem since they're growing at a rate of n instead of n^2. Some situations might inv7ol...
by ssigala
Tue Sep 06, 2005 11:36 pm
Forum: C++ Development
Topic: Code in main app that DLL wants to reference... possible?
Replies: 10
Views: 1475

Re: Code in main app that DLL wants to reference... possible

lowjoel wrote:I have code in my main exe, and some DLLs that refer to it.
You mean that the code in the DLL calls some function that exists in the main program executable?
by ssigala
Tue Sep 06, 2005 11:24 pm
Forum: C++ Development
Topic: Modal Dialog lifetime
Replies: 5
Views: 905

Re: Modal Dialog lifetime

I'm trying to create a way of making a list of modal dialogs for observation purposes. I'm trying to write an intermediary class that will handle the maintenance of this list, which is where these questions are coming from. Perhaps you should explain what you want displayed on the screen and when. ...
by ssigala
Tue Sep 06, 2005 11:16 pm
Forum: C++ Development
Topic: Modal Dialog lifetime
Replies: 5
Views: 905

Re: Modal Dialog lifetime

1) Is there any way to show a modal dialog other than "ShowModal()"? Maybe, it depends on what you need to do. 2) After "EndModal()" is called, will a call to the ~wxDialog always follow (or can it be in some zombie state?) The wxDialog::~wxDialog destructor (like any C++ class) is always called wh...
by ssigala
Tue Sep 06, 2005 11:09 pm
Forum: C++ Development
Topic: wxGrid bugs
Replies: 6
Views: 1020

Re: wxGrid bugs

MBukovskiy wrote:Good day to everybody!
I use in my project wxGrid (version 2.4.2)
There are two bugs:
You should consider upgrading to wx version 2.6.1, otherwise 99% of the people on this forum will not able to help you; the latter version have many bugs fixed compared to version 2.4.2.
by ssigala
Tue Sep 06, 2005 11:06 pm
Forum: C++ Development
Topic: wxBitmap constructor performance Win32
Replies: 7
Views: 1223

So, I'm giving up. I'm going to code a DirectShow source filter to do this job, and that'll be the end of it. But, if someone has a solution that they can share, I'm still interested. I sincerely appreciate your help. You might give a try at SDL, IIRC the Windows version interfaces directly to Dire...
by ssigala
Tue Sep 06, 2005 6:27 pm
Forum: C++ Development
Topic: wxImage Problem
Replies: 16
Views: 2946

May be, but I can't understand why is it done like so, isn't it a wastage of space/memory. Surely it occupies more memory, but you understand that using different internal data structure for different bpp image types, requires a lot of working in the wxImage code. Each wxImage member (for example R...
by ssigala
Tue Sep 06, 2005 6:15 pm
Forum: C++ Development
Topic: wxImage Problem
Replies: 16
Views: 2946

priyank_bolia wrote:I was still apyling MFC concepts
You are applying MS' broken concepts. That's your fault :mrgreen:
by ssigala
Tue Sep 06, 2005 6:05 pm
Forum: C++ Development
Topic: wxImage Problem
Replies: 16
Views: 2946

chadman wrote:Is this true even for a monochrome bitmap?
Yes.
by ssigala
Tue Sep 06, 2005 5:52 pm
Forum: C++ Development
Topic: wxImage Problem
Replies: 16
Views: 2946

priyank_bolia wrote: 2.)For bitmap images, there is a padding also, which you didn't consider in your program.
Maybe in Windows DIB images and OpenGL images, but not in wxImage internal data.
by ssigala
Tue Sep 06, 2005 5:50 pm
Forum: C++ Development
Topic: wxImage Problem
Replies: 16
Views: 2946

So what's going on? wxImage::GetData() returns a pointer to the internal data, in RGBRGBRGB... format. For an image sized width*height, you will have an internal data sized width*height*3 (i.e. 3 bytes per pixel). So you should write somethink like: wxImage *image = new wxImage("A.bmp", wxBITMAP_TY...