wxString::Format way of putting commas in numbers: ie 10,000

wxWindows

    Next

  • 1. XRC and Bitmaps
    Hi, I am having an XRC file with the following entries in it to load embeded bitmaps to my application: <resource> <object class="wxBitmap" name="complete_word"> <bitmap>res/magic-wand.png</bitmap> </object> : : <resource> After compiling the xrc file with wxrc.exe utility, and calling wxXmlResource::Get()->LoadBitmap(wxT(complete_word")) in my code, I get NULL bitmap which cuases later on to assertion failure. After debugging the code I found what I think is the problem, in the file xh_bmp.cpp (xrc project) line 36, I replaced the line: return new wxBitmap(GetBitmap(wxEmptyString)); with this line: return new wxBitmap(GetBitmap(wxT("bitmap"))); This solved the problem, any ideas why using wxEmptyString? Thx, Eran --------------------------------------------------------------------- To unsubscribe, e-mail: XXXX@XXXXX.COM For additional commands, e-mail: XXXX@XXXXX.COM
  • 2. Quitting an app with a wxSocketServer active
    Hi, Win XP, Cygwin, wxWidgets 2.6.2 I have created an app that when initialised creates a wxSocketServer to listen to a particular port. All the comms it is supposed to do work fine. It is only when I try to quit the application that problems occur. The main window receives a close event so that it can Destroy the wxSocketServer instance this is called and the window disapears, however the application then just hangs in the background. I have tried using Destroy and delete on this server class to no avail. Even if the server never receives an event the app won't quit. If I run the program with the server code removed the app quits normally. I have a feeling the server is tying up the event code somehow but I'm not sure how. The code I use is a copy of the sockets example almost line for line. Thanks, Mark ps. server is the instance of wxSocketServer --------------------------------------------------------------------- To unsubscribe, e-mail: XXXX@XXXXX.COM For additional commands, e-mail: XXXX@XXXXX.COM

wxString::Format way of putting commas in numbers: ie 10,000

Postby jim » Fri, 16 Jan 2004 08:13:45 GMT

Hi,  I'm trying to format my integers with commas,
and I've come across the advise to do:

#include <locale.h>

....

    char *locale = setlocale(LC_NUMERIC, "en_US.iso88591"); 
    result = wxString::Format("Size: %'dx", number);

but it doesn't work with the sprintf that wxWindows is
linked against (2.4.2 on Windows)

Is there a proper way to format numbers with locale-specific
correctness?

Thanks!
-Jim

---------------------------------------------------------------------
Please read  http://www.**--****.com/ 

To unsubscribe, e-mail:  XXXX@XXXXX.COM 
For additional commands, e-mail:  XXXX@XXXXX.COM 


Re: wxString::Format way of putting commas in numbers: ie 10,000

Postby mmartin » Sat, 17 Jan 2004 04:46:58 GMT

 >>>>
Hi, I'm trying to format my integers with commas, and I've come across 
the advise to do: #include <locale.h> ... char *locale = setlocale(LC 
NUMERIC, "en US.iso88591"); result = wxString::Format("Size: %'dx", 
number); but it doesn't work with the sprintf that wxWindows is linked 
against (2.4.2 on Windows) Is there a proper way to format numbers with 
locale-specific correctness? Thanks! -Jim
<<<

Using wxLocale may help. See
 http://www.**--****.com/ 

If not, try wxFormatValidator at contributions page

HTH
Manolo



---------------------------------------------------------------------
Please read  http://www.**--****.com/ 

To unsubscribe, e-mail:  XXXX@XXXXX.COM 
For additional commands, e-mail:  XXXX@XXXXX.COM 


Similar Threads:

1.Formatting double with wxString::Format

Hi,

my program is compiled with MinGW on XP with wxWidgets-2.8.8.

Using wxString::Format("<%010.2f>", 3.14) I get the result
"<      3.14>" (padded with blanks).
When I use sprintf(buf, "<%010.2f>", 3.14) instead, then I get the
correct result "<0000003.14>".

Is this a bug in wxString?

Lutz



2.wxStringBuffer gets error C2248: 'wxString::wxString' : cannot access private member declared in class 'wxString'

Hello
supposed to work? this is VC6.0:

    wxStringBuffer sb(buf,2);

    if (file_data.Read(sb != 2)) {

This gets compiler error
xString::wxString' : cannot access private member declared in class
'wxString'

pointing to the Read line.
Using 2.4.2 in VC6.0 winXP

based on wxStringBuffer example code.
Thanks
Todd.

3.Putting a comma in (cn=user) when creating a user in AD

used this script to create a new user and set the new name (CN) as (LastName, FirstName). Error comes whenever I use the comma.

firstname = Forms!NewUserCreation!Fname.Value ' this is from Access
LastName = Forms!NewUserCreation!Lname.Value
Comma = ", "

username1 = LastName & Comma & firstname

Set objUser = objOU.Create("user", "cn=" & username)
objUser.put "sAMAccountName", "" & username

Can someone assist? Appreciate your help.

Fesseha Z.


4.Converting Real numbers with IEEE format to G_Float format

Hi,

We are trying to migrate an Oracle application from OpenVMS Alpha to
OpenVMS Integrity.

With Oracle on OpenVMS Integrity the real numbers are stored in IEEE
format.

All the application code is compiled using G_Float, and we do not want
to change this as it will impact on communications with the PLCs.

Is it possible to convert IEEE format numbers to G_Float format
numbers easily?

Thanks
Andrew

5.Playlist limit of 10,000 tracks

Is there anyway to over ride the 10,000 track limit in a single playlist?

6. Over 10,000 downloads of Ubuntu from Microsoft's Web Site

7. SharePoint 10,000 ft view

8. 10,000 users slow permission setting....



Return to wxWindows

 

Who is online

Users browsing this forum: No registered users and 17 guest