Originally posted by: jimh
Really nice, George - elegant and useful.
Thanks for the extra Set, too, Roland.
Jim
ReplyOriginally posted by: George Chastain
I will soon be providing an update to this article that is a new implementation using my new CGCMultiFieldEdit class (see the article "Multi-Field Edit Controls -- A Whole New Class of Edit Controls"). This is a better implementation that will be easier to modify for future capabilities and styles. Look for it soon!
ReplyOriginally posted by: Roland Ortloff
first of all great source!!!
However, in addition to the method GetDecimalDegrees
So here it is. Just add the following code:
GECLongitudeCtrl.h
BOOL CGCLongitudeCtrl::SetDecimalDegrees(const double dDegrees);
BOOL CGCLongitudeCtrl::SetDecimalDegrees(const double dDegrees)
if ((dDegrees < -180.0) || (dDegrees > 180.0))
if (dDegrees < 0)
else
m_iDegrees = (int) tmpval;
m_iMinutes = ((int) (3600.0 * tmpval)) / 60;
FormatAndDisplay();
return true;
BOOL CGCLatitudeCtrl::SetDecimalDegrees(const double dDegrees);
BOOL CGCLatitudeCtrl::SetDecimalDegrees(const double dDegrees)
if ((dDegrees < -90.0) || (dDegrees > 90.0))
if (dDegrees < 0)
else
m_iDegrees = (int) tmpval;
m_iMinutes = ((int) (3600.0 * tmpval)) / 60;
FormatAndDisplay();
return true;
Ciao Roland :)
Hi,
I missed the opposite method SetDecimalDegrees.
==================
GECLongitudeCtrl.cpp
====================
{
double tmpval = dDegrees;
{
return false;
}
{
m_Hemisphere = W;
}
{
m_Hemisphere = E;
}
tmpval -= m_iDegrees;
m_fSeconds = (3600.0 * tmpval) - m_iMinutes * 60;
}
GECLatitudeCtrl.h
==================
GECLatitudeCtrl.cpp
===================
{
double tmpval = dDegrees;
{
return false;
}
{
m_Hemisphere = S;
}
{
m_Hemisphere = N;
}
tmpval -= m_iDegrees;
m_fSeconds = (3600.0 * tmpval) - m_iMinutes * 60;
}
Have fun,
Originally posted by: Andrew Merrill
Not very often do i see an original idea but this is one apart from the mouse handling an the left to right order or its opposite input order. This is a class piece of work and thanks for sharing it with us. Can u generalize this for all the geographic co-ordinate systems, like one base class for the mouse an edit window handling an char tracking, but allow virtuals for all the other implementations. Thanks again , your coding style is very professional also clear and concise. [:-)]
Reply