确定视图的行和列






1.89/5 (3投票s)
1999年12月17日

68752
一个函数,告诉您视图在分割窗口中的位置
此方法将告诉你此视图位于分割窗口的哪个位置(行和列)。
void CMySplitterView::GetRowCol(int &row, int &col)
{
CSplitterWnd * parent;
parent = (CSplitterWnd*)GetParent();
int rows = parent->GetRowCount();
int cols = parent->GetColumnCount();
for (row = 0; row < rows; row++)
{
for (col = 0; col < cols; col++)
{
if (this == parent->GetPane(row,col))
{
return;
}
}
}
ASSERT(FALSE);
}
许可证
本文未附加明确的许可证,但可能在文章文本或下载文件本身中包含使用条款。如有疑问,请通过下面的讨论区联系作者。
作者可能使用的许可证列表可以在此处找到。