GetGrid2 メソッド

構文

void GetGrid2(double* dSpan, double* dDegree, long* lDivision, OLE_COLOR* ocCol, double* dXPos, double* dYPos);

(JavaScript用) string GetGrid2JS();

グリッドの設定内容を取得します。

パラメータ

dSpan
グリッド間隔(単位ミリ)。
dDegree
グリッド角度(単位は度)。
lDivision
分割数。
ocCol
グリッドの色。
dXPos
原点のX座標。
dYPos
原点のY座標。

使用例

// 間取りオブジェクトへ接続
CMadoriDoc * m_MadoriDoc = new CMadoriDoc();
CLSIDFromProgID (L"MyHomeDesignerMadori.MadoriDoc", &clsid);
GetActiveObject (clsid, NULL, &pUnk);
pUnk->QueryInterface (IID_IDispatch, (void**)(&pDisp));
m_MadoriDoc->AttachDispatch (pDisp);

// グリッドを設定
double dSpan, dDegree;
long uDivision;
unsigned long ocCol;
double dXPos, dYPos;
m_MadoriDoc->GetGrid2(&dSpan, &dDegree, &lDivision, &ocCol, &dXPos, &dYPos);
CString strMsg;
strMsg.Format(TEXT("Grid span[%lf]degree[%lf]division[%u]col[%x]origin[%lf,%lf]"),
	dSpan, dDegree, lDivision, ocCol, dXPos, dYPos);
AfxMessageBox(strMsg, MB_ICONINFORMATION);

// JavaScript sample
var doc = new CMadoriDoc();
var data = eval( doc.GetGrid2JS() );
var msg = " Result[" + data.Result + "]\r\n";
msg += " Span[" + data.Span + "]\r\n";
msg += " Degree[" + data.Degree + "]\r\n";
msg += " Division[" + data.Division + "]\r\n";
msg += " Col[" + data.Col + "]\r\n";
msg += " XPos[" + data.XPos + "]\r\n";
msg += " YPos[" + data.YPos + "]";
alert(msg);