当前位置: 首页>>代码示例>>C++>>正文


C++ LPIDENT类代码示例

本文整理汇总了C++中LPIDENT的典型用法代码示例。如果您正苦于以下问题:C++ LPIDENT类的具体用法?C++ LPIDENT怎么用?C++ LPIDENT使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LPIDENT类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Filesets_Restore

void Filesets_Restore (LPIDENT lpiParent)
{
   LPSET_RESTORE_PARAMS psrp = New (SET_RESTORE_PARAMS);
   psrp->lpi = lpiParent;
   psrp->szFileset[0] = TEXT('\0');
   psrp->szFilename[0] = TEXT('\0');
   psrp->fIncremental = FALSE;

   if (lpiParent && lpiParent->fIsFileset())
      lpiParent->GetFilesetName (psrp->szFileset);

   INT_PTR rc = ModalDialogParam (IDD_SET_RESTORE, GetActiveWindow(), (DLGPROC)Filesets_Restore_DlgProc, (LPARAM)psrp);
   if (rc != IDOK)
      {
      Delete (psrp);
      }
   else if (!ASSERT( psrp->lpi != NULL ))
      {
      Delete (psrp);
      }
   else if (!ASSERT( psrp->szFileset[0] != TEXT('\0') ))
      {
      Delete (psrp);
      }
   else if (!ASSERT( psrp->szFilename[0] != TEXT('\0') ))
      {
      Delete (psrp);
      }
   else
      {
      StartTask (taskSET_RESTORE, NULL, psrp);
      }
}
开发者ID:chanke,项目名称:openafs-osd,代码行数:33,代码来源:set_restore.cpp

示例2: Alert_GetDescription

LPTSTR Alert_GetDescription (LPIDENT lpi, size_t iAlert, BOOL fFull)
{
   LPOBJECTALERTS lpoa;

   if ((lpoa = Alert_GetObjectAlerts (lpi)) == NULL)
      return NULL;

   if (!lpoa->nAlerts && lpi->fIsServer())
      {
      LPSERVER_PREF lpsp;
      if ((lpsp = (LPSERVER_PREF)lpi->GetUserParam()) != NULL)
         {
         if (!lpsp->fIsMonitored)
            {
            TCHAR szName[ cchNAME ];
            lpi->GetServerName (szName);
            return FormatString (IDS_ALERT_DESCSHORT_UNMONITORED, TEXT("%s"), szName);
            }
         }
      }

   if (iAlert >= lpoa->nAlerts)
      return NULL;

   if (lpoa->aAlerts[ iAlert ].alert == alertSECONDARY)
      {
      return Alert_GetDescriptionFunc (lpoa->aAlerts[ iAlert ].aiSECONDARY.lpiSecondary,
                                       lpoa->aAlerts[ iAlert ].aiSECONDARY.iSecondary,
                                       lpi,
                                       fFull);
      }

   return Alert_GetDescriptionFunc (lpi, iAlert, NULL, fFull);
}
开发者ID:bagdxk,项目名称:openafs,代码行数:34,代码来源:alert.cpp

示例3: Server_CloseAll

void Server_CloseAll (BOOL fUserRequested)
{
   HWND hWnd;

   while ((hWnd = PropCache_Search (pcSERVER, ANYVALUE)) != NULL)
      {
      LPIDENT lpiServer = Server_GetServer (hWnd);

      Server_SaveRect (hWnd, !fUserRequested);
      DestroyWindow (hWnd);

      if (lpiServer && fUserRequested)
         {
         // If there's a subset active, the user may want us to stop
         // monitoring this server once its window is closed.
         //
         LPSERVER_PREF lpsp;
         if ((lpsp = (LPSERVER_PREF)lpiServer->GetUserParam()) != NULL)
            {
            if (g.sub && gr.fCloseUnmonitors && lpsp->fIsMonitored)
               {
               StartTask (taskSVR_MONITOR_ONOFF, NULL, lpiServer);
               }
            }
         }
      }
}
开发者ID:chanke,项目名称:openafs-osd,代码行数:27,代码来源:svr_window.cpp

