Search found 172 matches

by leiradella
Sun Mar 07, 2010 5:15 pm
Forum: C++ Development
Topic: Frame doesn't show
Replies: 3
Views: 1761

Thanks doublemax!

LoadConfig reads the frame's position and size and it was reading -32000 for both x and y.

The frame appears just fine now.

Cheers,

Andre
by leiradella
Sun Mar 07, 2010 5:09 pm
Forum: C++ Development
Topic: Frame doesn't show
Replies: 3
Views: 1761

This is what Shader's constructor does: Shader::Shader() : wxFrame(NULL, wxID_ANY, wxT("igFragmentShader")) { BuildMenu(); AddStatusBar(); LoadConfig(); m_Timer.SetOwner(this); m_Timer.Start(1000, wxTIMER_CONTINUOUS); } BuildMenu just creates a wxMenuBar, adds some wxMenus to it and then s...
by leiradella
Sun Mar 07, 2010 5:00 pm
Forum: C++ Development
Topic: Frame doesn't show
Replies: 3
Views: 1761

Frame doesn't show

Hi All, My application, which used to run just fine, now doesn't show before entering the event loop. Stepping in the debugger, I can see that frame->Show is being called: bool Application::OnInit() { shader = new Shader(); // This is a wxFrame shader->SetIcon(wxIcon(icon_xpm)); shader->Show(true); ...
by leiradella
Tue Oct 27, 2009 1:23 pm
Forum: C++ Development
Topic: How to show greek characters in OpenGL
Replies: 5
Views: 2043

Maybe PolyFont can help you on this:

http://www.gameprogrammer.com/polyfonts/polyfonts.html

It even has a greek font!

Although it's a SDL library, I think it should be very easy to remove any SDL-specific code and leave only the OpenGL code.

Note: I've never used it.

Cheers,

Andre
by leiradella
Wed Oct 14, 2009 4:23 am
Forum: C++ Development
Topic: wxString to GUID
Replies: 3
Views: 2432

UuidFromString((UCHAR*)(LPCTSTR)myWxString,&myGuid); I'd be surprised if it works as expected... If myWxString is a pointer (i.e. wxString* ) then you're not converting the string characters to an UUID. You're just passing the address where the instance lives in memory and UuidFromString is hap...
by leiradella
Tue Oct 06, 2009 3:52 pm
Forum: C++ Development
Topic: wxXML question.
Replies: 26
Views: 5847

Re: wxXML question.

wxXmlNode *node7 = new wxXmlNode(node6,wxXML_ELEMENT_NODE,wxT("ROW")); wxString tmp; for (list<Recipe>::iterator it = Out.begin(); it!=Out.end(); ++it) { tmp.Printf("%lu",(*it).xx); node7->AddProperty(wxT("XX"),tmp); } The above does not write a well formatted XML stru...
by leiradella
Thu Sep 24, 2009 5:12 pm
Forum: C++ Development
Topic: convert GetCellValue() from wxString to float
Replies: 21
Views: 5282

You should write a new topic just to drive more attention.

Anyway, are you including <wx/grid.h>? And the EVT_GRID_CELL_CHANGE takes only one parameter, the function that will be called when a cell value has changed.

Could you post how you've declared the event table?

Cheers,

Andre
by leiradella
Thu Sep 24, 2009 1:36 pm
Forum: C++ Development
Topic: very small HTTP-Server
Replies: 4
Views: 2045

venkat_sp wrote:try this link if it helps http://wiki.wxwidgets.org/WxHTTP
This is good to implement a HTTP client, anwerlin is trying to write a HTTP server.

Cheers,

Andre
by leiradella
Thu Sep 24, 2009 1:28 pm
Forum: C++ Development
Topic: very small HTTP-Server
Replies: 4
Views: 2045

If you just want to provide HTTP services in a host application, consider embedding a lightweight webserver: http://en.wikipedia.org/wiki/Comparison_of_lightweight_web_servers . If you're doing it for the fun and learning, then please post more details about the error when sending data back to the w...
by leiradella
Thu Sep 24, 2009 1:11 pm
Forum: C++ Development
Topic: convert GetCellValue() from wxString to float
Replies: 21
Views: 5282

all grid events are of type wxGridEvent. This class has the methods GetCol() and GetRow() that do what you want.

Hey, no bugging at all :)

Cheers,

Andre
by leiradella
Wed Sep 23, 2009 2:48 am
Forum: C++ Development
Topic: convert GetCellValue() from wxString to float
Replies: 21
Views: 5282

I'm really getting out of ideas... Do you have the code below in sequence in your code? double d; grid->GetCellValue(1,1).ToDouble(&d); wxMessageBox(wxString::Format(wxT("%f"), d)); array[3][0] = (float)d; wxMessageBox(wxString::Format(wxT("%f"), array[3][0])); If there's mor...
by leiradella
Tue Sep 22, 2009 5:51 pm
Forum: C++ Development
Topic: convert GetCellValue() from wxString to float
Replies: 21
Views: 5282

How's array declared?
by leiradella
Tue Sep 22, 2009 4:47 pm
Forum: C++ Development
Topic: convert GetCellValue() from wxString to float
Replies: 21
Views: 5282

how will I check d? wxMessageBox(wxString::Format(wxT("%f"), d)); I've just done this and d doesn't seem to have anything. So it's not a locale problem. I'm out of options. I'm starting to think there might be a bug in your code, i.e. you're setting values of some cells but are reading ba...
by leiradella
Tue Sep 22, 2009 2:57 pm
Forum: C++ Development
Topic: convert GetCellValue() from wxString to float
Replies: 21
Views: 5282

Well, so ToDouble must be failing. Try wxMessageBox(grid->GetCellValue(1,1).ToDouble(&d) ? wxT("true") : wxT("false")); I don't know, but maybe it's a locale problem? wxString::Format should respect the locale I think. Check if d gets the correct value: wxString(wxT("205...
by leiradella
Sat Sep 19, 2009 8:29 pm
Forum: C++ Development
Topic: A difficult crash
Replies: 4
Views: 1336

Maybe you could just hide the control?