本文整理汇总了C++中Hide函数的典型用法代码示例。如果您正苦于以下问题:C++ Hide函数的具体用法?C++ Hide怎么用?C++ Hide使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Hide函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EmAddInit
// Initialize
void EmAddInit(HWND hWnd, EM_ADD *p)
{
// Validate arguments
if (hWnd == NULL || p == NULL)
{
return;
}
// Initialize controls
CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_0"), 0);
CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_1"), 1);
CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_2"), 2);
CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_3"), 3);
CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_4"), 4);
CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_5"), 5);
if (p->NewMode)
{
// Newly creation mode
RPC_ENUM_DEVICE t;
HUB_LOG g;
Zero(&g, sizeof(g));
g.PacketLogSwitchType = LOG_SWITCH_DAY;
g.PacketLogConfig[PACKET_LOG_TCP_CONN] = g.PacketLogConfig[PACKET_LOG_DHCP] = 1;
EmHubLogToDlg(hWnd, &g);
Zero(&t, sizeof(t));
if (CALL(hWnd, EcEnumAllDevice(p->Rpc, &t)))
{
UINT i;
CbSetHeight(hWnd, C_DEVICE, 18);
for (i = 0;i < t.NumItem;i++)
{
RPC_ENUM_DEVICE_ITEM *dev = &t.Items[i];
wchar_t tmp[MAX_SIZE];
StrToUni(tmp, sizeof(tmp), dev->DeviceName);
CbAddStr(hWnd, C_DEVICE, tmp, 0);
}
FreeRpcEnumDevice(&t);
}
SetText(hWnd, 0, _UU("EM_ADD_NEW"));
}
else
{
// Edit mode (to obtain a configuration)
wchar_t tmp[MAX_PATH];
RPC_ADD_DEVICE t;
Hide(hWnd, R_PROMISCUS);
Zero(&t, sizeof(t));
StrCpy(t.DeviceName, sizeof(t.DeviceName), p->DeviceName);
if (CALL(hWnd, EcGetDevice(p->Rpc, &t)))
{
EmHubLogToDlg(hWnd, &t.LogSetting);
}
else
{
Close(hWnd);
}
StrToUni(tmp, sizeof(tmp), p->DeviceName);
CbAddStr(hWnd, C_DEVICE, tmp, 0);
Disable(hWnd, C_DEVICE);
SetText(hWnd, 0, _UU("EM_ADD_EDIT"));
}
EmAddUpdate(hWnd, p);
}
示例2: switch
// --------------------------------------------------------------------------
void CToolTipWnd::RelayEvent( LPMSG lpMsg )
{
switch( lpMsg->message )
{
case WM_KEYDOWN:
Hide();
break;
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_NCLBUTTONDOWN:
case WM_NCRBUTTONDOWN:
Hide();
break;
case WM_MOUSEMOVE:
case WM_NCMOUSEMOVE:
{
// This is a fix to allow for messages to be made visible when not
// using the mouse.
if ( m_bSkipNextMove )
{
// TRACE0("Move skipped\n");
m_bSkipNextMove = false;
return;
}
else
{
// TRACE0("Move\n");
}
HWND wndPt = lpMsg->hwnd;
CPoint pt;
pt.x = lpMsg->pt.x;
pt.y = lpMsg->pt.y;
// Don't show the tooltips if the application does not have the input focus
CWnd *pFocusWnd = AfxGetApp()->m_pMainWnd->GetFocus();
if ( pFocusWnd == NULL )
break;
// There are 3 possible states regarding tooltip controls:
// a) moving outside any ctrl
// b) going from outside a ctrl to inside
// c) moving inside the control
// d) going from inside a ctrl to outside
BTOOLINFO *stToolInfo = NULL;
BOOL found = m_toolPtr.Lookup( wndPt, (void *&)stToolInfo );
if ( m_pCurrwnd == NULL ) // was not in a control
{
if ( found ) // enters a control (now in a control)
{
// TRACE0("OUT -> IN\n");
m_clrTextColor = stToolInfo->clrToolTextClr;
m_strText = stToolInfo->strToolText;
Show( pt.x, pt.y, stToolInfo->iTimerDelay, stToolInfo->iTimerDelayShow );
m_pCurrwnd = wndPt;
}
else // still not in a control
{
// TRACE0("OUT -> OUT\n");
}
}
else // was in a control
{
ASSERT( m_pCurrwnd != NULL );
CRect rect;
::GetWindowRect( m_pCurrwnd, &rect );
if ( rect.PtInRect( lpMsg->pt ) ) // still in the same control
{
// TRACE0("IN -> IN (same)\n");
if ( m_bStuck )
if ( IsWindowVisible() )
{
// may be over a tooltip, so look for previous control
if ( ! found )
found = m_toolPtr.Lookup( m_pCurrwnd, (void *&)stToolInfo );
ASSERT( found );
Show( pt.x, pt.y, stToolInfo->iTimerDelay, stToolInfo->iTimerDelayShow );
}
}
else // gone outside the control
{
Hide();
m_pCurrwnd = NULL;
if ( found ) // to another control
{
// TRACE0("IN -> IN (other)\n");
m_clrTextColor = stToolInfo->clrToolTextClr;
m_strText = stToolInfo->strToolText;
Show( pt.x, pt.y, stToolInfo->iTimerDelay, stToolInfo->iTimerDelayShow );
m_pCurrwnd = wndPt;
}
else
{
// TRACE0("IN -> OUT\n");
//.........这里部分代码省略.........
示例3: wxASSERT_MSG
//.........这里部分代码省略.........
if ( estimated > m_display_estimated
&& m_ctdelay >= 0
)
{
++m_ctdelay;
}
else if ( estimated < m_display_estimated
&& m_ctdelay <= 0
)
{
--m_ctdelay;
}
else
{
m_ctdelay = 0;
}
if ( m_ctdelay >= m_delay // enough confirmations for a higher value
|| m_ctdelay <= (m_delay*-1) // enough confirmations for a lower value
|| value == m_maximum // to stay consistent
|| elapsed > m_display_estimated // to stay consistent
|| ( elapsed > 0 && elapsed < 4 ) // additional updates in the beginning
)
{
m_display_estimated = estimated;
m_ctdelay = 0;
}
}
long display_remaining = m_display_estimated - elapsed;
if ( display_remaining < 0 )
{
display_remaining = 0;
}
SetTimeLabel(elapsed, m_elapsed);
SetTimeLabel(m_display_estimated, m_estimated);
SetTimeLabel(display_remaining, m_remaining);
}
if ( value == m_maximum )
{
if ( m_state == Finished )
{
// ignore multiple calls to Update(m_maximum): it may sometimes be
// troublesome to ensure that Update() is not called twice with the
// same value (e.g. because of the rounding errors) and if we don't
// return now we're going to generate asserts below
return true;
}
// so that we return true below and that out [Cancel] handler knew what
// to do
m_state = Finished;
if( !HasFlag(wxPD_AUTO_HIDE) )
{
EnableClose();
DisableSkip();
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
EnableCloseButton();
#endif // __WXMSW__
if ( newmsg.empty() )
{
// also provide the finishing message if the application didn't
m_msg->SetLabel(_("Done."));
}
wxCHECK_MSG(wxEventLoopBase::GetActive(), false,
"wxProgressDialog::Update needs a running event loop");
// allow the window to repaint:
// NOTE: since we yield only for UI events with this call, there
// should be no side-effects
wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI);
// NOTE: this call results in a new event loop being created
// and to a call to ProcessPendingEvents() (which may generate
// unwanted re-entrancies).
(void)ShowModal();
}
else // auto hide
{
// reenable other windows before hiding this one because otherwise
// Windows wouldn't give the focus back to the window which had
// been previously focused because it would still be disabled
ReenableOtherWindows();
Hide();
}
}
else // not at maximum yet
{
return DoAfterUpdate(skip);
}
// update the display in case yielding above didn't do it
Update();
return m_state != Canceled;
}
示例4: new_event
void CompaniesFrame::OnTryClose(wxCloseEvent& event) {
event.Veto();
wxCloseEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED);
button_cancel_->ProcessWindowEvent(new_event);
Hide();
}
示例5: Hide
void NMNotificationWindow::update()
{
Hide();
}
示例6: AI_Control
void AI_Control( WorldStuff *world_stuff, int vehicle_number )
{
Player *player;
team_type team, enemy_team;
short frames_till_traitor_deactivate;
short frames_till_unscramble;
short scramble_life;
short traitor_life;
/* Alias pointer to this player */
player = world_stuff->player_array;
frames_till_traitor_deactivate = player[vehicle_number].tank.frames_till_traitor_deactivate;
frames_till_unscramble = player[vehicle_number].tank.frames_till_unscramble;
scramble_life = player[vehicle_number].tank.scramble_life;
traitor_life = player[vehicle_number].tank.traitor_life;
if( player[vehicle_number].tank.team == RED_TEAM )
{
team = RED_TEAM;
enemy_team = BLUE_TEAM;
}
else
{
team = BLUE_TEAM;
enemy_team = RED_TEAM;
}
if( player[vehicle_number].character.skill_level > 2 && player[vehicle_number].controller != USER_CONTROL )
{
if( player[vehicle_number].tank.traitor_active )
if( frames_till_traitor_deactivate < (traitor_life - 40) )
player[vehicle_number].tank.traitor_active = FALSE;
/*
if( player[vehicle_number].tank.controls_scrambled )
if( frames_till_unscramble < (scramble_life - 40) )
player[vehicle_number].tank.controls_scrambled = FALSE;
*/
}
if( player[vehicle_number].tank.traitor_active )
{
player[vehicle_number].tank.team = enemy_team;
player[vehicle_number].team = enemy_team;
}
/* Clear this players input table */
Clear_Input_Table( player[vehicle_number].table );
/* Fill up this players events data structure */
Update_Player_Events( world_stuff, vehicle_number );
/* Figure out what state we are in now */
world_stuff->player_array[vehicle_number].character.state = Find_State( world_stuff, vehicle_number );
if( player[vehicle_number].tank.traitor_active )
{
world_stuff->player_array[vehicle_number].character.state = ATTACK;
}
/* Based on the state of the ai call appropriate control function */
switch( world_stuff->player_array[vehicle_number].character.state )
{
case ATTACK:
Attack( world_stuff, vehicle_number );
break;
case GET_ENERGY:
Get_Energy( world_stuff, vehicle_number );
break;
case PANIC:
Panic( world_stuff, vehicle_number );
break;
case BEZERK:
Bezerk( world_stuff, vehicle_number );
break;
case HIDE:
Hide( world_stuff, vehicle_number );
break;
case GROUPUP:
Group( world_stuff, vehicle_number );
break;
case GET_PYLONS:
Get_Pylons( world_stuff, vehicle_number );
break;
case PROTECT:
Protect( world_stuff, vehicle_number );
break;
case KILL_RADAR_BASE:
Kill_Radar_Base( world_stuff, vehicle_number );
break;
case PROTECT_RADAR_BASE:
//.........这里部分代码省略.........
示例7: Hide
void XrcDlg::OnSimpleButton(wxCommandEvent &inEvent) {
Hide();
EndModal(inEvent.GetId());
}
示例8: Hide
//---------------------------------------------------------------------------
void __fastcall TWebF::BrowserNavigateComplete2(TObject *Sender,
LPDISPATCH pDisp, Variant *URL)
{
Hide();
}
示例9: switch
void ServerWindow::DispatchMessage(int32 code)
{
switch(code)
{
/********** BWindow Messages ***********/
case AS_QUIT_WINDOW:
{
if (created){
window->Destroy(window);
window = NULL;
created = false;
}
break;
}
case AS_SEND_BEHIND:
{
// TODO
// DFBResult err = x;
fSession->WriteInt32 (AS_SEND_BEHIND);
fSession->WriteInt32 (SERVER_TRUE);
fSession->Sync();
break;
}
case AS_ACTIVATE_WINDOW:
{
bool act;
fSession->ReadBool (&act);
active = act;
break;
}
case AS_SHOW_WINDOW:
{
Show();
break;
}
case AS_HIDE_WINDOW:
{
Hide();
break;
}
case AS_WINDOW_TITLE:
{
char *title = fSession->ReadString();
fTitle = BString(title);
if (created)
UpdateTitle (title);
break;
}
case AS_SET_LOOK:
{
fSession->ReadInt32 (&fType);
if (!created)
break;
char title[fTitle.CountChars()+1];
fTitle.CopyInto(title, 0, fTitle.CountChars());
fSession->WriteInt32 (AS_SEND_BEHIND);
if (UpdateTitle (title)==B_ERROR)
fSession->WriteInt32 (SERVER_FALSE);
else
fSession->WriteInt32 (SERVER_TRUE);
fSession->Sync();
break;
}
case B_MINIMIZE:
{
Hide();
break;
}
case B_WINDOW_MOVE_TO:
{
// TODO: Implement
break;
}
/* Graphic Messages */
case AS_SET_HIGH_COLOR:
{
break;
}
case AS_SET_LOW_COLOR:
{
break;
}
case AS_SET_VIEW_COLOR:
{
break;
}
case AS_STROKE_ARC:
{
break;
}
case AS_STROKE_BEZIER:
{
break;
}
case AS_STROKE_ELLIPSE:
{
break;
}
case AS_STROKE_LINE:
//.........这里部分代码省略.........
示例10: Hide
void InternetRetrievalDialog::OnClose( wxCommandEvent& event )
{
Hide();
}
示例11: VALIDATE_FINDWHAT
void FindReplaceDialog::OnClick(wxCommandEvent& event)
{
wxObject* btnClicked = event.GetEventObject();
size_t flags = m_data.GetFlags();
m_data.SetFindString(m_findString->GetValue());
m_data.SetReplaceString(m_replaceString->GetValue());
// disable the 'Find/Replace' buttons when the 'Selection only' is enabled
if(m_selectionOnly->IsChecked()) {
m_find->Enable(false);
m_replace->Enable(false);
} else {
m_find->Enable(true);
m_replace->Enable(true);
}
if(btnClicked == m_find) {
VALIDATE_FINDWHAT();
SendEvent(wxEVT_FRD_FIND_NEXT);
} else if(btnClicked == m_replace) {
VALIDATE_FINDWHAT();
SendEvent(wxEVT_FRD_REPLACE);
} else if(btnClicked == m_replaceAll) {
VALIDATE_FINDWHAT();
SendEvent(wxEVT_FRD_REPLACEALL);
} else if(btnClicked == m_markAll) {
VALIDATE_FINDWHAT();
SendEvent(wxEVT_FRD_BOOKMARKALL);
} else if(btnClicked == m_clearBookmarks) {
SendEvent(wxEVT_FRD_CLEARBOOKMARKS);
} else if(btnClicked == m_cancel) {
// Fire a close event
SendEvent(wxEVT_FRD_CLOSE);
// Hide the dialog
Hide();
// Make sure the Search in Selected Text flag is clear, otherwise we can't Find Next
flags &= ~(wxFRD_SELECTIONONLY);
} else if(btnClicked == m_matchCase) {
if(m_matchCase->IsChecked()) {
flags |= wxFRD_MATCHCASE;
} else {
flags &= ~(wxFRD_MATCHCASE);
}
} else if(btnClicked == m_matchWholeWord) {
if(m_matchWholeWord->IsChecked()) {
flags |= wxFRD_MATCHWHOLEWORD;
} else {
flags &= ~(wxFRD_MATCHWHOLEWORD);
}
} else if(btnClicked == m_regualrExpression) {
if(m_regualrExpression->IsChecked()) {
flags |= wxFRD_REGULAREXPRESSION;
} else {
flags &= ~(wxFRD_REGULAREXPRESSION);
}
} else if(btnClicked == m_searchUp) {
if(m_searchUp->IsChecked()) {
flags |= wxFRD_SEARCHUP;
} else {
flags &= ~(wxFRD_SEARCHUP);
}
} else if(btnClicked == m_selectionOnly) {
if(m_selectionOnly->IsChecked()) {
flags |= wxFRD_SELECTIONONLY;
} else {
flags &= ~(wxFRD_SELECTIONONLY);
}
}
// Set the updated flags, unless it was ReplaceAll which does this itself
if(btnClicked != m_replaceAll) { m_data.SetFlags(flags); }
// update the data of the find/replace dialog, in particular,
// update the history of the Find What / replace with controls
#if defined(__WXGTK__) && wxVERSION_NUMBER >= 2900
// But if it's a findNext or a Replace, do it by posting an event,
// otherwise strange duplications happen (because scintilla steals the primary selection?)
wxCommandEvent e(wxEVT_FRD_FIND_NEXT); // Arbitrary choice of event-type
wxPostEvent(this, e);
#else
SetFindReplaceData(m_data, false);
#endif
}
示例12: Hide
void __fastcall Tikf_hqq::Image1Click(TObject *Sender)
{
Hide();
ikf_hqq->BringToFront();
}
示例13: BWindow
DownloadWindow::DownloadWindow(BRect frame, bool visible,
SettingsMessage* settings)
: BWindow(frame, B_TRANSLATE("Downloads"),
B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
B_AUTO_UPDATE_SIZE_LIMITS | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE),
fMinimizeOnClose(false)
{
SetPulseRate(1000000);
settings->AddListener(BMessenger(this));
BPath downloadPath;
if (find_directory(B_DESKTOP_DIRECTORY, &downloadPath) != B_OK)
downloadPath.SetTo("/boot/home/Desktop");
fDownloadPath = settings->GetValue(kSettingsKeyDownloadPath,
downloadPath.Path());
settings->SetValue(kSettingsKeyDownloadPath, fDownloadPath);
SetLayout(new BGroupLayout(B_VERTICAL, 0.0));
DownloadsContainerView* downloadsGroupView = new DownloadsContainerView();
fDownloadViewsLayout = downloadsGroupView->GroupLayout();
BMenuBar* menuBar = new BMenuBar("Menu bar");
BMenu* menu = new BMenu(B_TRANSLATE("Downloads"));
menu->AddItem(new BMenuItem(B_TRANSLATE("Open downloads folder"),
new BMessage(OPEN_DOWNLOADS_FOLDER)));
BMessage* newWindowMessage = new BMessage(NEW_WINDOW);
newWindowMessage->AddString("url", "");
BMenuItem* newWindowItem = new BMenuItem(B_TRANSLATE("New browser window"),
newWindowMessage, 'N');
menu->AddItem(newWindowItem);
newWindowItem->SetTarget(be_app);
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(B_TRANSLATE("Hide"),
new BMessage(B_QUIT_REQUESTED), 'D'));
menuBar->AddItem(menu);
fDownloadsScrollView = new DownloadContainerScrollView(downloadsGroupView);
fRemoveFinishedButton = new BButton(B_TRANSLATE("Remove finished"),
new BMessage(REMOVE_FINISHED_DOWNLOADS));
fRemoveFinishedButton->SetEnabled(false);
fRemoveMissingButton = new BButton(B_TRANSLATE("Remove missing"),
new BMessage(REMOVE_MISSING_DOWNLOADS));
fRemoveMissingButton->SetEnabled(false);
const float spacing = be_control_look->DefaultItemSpacing();
AddChild(BGroupLayoutBuilder(B_VERTICAL, 0.0)
.Add(menuBar)
.Add(fDownloadsScrollView)
.Add(new BSeparatorView(B_HORIZONTAL, B_PLAIN_BORDER))
.Add(BGroupLayoutBuilder(B_HORIZONTAL, spacing)
.AddGlue()
.Add(fRemoveMissingButton)
.Add(fRemoveFinishedButton)
.SetInsets(12, 5, 12, 5)
)
);
PostMessage(INIT);
if (!visible)
Hide();
Show();
}
示例14: Hide
void AboutWindow::OnDestroy (HWND hWnd)
{
Hide ();
}
示例15: Hide
/*
================
idObjectiveComplete::Spawn
================
*/
void idObjectiveComplete::Spawn( void ) {
spawnArgs.SetBool( "objEnabled", false );
Hide();
}