• #### Great goods from you

Posted by multiertEmoto on 02/05/2013 10:06pm

I precisely wished to thank you very much all over again. I am not sure what I might have worked on in the absence of these [url=http://www.saclongchampmarchfr.com]sac longchamp[/url] strategies shared by you over that subject matter.[url=http://www.saclongchampmarchfr.com]longchamp sac[/url] sac longchamp ,It absolutely was an absolute frustrating problem in my opinion, however , witnessing the specialised style you dealt with that forced me to jump over gladness. I'm thankful for your information and thus trust you are aware of an amazing job you happen to be getting into [url=http://www.saclongchampmarchfr.com]sac longchamp pliage[/url] sac longchamp pliage teaching sac longchamp longchamp sac many people through your site. I'm certain you've never met any of us.

• #### Rounding problems when setting decimal degrees

Posted by srbrook on 09/30/2004 10:22am

```When setting a value such as -7.3 I get a rounding problem that would result in trying to set 07:17:60.0 resulting in a SAVESEC crash.
If the seconds are rounded up from 59.99999 to 60.0 then the seconds should be set to 0 and the other fields adjusted to compensate. This results in the following changes to CGCLatLongAbstractBase::SetDecimalDegrees

// Call utility function to break down decimal degrees value.

ConvertDDtoDMS(DecimalDegrees,sign,Degrees,Minutes,Seconds);

if (IsStyle(GC_FLOAT_SECONDS_STYLE,m_Style))
{
// Round up as needed.
// Since the GC_FLOAT_SECONDS_STYLE supports a seconds field
// that provides precision to 1/1000th of a second, I will
// multiply by 1000 and round up.  Then use the floor() function
// to throw away garbage values.
Seconds = TruncDblSeconds(Seconds);

if (Seconds>m_maxSeconds)
{
Seconds = 0;
Minutes++;
if (Minutes>59)
{
Minutes = 0;
Degrees++;
}
}
}

_SAVEDEG(Degrees);		// Store degrees
_SAVEMIN(Minutes);		// Store minutes
_SAVESEC(Seconds);```

• #### _SAVEDEG crash

Posted by Legacy on 06/11/2003 12:00am

Originally posted by: Chris

Hi,

Ive used this control in the apst and it works fine however Ive just added it to a new program and I get a crash when I call SetDecimalDegrees(0.0); Through debug Ive found the crash occurs when the _SAVEDEG macro is called.

Any ideas as to what could be causing it - its driving me up the wall!

Chris

• #### How to Digitize a Map??? (Topographic)

Posted by Legacy on 11/29/2001 12:00am

Originally posted by: Amit Gefen

Is someone know how to describe a topographic mac in a file?

• #### CGCNumEdit Control

Posted by Legacy on 11/20/2001 12:00am

Originally posted by: Joe Bernier

I needed time in hh:mm:ss.000000. Your class was very quick and easy to modify. Thanks!

• #### Tell Me How You Use These Controls

Posted by Legacy on 08/09/2001 12:00am

Originally posted by: George Chastain

I would like to know how you are using these controls. Don't give out proprietary or classified information but let me know as best you can how you are using these controls. I would really like to know. They have proven very popular.

• #### Also, see these articles...

Posted by Legacy on 05/23/2001 12:00am

Originally posted by: George Chastain

If you found this article interesting, you may want to see "UTM Coordinate Control" at:

If you want to learn more about the CGCMultiFieldEdit class, see the article "Multi-Field Edit Controls -- A Whole New Class of Edit Control" at:

Catch me on the web at:

• #### Source Code Updated

Posted by Legacy on 05/22/2001 12:00am

Originally posted by: George Chastain

The source code has been updated.

I corrected a small error that another reader (Tero) caught in the source code that is used to initialize the latitude/longitude control to some value. I also found that the last update was missing a needed preprocessor directive that would keep the context menu from functioning. The project settings have been updated for this. Also note that I have *some* code in place to support hard-coded strings for the context menu but not all code is there to support it. I didn't bother finishing it because I thought that the resource table was the best method. This does not interfer with the correct operation of the controls as implemented. However, if you feel the need to complete that implementation, feel free to do so. The resource table method makes it easier to make changes to support other languages.

I have received a lot of great feedback on this code as well as the code accompanying my article on "Multi-Field Edit Controls -- A Whole New Class of Edit Controls" and a related control class, my "UTM Coordinate Control".

Thanks for the feedback. I hope to have time soon to contribute more articles to this site.

George

• #### Thanks Tero. An editorial error

Posted by Legacy on 05/10/2001 12:00am

Originally posted by: George Chastain

Thanks. I did not catch that. The function is used when initializing a value and I was concentrating on getting other code to work that I overlooked this. It is clearly and editorial error since I set the variable "result" to one thing in the line before and then set to something else in the line in question. I will submit and update soon.

• #### Truncation bug

Posted by Legacy on 05/10/2001 12:00am

Originally posted by: Tero Molander

```There's a bug in CGCLatLongAbstractBase::TruncDblSeconds function.

double CGCLatLongAbstractBase::TruncDblSeconds(const double Seconds)
{
// This must be kept consistent with the parameters passed to the
// CGCDoubleField constructor for the floating-point seconds field
// support object (see private method DefineFields()).
double result = 0.0;
int factor = 1 * int(pow(10.0,double(FLTSECPRECISION)));
result = Seconds * factor + 0.5;
result = floor(Seconds);
result /= factor;
return result;
}

The problem lies in result = floor(Seconds); line. If seconds were f.ex. 59.0 you would get 0.059 as a result. Correct line would be result = floor(result);. Works for me anyway.

```