EssGBeginZoomOut

ズームアウトを開始します。

構文

            ESSG_FUNC_M 
            EssGBeginZoomOut
             (
            hGrid, usCells, pZoomCells, ulOptions
            );
         
パラメータデータ型説明

hGrid

ESSG_HGRID_T

EssGNewGridから戻されるハンドル。

usCells

ESSG_USHORT_T

pZoomCellsのセル範囲の数のカウント(配列のサイズ)。

pZoomCells

ESSG_RANGE_T

ズーム・アウトするセルを指定します。これはセル範囲の1次元配列です。

ulOptions

ESSG_ULONG_T

今後使用するために予約されています。ゼロに設定する必要があります。

戻り値

正常終了の場合は、ESSG_STS_NOERRが戻されます。

アクセス

なし。

         ESSG_VOID_T ESSG_BeginZoomOut (ESSG_HGRID_T hGrid)

{
  ESSG_FUNC_M     sts = ESS_STS_NOERR;
  ESSG_PPDATA_T         ppDataIn;
  ESSG_PPDATA_T         ppDataOut;
  ESSG_RANGE_T           rDataRangeIn, rDataRangeOut;
  ESSG_ULONG_T          ulOptions;
  ESSG_USHORT_T         usCells;
  ESSG_RANGE_T          pZoomCells;
  ESSG_USHORT_T         usState;

  /* connect the grid to a database on the server */
  sts = EssGConnect(hGrid, "Rainbow", "Admin",
        "Password", "Demo", "Basic",
        ESSG_CONNECT_DEFAULT);

  if(sts == 0)
  {
     ppDataIn = BuildTable(&rDataRangeIn);

     pZoomCells.ulRowStart = 1;
     pZoomCells.ulColumnStart = 1;
     pZoomCells.ulNumRows = 1;
     pZoomCells.ulNumColumns = 1;
     ulOptions = 0;
     usCells = 1;

     /* start the zoom out operation */
     sts = EssGBeginZoomOut(hGrid, usCells,
           &pZoomCells, ulOptions);
  }

  if(sts == 0)
  {
     /* send the entire grid to define the query */
     sts = EssGSendRows(hGrid, &rDataRangeIn,
           ppDataIn);
  }

  if(sts == 0)
  {
     /* perform the zoom-out */
     sts = EssGPerformOperation(hGrid, 0);

     /* Free the built data */
     FreeTwoDim(ppDataIn, rDataRangeIn.ulNumRows);
  }
  if (sts == 0)
  {
     /* determine the results of the zoom-out */
     sts = EssGGetResults(hGrid, 0, &rDataRangeOut,
           &usState);
  }
  if(sts ==0)
  {
     /* get all the data */
     sts = EssGGetRows(hGrid, 0, &rDataRangeOut,
           &rDataRangeOut, &ppDataOut);
  }

  if(sts == 0)
  {
     DisplayOutput(ppDataOut, rDataRangeOut);
     /* free the returned data */
     EssGFreeRows(hGrid, &rDataRangeOut, ppDataOut);
  }

  if(!sts)
  {
  EssGEndOperation(hGrid, 0);
  EssGDisconnect(hGrid, 0);
  }
}
      

関連トピック