本文整理汇总了C++中Profile::QueryHandle方法的典型用法代码示例。如果您正苦于以下问题:C++ Profile::QueryHandle方法的具体用法?C++ Profile::QueryHandle怎么用?C++ Profile::QueryHandle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile
的用法示例。
在下文中一共展示了Profile::QueryHandle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
/**************************************************************************
* If the ISPELL environment variable isn't set, set it to the current *
* directory, before we change it. This assumes that the current *
* directory is also the directory to which Escriba (and ISPELL) was *
* installed. This is true with the basic installation. *
**************************************************************************/
#ifdef DEBUG
Log ( "Escriba::main: Setting ISPELL environment variable." ) ;
#endif // DEBUG
{
char *p = getenv ( "ISPELL" ) ;
if ( p == 0 ) {
static char SetString [_MAX_PATH+10] ;
sprintf ( SetString, "ISPELL=%s", HomePath ) ;
_putenv ( SetString ) ;
} /* endif */
}
/**************************************************************************
* Get application language module. *
**************************************************************************/
#ifdef DEBUG
Log ( "Escriba::main: Loading default language." ) ;
#endif // DEBUG
char DefaultLanguage [80] = { 0 } ;
{ /* startblock */
Profile IniFile ( PSZ(PROGRAM_NAME), 0, HomePath ) ;
if ( IniFile.QueryHandle() )
IniFile.GetString ( "Language", DefaultLanguage, sizeof(DefaultLanguage) ) ;
else
strcpy ( DefaultLanguage, "English" ) ;
} /* endblock */
Library = Language_Create ( PROGRAM_NAME, REVISION, IDS_TITLE1, DefaultLanguage ) ;
if ( Library == 0 ) {
Process Proc ( PROGRAM_NAME, HWND_DESKTOP, 0 ) ;
Debug ( HWND_DESKTOP, "ERROR: Unable to find language module for %s, %s, %s.", PROGRAM_NAME, REVISION, DefaultLanguage ) ;
return ( 1 ) ;
} /* endif */
LibraryHandle = Library->QueryHandle() ;
/**************************************************************************
* Get the program title. *
**************************************************************************/
ResourceString Title ( Library->QueryHandle(), IDS_TITLE ) ;
/**************************************************************************
* Determine the default codepage. *
**************************************************************************/
#ifdef DEBUG
Log ( "Escriba::main: Determining codepage to use." ) ;
#endif // DEBUG
PUSHORT pCodePage = Library->QueryCodepages() ;
while ( *pCodePage ) {
if ( !DosSetProcessCp ( *pCodePage ) )
break ;