本文整理汇总了C++中std::string::LoadString方法的典型用法代码示例。如果您正苦于以下问题:C++ string::LoadString方法的具体用法?C++ string::LoadString怎么用?C++ string::LoadString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类std::string
的用法示例。
在下文中一共展示了string::LoadString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createDisplayStrings
void UTMCoord::createDisplayStrings (std::string& topLeftString,
std::string& topRightString, std::string& bottomLeftString,
std::string& bottomRightString) const
// Purpose:
// This function creates four strings that can be used for display; these
// strings contain coordinate data. The four strings are for the top left,
// top right, bottom left, and bottom right text of a display; each string
// is specified as follows:
// - top left: UTM zone
// - top right: Easting
// - bottom left: "UTM"
// - bottom right: Northing
// Notes:
// It is up to the calling function to write these strings to the display.
{
#if 0
bottomLeftString.LoadString (IDS_UTM);
if (IsOutsideUTMGrid () == false) {
// Extract the elements of the coordinate string.
CString coordString;
CreateCoordString (coordString);
topLeftString = coordString.Mid (UTM_ZONE_POS, UTM_ZONE_LEN);
topRightString = coordString.Mid (UTM_EASTING_POS, UTM_EASTING_LEN);
bottomRightString = coordString.Mid (UTM_NORTHING_POS,
UTM_NORTHING_LEN);
} else {
// The coordinate is outside of the UTM grid boundary, so the
// coordiante strings are empty.
topLeftString = "";
topRightString = "";
bottomRightString = "";
}
#endif
}