?
Solved

COleCurrency::ParseCurrency()

Posted on 1997-08-26
1
Medium Priority
?
272 Views
Last Modified: 2013-11-20
Why does COleCurrency::ParseCurrency fail when I have the Swedish Regional settings ?
It seems to be a problem when I have a dot as thousand sign and a comma as a decimal sign at the same time.
Regards, torbjorn.berglund@reterm.se
0
Comment
Question by:tberglund
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
kargo earned 1000 total points
ID: 1304939
The COleCurrency::ParseCurrency function uses a function in OleAuth32.dll that is supposed to convert OLE types from something to something else.  In this case the conversion if from OLESTR to CURRENCY.  There is a bug in the VarCyFromStr(() function which is used in that conversion.  You may have noticed that the default "Digit Grouping Symbol" in the Control Panel setting if either " " or ",".   I guess that you manually added the "." to get the result you mention.  The value is ignored in reality so you can only use a " " since the "," is used as the "Decimal Symbol".  The solution I came up with is to parse user entered text and place " " where ever the "Digit Grouping Symbol" appears before the conversion.  When going to the display I find " " and replace them with the "Digit Grouping Symbol".
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question