示例4: Server_SyncVLDB_OnInitDialog

void Server_SyncVLDB_OnInitDialog (HWND hDlg, LPIDENT lpi)
{
   if (lpi->fIsServer())
      {
      TCHAR szServer[ cchNAME ];
      lpi->GetServerName (szServer);

      LPTSTR pszText = FormatString (IDS_SYNCVLDB_SVR_DESC, TEXT("%s"), szServer);
      SetDlgItemText (hDlg, IDC_SYNC_DESC, pszText);
      FreeString (pszText);
      pszText = FormatString (IDS_SYNCVLDB_SVR_DESC2, TEXT("%s"), szServer);
      SetDlgItemText (hDlg, IDC_SYNC_DESC2, pszText);
      FreeString (pszText);

      ShowWindow (hDlg, SW_SHOW);
      }
   else // (lpi->fIsAggregate())
      {
      TCHAR szServer[ cchNAME ];
      lpi->GetServerName (szServer);
      TCHAR szAggregate[ cchNAME ];
      lpi->GetAggregateName (szAggregate);

      LPTSTR pszText = FormatString (IDS_SYNCVLDB_AGG_DESC, TEXT("%s%s"), szServer, szAggregate);
      SetDlgItemText (hDlg, IDC_SYNC_DESC, pszText);
      FreeString (pszText);
      pszText = FormatString (IDS_SYNCVLDB_AGG_DESC2, TEXT("%s%s"), szServer, szAggregate);
      SetDlgItemText (hDlg, IDC_SYNC_DESC2, pszText);
      FreeString (pszText);

      StartTask (taskAGG_FIND_GHOST, hDlg, lpi);
      }
}
开发者ID:bagdxk,项目名称:openafs,代码行数:33,代码来源:svr_syncvldb.cpp

示例5: Filesets_General_OnInitDialog

void Filesets_General_OnInitDialog (HWND hDlg, LPIDENT lpi)
{
   TCHAR szText[ cchRESOURCE ];
   TCHAR szSvrName[ cchNAME ];
   TCHAR szAggName[ cchNAME ];
   TCHAR szSetName[ cchNAME ];
   VOLUMEID vidFileset;
   lpi->GetServerName (szSvrName);
   lpi->GetAggregateName (szAggName);
   lpi->GetFilesetName (szSetName);
   lpi->GetFilesetID (&vidFileset);

   GetDlgItemText (hDlg, IDC_SET_NAME, szText, cchRESOURCE);
   LPTSTR pszText = FormatString (szText, TEXT("%s%s%s"), szSvrName, szAggName, szSetName);
   SetDlgItemText (hDlg, IDC_SET_NAME, pszText);
   FreeString (pszText);

   pszText = FormatString (TEXT("%1"), TEXT("%lu"), vidFileset);
   SetDlgItemText (hDlg, IDC_SET_ID, pszText);
   FreeString (pszText);

   EnableWindow (GetDlgItem (hDlg, IDC_SET_LOCK), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_UNLOCK), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_QUOTA), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_WARN), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_WARN_SETFULL_DEF), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_WARN_SETFULL), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_WARN_SETFULL_PERCENT), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_WARN_SETFULL_DESC), FALSE);
}
开发者ID:bagdxk,项目名称:openafs,代码行数:30,代码来源:set_prop.cpp

示例6: Aggregates_ShowPopupMenu

