本文整理汇总了C++中FreeRCString函数的典型用法代码示例。如果您正苦于以下问题:C++ FreeRCString函数的具体用法?C++ FreeRCString怎么用?C++ FreeRCString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FreeRCString函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: WQueryClearRes
bool WQueryClearRes( WAccelEditInfo *einfo )
{
int ret;
UINT style;
char *title;
char *text;
if( einfo != NULL ) {
style = MB_YESNO | MB_APPLMODAL | MB_ICONEXCLAMATION;
text = AllocRCString( W_ACCELCLEARWARNING );
title = AllocRCString( W_ACCELCLEARTITLE );
ret = MessageBox( einfo->edit_dlg, text, title, style );
if( text != NULL ) {
FreeRCString( text );
}
if( title != NULL ) {
FreeRCString( title );
}
if( ret == IDYES ) {
return( TRUE );
}
}
return( FALSE );
}
开发者ID:NoSuchProcess,项目名称:open-watcom-v2,代码行数:25,代码来源:wmain.c
示例2: WSaveSymbols
bool WSaveSymbols( WAccelEditInfo *einfo, WRHashTable *table, char **file_name,
bool prompt )
{
char *name;
WGetFileStruct gf;
bool ok;
if( einfo == NULL || table == NULL || file_name == NULL ) {
return( FALSE );
}
if( WRIsDefaultHashTable( table ) ) {
return( TRUE );
}
ok = true;
WSetWaitCursor( einfo->win, TRUE );
if( prompt || *file_name == NULL ) {
gf.file_name = *file_name;
gf.title = AllocRCString( W_SAVESYMTITLE );
gf.filter = AllocRCString( W_SYMFILTER );
WMassageFilter( gf.filter );
name = WGetSaveFileName( einfo->win, &gf );
if( gf.title != NULL ) {
FreeRCString( gf.title );
}
if( gf.filter != NULL ) {
FreeRCString( gf.filter );
}
ok = (name != NULL);
if( ok ) {
if( *file_name != NULL ) {
WRMemFree( *file_name );
}
*file_name = name;
}
} else {
name = *file_name;
}
if( ok ) {
ok = WRWriteSymbolsToFile( table, name );
}
if( ok ) {
WRMakeHashTableClean( table );
}
WSetWaitCursor( einfo->win, FALSE );
return( ok );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:54,代码来源:wsvobj.c
示例3: CreateSpyBox
/*
* CreateSpyBox - create the spy listbox
*/
void CreateSpyBox( HWND parent )
{
#ifdef __NT__
LVCOLUMN lvc;
int i;
#endif
setCharSize( parent );
#ifdef __NT__
if( LoadCommCtrl() ) {
AllowVariableFonts();
SpyListBox = CreateWindowEx( WS_EX_CLIENTEDGE, WC_LISTVIEW, NULL,
WS_CHILD | WS_VISIBLE | LVS_REPORT | LVS_SINGLESEL,
LISTBOX_X, LISTBOX_Y, 0, 0, parent,
(HANDLE)(pointer_int)SPY_LIST_BOX, Instance, NULL );
lvc.mask = LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
for( i = 0; i < NUM_COLUMNS; i++ ) {
lvc.cx = columns[i].width;
lvc.pszText = AllocRCString( columns[i].string_id );
lvc.iSubItem = i;
SendMessage( SpyListBox, LVM_INSERTCOLUMN, i, (LPARAM)&lvc );
FreeRCString( lvc.pszText );
}
#ifdef _WIN64
} else
#else
} else if( LOBYTE( LOWORD( GetVersion() ) ) >= 4 ) {
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:31,代码来源:spybox.c
示例4: WREQuerySaveResOnDeleteRes
bool WREQuerySaveResOnDeleteRes( WREResInfo *res_info, bool fatal_exit )
{
int ret;
UINT style;
HWND frame;
char *text;
if( WRENoInterface ) {
return( TRUE );
}
if( res_info != NULL && WREIsResModified( res_info ) ) {
if( fatal_exit ) {
style = MB_YESNO | MB_APPLMODAL | MB_ICONEXCLAMATION;
} else {
style = MB_YESNOCANCEL | MB_APPLMODAL | MB_ICONEXCLAMATION;
}
WRECheckIfActiveWindow();
frame = WREGetMDIWindowHandle();
SendMessage( frame, WM_MDIRESTORE, (WPARAM)res_info->res_win, 0 );
SendMessage( frame, WM_MDIACTIVATE, (WPARAM)res_info->res_win, 0 );
text = AllocRCString( WRE_QUERYMODIFIED );
ret = MessageBox( res_info->res_win, text, WREGetQueryName( res_info ), style );
if( text != NULL ) {
FreeRCString( text );
}
if( ret == IDYES ) {
return( WRESaveResource( res_info, FALSE ) );
} else if( ret == IDCANCEL ) {
return( FALSE );
}
}
return( TRUE );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:35,代码来源:wreres.c
示例5: WQueryNukePopup
static bool WQueryNukePopup( WMenuEditInfo *einfo )
{
int ret;
UINT style;
char *title;
char *text;
style = MB_YESNO | MB_APPLMODAL | MB_ICONEXCLAMATION;
title = WCreateEditTitle( einfo );
text = AllocRCString( W_QUERYNUKEPOPUP );
ret = MessageBox( einfo->edit_dlg, text, title, style );
if( text != NULL ) {
FreeRCString( text );
}
if( title != NULL ) {
WRMemFree( title );
}
if( ret == IDYES ) {
return( TRUE );
}
return( FALSE );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:26,代码来源:wedit.c
示例6: WQueryChangeEntry
static bool WQueryChangeEntry( WMenuEditInfo *einfo )
{
int ret;
UINT style;
char *title;
char *text;
style = MB_YESNO | MB_APPLMODAL | MB_ICONEXCLAMATION;
title = WCreateEditTitle( einfo );
text = AllocRCString( W_CHANGEMODIFIEDMENUITEM );
ret = MessageBox( einfo->edit_dlg, text, title, style );
if( text != NULL ) {
FreeRCString( text );
}
if( title != NULL ) {
WRMemFree( title );
}
if( ret == IDYES ) {
return( TRUE );
}
return( FALSE );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:26,代码来源:wedit.c
示例7: WHandleMemFlags
void WHandleMemFlags( WStringEditInfo *einfo )
{
char *rtext;
char *ntext;
WResID *rname;
ntext = AllocRCString( W_STRINGNAMES );
if( einfo != NULL && einfo->current_block != NULL && ntext != NULL ) {
WSetStatusByID( einfo->wsb, W_CHANGESTRINGMEMFLAGS, -1 );
// alloc space for ntext and two 16-bit ints
rtext = (char *)WRMemAlloc( strlen( ntext ) + 20 );
if( rtext != NULL ) {
sprintf( rtext, ntext, einfo->current_block->blocknum & 0xfff0,
(einfo->current_block->blocknum & 0xfff0) + 16 - 1 );
}
rname = WResIDFromStr( rtext );
if( rname != NULL ) {
einfo->info->modified |= WChangeMemFlags( einfo->win,
&einfo->current_block->MemFlags,
rname, WGetEditInstance(),
WStrHelpRoutine );
WRMemFree( rname );
}
FreeRCString( ntext );
WSetStatusReadyText( einfo->wsb );
}
}
开发者ID:NoSuchProcess,项目名称:open-watcom-v2,代码行数:27,代码来源:wmain.c
示例8: WShowRibbon
void WShowRibbon( WMenuEditInfo *einfo, HMENU menu )
{
char *mtext;
if( einfo == NULL && menu == NULL ) {
return;
}
mtext = NULL;
if( einfo->show_ribbon ) {
mtext = AllocRCString( W_SHOWTOOLBAR );
ShowWindow( einfo->ribbon->win, SW_HIDE );
WSetStatusByID( einfo->wsb, -1, W_TOOLBARHIDDEN );
} else {
mtext = AllocRCString( W_HIDETOOLBAR );
ShowWindow( einfo->ribbon->win, SW_SHOW );
WSetStatusByID( einfo->wsb, -1, W_TOOLBARSHOWN );
}
einfo->show_ribbon = !einfo->show_ribbon;
WResizeWindows( einfo );
WMovePrevWindow( einfo );
ModifyMenu( menu, IDM_MENU_SHOWRIBBON, MF_BYCOMMAND | MF_STRING,
IDM_MENU_SHOWRIBBON, mtext );
if( mtext != NULL ) {
FreeRCString( mtext );
}
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:30,代码来源:wribbon.c
示例9: WQuerySaveSym
bool WQuerySaveSym( WAccelEditInfo *einfo, bool force_exit )
{
int ret;
UINT style;
char *title;
char *text;
if( einfo == NULL || !einfo->info->stand_alone ) {
return( TRUE );
}
if( !WRIsHashTableDirty( einfo->info->symbol_table ) ) {
return( TRUE );
}
if( force_exit ) {
style = MB_YESNO | MB_APPLMODAL | MB_ICONEXCLAMATION;
} else {
style = MB_YESNOCANCEL | MB_APPLMODAL | MB_ICONEXCLAMATION;
}
title = WCreateEditTitle( einfo );
text = AllocRCString( W_UPDATEMODIFIEDSYM );
ret = MessageBox( einfo->edit_dlg, text, title, style );
if( text != NULL ) {
FreeRCString( text );
}
if( title != NULL ) {
WRMemFree( title );
}
if( ret == IDYES ) {
if( einfo->info->symbol_file == NULL ) {
char *fname;
if( einfo->file_name == NULL ) {
fname = einfo->info->file_name;
} else {
fname = einfo->file_name;
}
einfo->info->symbol_file = WCreateSymName( fname );
}
return( WSaveSymbols( einfo, einfo->info->symbol_table,
&einfo->info->symbol_file, FALSE ) );
} else if( ret == IDCANCEL ) {
return( FALSE );
}
return( TRUE );
}
开发者ID:NoSuchProcess,项目名称:open-watcom-v2,代码行数:49,代码来源:wmain.c
示例10: WRESetPasteInfo
static void WRESetPasteInfo( HWND hDlg, WREPasteData *pdata )
{
WRETypeName *tn;
char *text;
tn = WREGetTypeNameFromRT( pdata->type );
if( tn != NULL ) {
text = AllocRCString( tn->name );
WRESetEditWithStr( GetDlgItem( hDlg, IDM_PASTE_TYPE ), text );
if( text != NULL ) {
FreeRCString( text );
}
}
WRESetEditWithWResID( GetDlgItem( hDlg, IDM_PASTE_NAME ), pdata->name );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:15,代码来源:wreclip.c
示例11: FormatMemListEntry
void FormatMemListEntry( char *buf, MemListItem *item ) {
char *prot;
char *state;
MEMORY_BASIC_INFORMATION *mbi;
mbi = &item->mbi;
switch( mbi->State ) {
case MEM_COMMIT:
state = AllocRCString( STR_COMMITTED );
break;
case MEM_FREE:
state = AllocRCString( STR_FREE );
break;
case MEM_RESERVE:
state = AllocRCString( STR_RESERVED );
break;
default:
state = AllocRCString( STR_UNKNOWN );
}
if( mbi->Protect & PAGE_READONLY ) {
prot = "RO";
} else if( mbi->Protect & PAGE_READWRITE ) {
prot = "RW";
} else if( mbi->Protect & PAGE_WRITECOPY ) {
prot = "WC";
} else if( mbi->Protect & PAGE_EXECUTE ) {
prot = "Ex";
} else if( mbi->Protect & PAGE_EXECUTE_READ ) {
prot = "ExRO";
} else if( mbi->Protect & PAGE_EXECUTE_READWRITE ) {
prot = "ExRW";
} else if( mbi->Protect & PAGE_EXECUTE_WRITECOPY ) {
prot = "ExWC";
} else if( mbi->Protect & PAGE_NOACCESS ) {
prot = "NA";
} else {
if( mbi->State == MEM_RESERVE ) {
prot = "NA";
} else {
prot = "??";
}
}
sprintf( buf, "%08lX %08lX %8lX %-4s %-10s %-9s %s", mbi->BaseAddress,
mbi->AllocationBase, mbi->RegionSize, prot, state,
item->objname, item->modname );
FreeRCString( state );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:48,代码来源:memview.c
示例12: WHandleGetKeyValue
bool WHandleGetKeyValue( WAccelEditInfo *einfo, bool ignore_first )
{
RECT r;
bool ok;
char *text;
text = NULL;
ok = (einfo != NULL);
if( ok ) {
if( einfo->current_entry == NULL ) {
ok = WInsertAccelEntry( einfo );
}
}
if( ok ) {
text = AllocRCString( W_SELECTKEY );
ok = (text != NULL);
}
if( ok ) {
WGetKeyPressProc( NULL, 0, 0, 0 );
einfo->key_info.key = 0;
GetWindowRect( GetDlgItem( einfo->edit_dlg, IDM_ACCEDLIST ), &r );
MapWindowPoints( (HWND)NULL, einfo->edit_dlg, (POINT *)&r, 2 );
einfo->key_info.text_win = CreateWindow( "static", text,
WS_CHILD | WS_VISIBLE | SS_LEFT, r.left, r.top,
r.right - r.left, r.bottom - r.top, einfo->edit_dlg, (HMENU)NULL,
WGetEditInstance(), NULL );
ok = (einfo->key_info.text_win != (HWND)NULL);
}
if( ok ) {
einfo->info->modified = true;
SetFocus( einfo->win );
SetCapture( einfo->win );
einfo->key_info.ignore_first_key = ignore_first;
einfo->getting_key = TRUE;
}
if( text != NULL ) {
FreeRCString( text );
}
return( ok );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:47,代码来源:wkey.c
示例13: logSysInfo
/*
* logSysInfo - record basic system info
*/
static void logSysInfo( bool wasfault )
{
char *str;
time_t tod;
DWORD ver;
SYSTEM_INFO sysinfo;
char name[ MAX_COMPUTERNAME_LENGTH + 1 ];
DWORD bufsize;
tod = time( NULL );
str = ctime( &tod );
if( wasfault ) {
logPrintf( STR_FAULT_FOUND_ON_X, AppName, str );
} else {
logPrintf( STR_LOG_TAKEN_ON_X, AppName, str );
}
bufsize = sizeof( name );
GetComputerName( name, &bufsize );
logPrintf( STR_COMPUTER_NAME, name );
bufsize = sizeof( name );
GetUserName( name, &bufsize );
logPrintf( STR_USER_NAME, name );
#ifndef _WIN64
ver = GetVersion();
#ifdef CHICAGO // TEMPORARY FIX UNTIL WE CAN CHECK FOR WIN 95
logPrintf( STR_OPERATING_SYSTEM, "Windows 95" );
#else
logPrintf( STR_OPERATING_SYSTEM, IsNT( ver ) ? "Windows NT":"Win32s" );
#endif
logPrintf( STR_OS_VERSION, (int)GetMajVer( ver ), (int)GetMinVer( ver ) );
#else
logPrintf( STR_OPERATING_SYSTEM, "Windows NT 64-bit" );
#endif
GetSystemInfo( &sysinfo );
str = SrchMsg( sysinfo.dwProcessorType, ProcessorNames, NULL );
if( str == NULL ) {
str = AllocRCString( STR_UNKNOWN );
logPrintf( STR_PROCESSOR_TYPE, str );
FreeRCString( str );
} else {
logPrintf( STR_PROCESSOR_TYPE, str );
}
logPrintf( STR_NUM_PROCESSORS, sysinfo.dwNumberOfProcessors );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:50,代码来源:log.c
示例14: WREQuerySaveSymOnDeleteRes
bool WREQuerySaveSymOnDeleteRes( WREResInfo *res_info, bool fatal_exit )
{
int ret;
UINT style;
char *text;
char *file;
HWND frame;
if( WRENoInterface ) {
return( TRUE );
}
if( res_info == NULL || res_info->symbol_table == NULL ) {
return( TRUE );
}
if( WRIsHashTableDirty( res_info->symbol_table ) ) {
if( fatal_exit ) {
style = MB_YESNO | MB_APPLMODAL | MB_ICONEXCLAMATION;
} else {
style = MB_YESNOCANCEL | MB_APPLMODAL | MB_ICONEXCLAMATION;
}
WRECheckIfActiveWindow();
frame = WREGetMDIWindowHandle();
SendMessage( frame, WM_MDIRESTORE, (WPARAM)res_info->res_win, 0 );
SendMessage( frame, WM_MDIACTIVATE, (WPARAM)res_info->res_win, 0 );
file = WREGetQueryName( res_info );
text = AllocRCString( WRE_SAVEMODIFIEDSYM );
ret = MessageBox( res_info->res_win, text, file, style );
if( text != NULL ) {
FreeRCString( text );
}
if( ret == IDYES ) {
if( res_info->symbol_file == NULL ) {
res_info->symbol_file = WRECreateSymName( file );
}
if( !WRESaveSymbols( res_info->symbol_table, &res_info->symbol_file, FALSE ) ) {
return( FALSE );
}
} else if( ret == IDCANCEL ) {
return( FALSE );
}
}
return( TRUE );
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:46,代码来源:wreres.c
示例15: return
char *WCreateEditTitle( WAccelEditInfo *einfo )
{
char *title;
char *fname;
char *text;
int offset;
size_t len;
title = NULL;
fname = NULL;
if( einfo == NULL ) {
return( NULL );
}
if( einfo->file_name == NULL ) {
fname = einfo->info->file_name;
} else {
fname = einfo->file_name;
}
text = AllocRCString( W_ACCELAPPTITLE );
if( fname == NULL || text == NULL ) {
return( NULL );
}
offset = WRFindFnOffset( fname );
fname = &fname[offset];
len = strlen( fname ) + strlen( text ) + 6;
title = (char *)WRMemAlloc( len );
if( title != NULL ) {
strcpy( title, text );
strcat( title, " - [" );
strcat( title, fname );
strcat( title, "]" );
}
if( text != NULL ) {
FreeRCString( text );
}
return( title );
}
开发者ID:NoSuchProcess,项目名称:open-watcom-v2,代码行数:44,代码来源:wmain.c
示例16: WQuerySaveRes
bool WQuerySaveRes( WStringEditInfo *einfo, bool force_exit )
{
int msg_ret;
bool ret;
UINT style;
char *title;
char *text;
ret = true;
if( einfo != NULL && einfo->info->modified ) {
msg_ret = IDYES;
if( einfo->info->stand_alone ) {
if( force_exit ) {
style = MB_YESNO | MB_APPLMODAL | MB_ICONEXCLAMATION;
} else {
style = MB_YESNOCANCEL | MB_APPLMODAL | MB_ICONEXCLAMATION;
}
title = WCreateEditTitle( einfo );
text = AllocRCString( W_UPDATEMODIFIEDSTRING );
msg_ret = MessageBox( einfo->edit_dlg, text, title, style );
if( text != NULL ) {
FreeRCString( text );
}
if( title != NULL ) {
WRMemFree( title );
}
}
if( msg_ret == IDYES ) {
if( einfo->info->stand_alone ) {
ret = WSaveObject( einfo, FALSE, FALSE );
} else {
SendMessage( einfo->info->parent, STRING_PLEASE_SAVEME, 0,
(LPARAM)einfo->hndl );
}
} else if( msg_ret == IDCANCEL ) {
ret = false;
}
}
return( ret );
}
开发者ID:NoSuchProcess,项目名称:open-watcom-v2,代码行数:42,代码来源:wmain.c
示例17: WREDeleteStringResources
bool WREDeleteStringResources( WRECurrentResInfo *curr, bool removing )
{
WResTypeNode *tnode;
char *text;
bool ok;
ok = true;
if( !removing ) {
text = AllocRCString( WRE_ALLSTRINGS );
ok = WREQueryDeleteName( text );
if( text != NULL ) {
FreeRCString( text );
}
}
if( ok ) {
tnode = curr->type;
if( tnode == NULL ) {
tnode = WRFindTypeNode( curr->info->info->dir, RESOURCE2INT( RT_STRING ), NULL );
}
if( tnode != NULL ) {
curr->info->modified = true;
ok = WRRemoveTypeNodeFromDir( curr->info->info->dir, tnode );
}
}
// nuke any edit sessions on these string resources
if( ok ) {
curr->type = NULL;
if( !removing ) {
WREEndResStringSessions( curr->info );
}
curr->info->current_type = 0;
ok = WREInitResourceWindow( curr->info, 0 );
}
return( ok );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:39,代码来源:wredel.c
示例18: WSetEditTitle
void WSetEditTitle( WAccelEditInfo *einfo )
{
char *title;
bool is_rc;
title = WCreateEditTitle( einfo );
is_rc = FALSE;
if( title == NULL ) {
title = AllocRCString( W_ACCELAPPTITLE );
is_rc = TRUE;
}
if( title != NULL ) {
SendMessage( einfo->win, WM_SETTEXT, 0, (LPARAM)title );
if( is_rc ) {
FreeRCString( title );
} else {
WRMemFree( title );
}
}
}
开发者ID:NoSuchProcess,项目名称:open-watcom-v2,代码行数:22,代码来源:wmain.c
示例19: updateHintText
/*
* updateHintText - updated the text shown when a menu item is selected
*/
static void updateHintText( statwnd *wnd, msg_id msgid )
{
HDC dc;
HFONT font;
char *str;
HWND hint;
HLOCAL hinfo;
HintWndInfo *info;
hint = GetHintHwnd( wnd );
dc = GetDC( hint );
font = GetMonoFont();
str = AllocRCString( msgid );
StatusWndDrawLine( wnd, dc, font, str, DT_LEFT | DT_SINGLELINE | DT_VCENTER );
ReleaseDC( hint, dc );
FreeRCString( str );
hinfo = GetProp( hint, HINT_PROP_ID );
info = LocalLock( hinfo );
info->curmsg = msgid;
LocalUnlock( hinfo );
} /* updateHintText */
开发者ID:ArmstrongJ,项目名称:open-watcom-v2,代码行数:25,代码来源:hint.c
示例20: AllocRCString
WResID *WRECreateAccTitle( void )
{
char *text;
char *title;
WResID *name;
WRENumAccTitles++;
name = NULL;
text = AllocRCString( WRE_DEFACCELNAME );
if( text != NULL ) {
title = (char *)WRMemAlloc( strlen( text ) + 20 + 1 );
if( title != NULL ) {
title[0] = '\0';
sprintf( title, text, WRENumAccTitles );
name = WResIDFromStr( title );
WRMemFree( title );
}
FreeRCString( text );
}
return( name );
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:23,代码来源:wreaccel.c
注:本文中的FreeRCString函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论