AutoOrientPage Example for C++ 5.0 and later

void CSample_COMDlg::OnButton4()
{
   int nRet = pRasterDoc->AutoOrientPage(0);
   if (nRet != 0)
      AfxMessageBox(TEXT("Failure during auto orient the current page"));
}