void Aggregates_ShowPopupMenu (HWND hList, POINT ptList, POINT ptScreen)
{
   if (!ptScreen.x && !ptScreen.y)
      {
      RECT rWindow;
      GetWindowRect (hList, &rWindow);
      ptScreen.x = rWindow.left + (rWindow.right -rWindow.left)/2;
      ptScreen.y = rWindow.top + (rWindow.bottom -rWindow.top)/2;
      Aggregates_ShowParticularPopupMenu (hList, ptScreen, NULL);
      }
   else if (FL_HitTestForHeaderBar (hList, ptList))
      {
      HMENU hm = TaLocale_LoadMenu (MENU_COLUMNS);
      DisplayContextMenu (hm, ptScreen, hList);
      }
   else
      {
      LPIDENT lpiSelected = NULL;

      HLISTITEM hItem;
      if ((hItem = FastList_ItemFromPoint (hList, &ptList, TRUE)) != NULL)
         lpiSelected = (LPIDENT)FastList_GetItemParam (hList, hItem);

      if (lpiSelected && (lpiSelected != (LPIDENT)FL_GetSelectedData (hList)))
         lpiSelected = NULL;

      if (lpiSelected && lpiSelected->fIsServer())
         Server_ShowParticularPopupMenu (hList, ptScreen, lpiSelected);
      else
         Aggregates_ShowParticularPopupMenu (hList, ptScreen, lpiSelected);
      }
}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:32,代码来源:agg_tab.cpp

示例7: AfsAdmSvr_AutoOpen_ThreadProc

DWORD WINAPI AfsAdmSvr_AutoOpen_ThreadProc (PVOID lp)
{
   DWORD dwScope = PtrToUlong(lp);
   ULONG status;

   if (!l.fOperational)
      return 0;

   // First we'll have to find out which cell to open
   //
   TCHAR szCell[ cchNAME ];
   if (!CELL::GetDefaultCell (szCell, &status))
      {
      Print (dlERROR, TEXT("CELL::GetDefaultCell failed; error 0x%08lX"), status);
      }
   else
      {
      // Then try to actually open the cell
      //
      Print (dlSTANDARD, TEXT("Auto-opening cell %s; scope=%s"), szCell, (dwScope == (AFSADMSVR_SCOPE_VOLUMES | AFSADMSVR_SCOPE_USERS)) ? TEXT("full") : (dwScope == AFSADMSVR_SCOPE_VOLUMES) ? TEXT("volumes") : TEXT("users"));

      LPIDENT lpiCell;
      if ((lpiCell = CELL::OpenCell ((LPTSTR)szCell, &status)) == NULL)
         {
         Print (dlERROR, TEXT("Auto-open of cell %s failed; error 0x%08lX"), szCell, status);
         }
      else
         {
         LPCELL lpCell;
         if ((lpCell = lpiCell->OpenCell (&status)) == NULL)
            {
            Print (dlERROR, TEXT("Auto-open: OpenCell failed; error 0x%08lX"), status);
            }
         else
            {
            AfsAdmSvr_AddToMinScope (dwScope);
            if (!lpCell->RefreshAll (&status))
               Print (dlERROR, TEXT("Auto-open: RefreshCell failed; error 0x%08lX"), status);
            else
               Print (dlSTANDARD, TEXT("Auto-open of cell %s successful"), szCell);
            lpCell->Close();

            // We intentionally do not call CELL::CloseCell() here--as would
            // ordinarily be necessary to balance our CELL::OpenCell() call
            // above--because we never want to close our cache for this cell.
            // The point of calling AutoOpen() up front is to keep an admin
            // server alive and ready for use on a particular cell--calling
            // CELL::CloseCell() here negates that purpose.

            }
         }
      }

   return 0;
}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:55,代码来源:TaAfsAdmSvrGeneral.cpp

示例8: Filesets_BeginDrag

BOOL Filesets_BeginDrag (HWND hDlg, BOOL fRightBtn)
{
   LPIDENT lpi = Filesets_GetFocused (hDlg);

   if (!lpi || !lpi->fIsFileset())  // can only drag filesets!
      return FALSE;

   l.fRightBtn = fRightBtn;
   StartTask (taskSET_BEGINDRAG, hDlg, lpi);
   return TRUE;
}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:11,代码来源:set_tab.cpp

