本文整理汇总了C++中TGadget::GetId方法的典型用法代码示例。如果您正苦于以下问题:C++ TGadget::GetId方法的具体用法?C++ TGadget::GetId怎么用?C++ TGadget::GetId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGadget
的用法示例。
在下文中一共展示了TGadget::GetId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
// -----------------------------------------------------------------------------
/// Removes all gadgets from destWindow.
bool
TBarDescr::RemoveGadgets(TGadgetWindow& destWindow)
{
TGadget* gadget = destWindow.FirstGadget();
if(gadget && gadget->GetId() == IDG_FLATHANDLE)
gadget = gadget->NextGadget();
while (gadget) {
TGadget* tmp = gadget;
gadget = gadget->NextGadget();
destWindow.Remove(*tmp);
}
return true;
}
示例2: PRECONDITION
void
THelpFileManager::CmWhatIsThis()
{
PRECONDITION(LastParent);
if(!LastParent)
return;
LastParent->ScreenToClient(LastHit); // TWindow
HWND hWnd = LastParent->ChildWindowFromPoint(LastHit);
HELPINFO Info;
Info.cbSize = sizeof(Info);
Info.MousePos = LastHit;
if(hWnd){
TGadgetWindow* gwin = TYPESAFE_DOWNCAST(GetWindowPtr(hWnd), TGadgetWindow);
if(gwin){
TGadget* gd = gwin->GadgetFromPoint(LastHit);
if(gd){
Info.iContextType = HELPINFO_MENUITEM;
Info.iCtrlId = gd->GetId();
EvHelp(Info);
}
return;
}
}
Info.iContextType = HELPINFO_WINDOW;
Info.dwContextId = 0;
// If the click wasn't on one of the controls, open Help for dialog.
if (hWnd == 0 || hWnd == LastParent->GetHandle()){
Info.iContextType = HELPINFO_MENUITEM;
Info.iCtrlId = IDHELP;
Info.hItemHandle = LastParent->GetHandle();
}
else{
Info.iCtrlId = ::GetDlgCtrlID(hWnd);
Info.hItemHandle = hWnd;
}
EvHelp(Info);
}