本文整理汇总了C++中Message::AddBool方法的典型用法代码示例。如果您正苦于以下问题:C++ Message::AddBool方法的具体用法?C++ Message::AddBool怎么用?C++ Message::AddBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Message
的用法示例。
在下文中一共展示了Message::AddBool方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveSettings
/*************************************************
* Description: Saves the settings
* Author: Rick Caudill
* Date: Thu Mar 18 20:17:32 2004
**************************************************/
void WallpaperChangerSettings::SaveSettings()
{
ListViewStringRow* pcRow = (ListViewStringRow*)pcDirectoryList->GetRow(pcDirectoryList->GetLastSelected());
Message* pcMessage = new Message(M_PREFS_SEND_TO_PARENT);
bRandom = pcRandom->GetValue().AsBool();
pcMessage->AddBool("random",bRandom);
pcMessage->AddInt32("time",pcTimeDrop->GetSelection());
pcMessage->AddString("currentimage",pcRow->GetString(0));
pcParentLooper->PostMessage(pcMessage,pcParentView);
}
示例2: Register
int Window::Register()
{
Message *msg = new Message(REGISTER);
msg->AddString( "_type", "window" );
msg->AddInt( "_port", Port() );
msg->AddString( "_title", m_title );
msg->AddRect( "_rect", Frame() );
msg->AddBool( "_visible", false );
msg->AddInt( "_flags", m_flags );
Message *reply = Messenger::SendReceiveMessage( "gui_server", 0, msg );
if ( reply == NULL )
{
delete msg;
return -1;
}
delete msg;
if ( reply->rc() != 0 )
{
delete reply;
return -1;
}
// Good reply.. let's get the information.
int bad = 0;
if ( reply->FindInt( "_id", &m_wid ) != 0 ) bad = -1;
if ( reply->FindInt( "_sid", &m_sid ) != 0 ) bad = -1;
if ( reply->FindInt( "_did", &m_did ) != 0 ) bad = -1;
if ( reply->FindRect( "_rect", &m_frame ) != 0 ) bad = -1;
delete reply;
// Accept the GUI memory and everything.
int tmp_pages;
unsigned int tmp_flags;
if ( smk_request_shmem( m_sid, (void**)&m_buffer, &tmp_pages, &tmp_flags ) != 0 )
bad = -1;
// We now have our GUI buffer, size and ID.
if ( bad != 0 ) return -1;
// Registered with desktop port = m_did
return 0;
}