示例9: Server_Scout_OnEndTask_Apply

void Server_Scout_OnEndTask_Apply (HWND hDlg, LPTASKPACKET ptp)
{
   if (!ptp->rc)
      {
      LPIDENT lpiServer = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);

      TCHAR szText[ cchNAME ];
      lpiServer->GetServerName (szText);
      ErrorDialog (ptp->status, IDS_ERROR_CHANGE_SERVER_STATUS, TEXT("%s"), szText);
      }
}
开发者ID:chanke,项目名称:openafs-osd,代码行数:11,代码来源:svr_prop.cpp

示例10: Alert_BeginUpdate

void Alert_BeginUpdate (LPIDENT lpi, LPSERVER *ppServer)
{
   if (lpi->fIsServer())
      {
      *ppServer = NULL;
      }
   else
      {
      *ppServer = lpi->OpenServer();
      }
}
开发者ID:bagdxk,项目名称:openafs,代码行数:11,代码来源:alert.cpp

示例11: Aggregates_General_OnEndTask_Apply

void Aggregates_General_OnEndTask_Apply (HWND hDlg, LPTASKPACKET ptp)
{
   if (!ptp->rc)
      {
      LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);

      TCHAR szSvrName[ cchNAME ];
      TCHAR szAggName[ cchNAME ];
      lpi->GetServerName (szSvrName);
      lpi->GetAggregateName (szAggName);
      ErrorDialog (ptp->status, IDS_ERROR_CHANGE_AGGREGATE_STATUS, TEXT("%s%s"), szSvrName, szAggName);
      }
}
开发者ID:bagdxk,项目名称:openafs,代码行数:13,代码来源:agg_prop.cpp

示例12: Server_Salvage_OnServer

void Server_Salvage_OnServer (HWND hDlg, LPIDENT lpi)
{
   LPIDENT lpiServer;
   if ((lpiServer = (LPIDENT)CB_GetSelectedData (GetDlgItem (hDlg, IDC_SERVER))) != NULL)
      {
      LPAGG_ENUM_TO_COMBOBOX_PACKET lpp = New (AGG_ENUM_TO_COMBOBOX_PACKET);
      memset (lpp, 0x00, sizeof(AGG_ENUM_TO_COMBOBOX_PACKET));
      lpp->hCombo = GetDlgItem (hDlg, IDC_AGGREGATE);
      lpp->lpiServer = lpiServer;
      lpp->lpiSelect = (lpi && (!lpi->fIsCell()) && (!lpi->fIsServer()) && (lpiServer == lpi->GetServer())) ? (lpi->GetAggregate()) : NULL;
      StartTask (taskAGG_ENUM_TO_COMBOBOX, hDlg, lpp);
      }
}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:13,代码来源:svr_salvage.cpp

示例13: Filesets_ContinueDrag

void Filesets_ContinueDrag (HWND hDlg)
{
   if (l.fDragging)
      {
      LPIDENT lpi = NULL;
      HLISTITEM hItemTarget;

      DWORD dw = GetMessagePos();
      POINT pt = { LOWORD(dw), HIWORD(dw) };
      HWND hTarget = WindowFromPoint (pt);

      if (hTarget != NULL)
         {
         POINT ptClient = pt;
         ScreenToClient (hTarget, &ptClient);

         if ((lpi = IdentifyPoint (hTarget, ptClient, &hItemTarget)) != NULL)
            {
            if (!lpi->fIsServer() && !lpi->fIsAggregate())
               lpi = NULL;
            }
         }

      if (lpi != l.lpiTarget)
         {
         ImageList_DragLeave (NULL);

         if (l.hItemTarget)
            {
            LPARAM dwFlags = FastList_GetItemFlags (l.hwndTarget, l.hItemTarget);
            FastList_SetItemFlags (l.hwndTarget, l.hItemTarget, dwFlags & (~FLIF_DROPHIGHLIGHT));
            l.hItemTarget = NULL;
            l.lpiTarget = NULL;
            }

         if ((l.lpiTarget = lpi) != NULL)
            {
            l.hwndTarget = hTarget;
            l.hItemTarget = hItemTarget;
            LPARAM dwFlags = FastList_GetItemFlags (l.hwndTarget, l.hItemTarget);
            FastList_SetItemFlags (l.hwndTarget, l.hItemTarget, dwFlags | FLIF_DROPHIGHLIGHT);
            }

         ScreenToClient (NULL, &pt);
         ImageList_DragEnter (NULL, pt.x, pt.y);
         }

      ImageList_DragMove (LOWORD(dw), HIWORD(dw));
      }
}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:50,代码来源:set_tab.cpp

