怎樣取得多文檔程序的title?

熱心網友

我用CString aa; GetWindowText(aa); 結果得到的是一個子文檔的內容。 我又用 HWND ParentWnd; while (glhTargetWnd !=NULL) { ParentWnd = glhTargetWnd; glhTargetWnd=::GetParent(glhTargetWnd); } //get title memset(buf, 0, sizeof(buf)); ::GetWindowText(ParentWnd, buf, 100); 還是一個子文檔的內容, 我該怎么辦??? --------------------------------------------------------------- ::AfxGetApp()-GetMainWnd()-GetWindowText( buf, 100 ); --------------------------------------------------------------- GetParentFrame吧 --------------------------------------------------------------- use AfxGetAppName() to get the application name !。