示例14: Services_Delete_OnInitDialog

void Services_Delete_OnInitDialog (HWND hDlg, LPIDENT lpi)
{
   TCHAR szServer[ cchNAME ];
   TCHAR szService[ cchNAME ];
   lpi->GetServerName (szServer);
   lpi->GetServiceName (szService);

   TCHAR szOld[ cchRESOURCE ];
   GetDlgItemText (hDlg, IDC_DELSVC_DESC, szOld, cchRESOURCE);

   LPTSTR pszNew = FormatString (szOld, TEXT("%s%s"), szServer, szService);
   SetDlgItemText (hDlg, IDC_DELSVC_DESC, pszNew);
   FreeString (pszNew);
}
开发者ID:bagdxk,项目名称:openafs,代码行数:14,代码来源:svc_delete.cpp

示例15: Aggregates_ShowProperties

void Aggregates_ShowProperties (LPIDENT lpiAggregate, size_t nAlerts, BOOL fJumpToThreshold, HWND hParentModal)
{
   HWND hCurrent;

   if ((hCurrent = PropCache_Search (pcAGG_PROP, lpiAggregate)) != NULL)
      {
      SetFocus (hCurrent);

      if (fJumpToThreshold)
         {
         HWND hTab;
         if ((hTab = GetDlgItem (hCurrent, IDC_PROPSHEET_TABCTRL)) != NULL)
            {
            int nTabs = TabCtrl_GetItemCount (hTab);
            TabCtrl_SetCurSel (hTab, nTabs-1);

            NMHDR nm;
            nm.hwndFrom = hTab;
            nm.idFrom = IDC_PROPSHEET_TABCTRL;
            nm.code = TCN_SELCHANGE;
            SendMessage (hCurrent, WM_NOTIFY, 0, (LPARAM)&nm);
            }
         }
      }
   else
      {
      TCHAR szSvrName[ cchNAME ];
      TCHAR szAggName[ cchNAME ];
      lpiAggregate->GetServerName (szSvrName);
      lpiAggregate->GetAggregateName (szAggName);
      LPTSTR pszTitle = FormatString (IDS_AGG_PROP_TITLE, TEXT("%s%s"), szSvrName, szAggName);

      LPPROPSHEET psh = PropSheet_Create (pszTitle, FALSE);
      psh->fMadeCaption = TRUE;
      psh->sh.hwndParent = hParentModal;

      if (PropSheet_AddProblemsTab (psh, IDD_AGG_PROBLEMS, lpiAggregate, nAlerts) &&
          PropSheet_AddTab (psh, IDS_AGG_GENERAL_TAB, IDD_AGG_GENERAL, (DLGPROC)Aggregates_General_DlgProc, (LPARAM)lpiAggregate, TRUE, FALSE))
         {
         if (fJumpToThreshold)
            psh->sh.nStartPage = psh->sh.nPages-1;

         if (hParentModal)
            PropSheet_ShowModal (psh, PumpMessage);
         else
            PropSheet_ShowModeless (psh);
         }
      }
}
开发者ID:bagdxk,项目名称:openafs,代码行数:49,代码来源:agg_prop.cpp


注:本文中的LPIDENT类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。