Click here to Skip to main content
15,894,540 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralC++ Class design tool Pin
TssPrasad7-Sep-05 18:08
sussTssPrasad7-Sep-05 18:08 
GeneralRe: C++ Class design tool Pin
Marc Soleda7-Sep-05 22:16
Marc Soleda7-Sep-05 22:16 
QuestionHow does CListCtrl notify its parent window when a cell content has changed? Pin
followait7-Sep-05 17:39
followait7-Sep-05 17:39 
AnswerRe: How does CListCtrl notify its parent window when a cell content has changed? Pin
ThatsAlok7-Sep-05 18:48
ThatsAlok7-Sep-05 18:48 
GeneralRe: How does CListCtrl notify its parent window when a cell content has changed? Pin
followait7-Sep-05 20:55
followait7-Sep-05 20:55 
GeneralRe: How does CListCtrl notify its parent window when a cell content has changed? Pin
Frank K7-Sep-05 22:19
Frank K7-Sep-05 22:19 
QuestionA question about compound document and flat document Pin
code_chenyf7-Sep-05 17:29
code_chenyf7-Sep-05 17:29 
QuestionHow to get all the frames of a web page(CHtmlView)? Pin
Tcpip20057-Sep-05 16:48
Tcpip20057-Sep-05 16:48 
I tried as bellow,but I think it doesn't work correctly.
Who knows how?? Thank you very much.

IHTMLDocument2 * pDoc = NULL;
IHTMLWindow2 *pHTMLWnd = NULL;
IHTMLDocument2 * pFrameDoc=NULL;
IHTMLFramesCollection2 *pFramesCollection=NULL;
LPDISPATCH lpDispatch;

long p;
VARIANT varindex,varresult;
varresult.vt=VT_DISPATCH;
varindex.vt = VT_I4;
try
{
pDoc = (IHTMLDocument2*)(GetHtmlDocument());
if(pDoc!=NULL)
{
pDoc->get_frames(&pFramesCollection);
if(pFramesCollection!=NULL)
{
pFramesCollection->get_length(&p);
if(p>0)
{
for(int i=0; i<p; i++)
="" {
="" varindex.lval="i;"
="" if(pframescollection-="">item(&varindex, &varresult) ==S_OK)
{
lpDispatch=(LPDISPATCH)varresult.ppdispVal;

if (SUCCEEDED(lpDispatch->QueryInterface(IID_IHTMLWindow2, (LPVOID *)&pHTMLWnd)))
{
if(SUCCEEDED(pHTMLWnd->get_document( &pFrameDoc)))
{
BSTR bstr=NULL;
HRESULT hr=pFrameDoc->get_URL(&bstr);
ASSERT(SUCCEEDED(hr));

CString str= bstr;
SysFreeString(bstr);

pFrameDoc->Release();
pFrameDoc=NULL;
}
pHTMLWnd->Release();
pHTMLWnd=NULL;
}
}
}
}
}
}
}
catch(...)
{
};

try
{
if(pDoc != NULL)
pDoc->Release();
if(pFramesCollection != NULL)
pFramesCollection->Release();
}
catch(...)
{
};
AnswerRe: How to get all the frames of a web page(CHtmlView)? Pin
Tcpip20057-Sep-05 16:52
Tcpip20057-Sep-05 16:52 
GeneralRe: How to get all the frames of a web page(CHtmlView)? Pin
Hans Ruck7-Sep-05 20:28
Hans Ruck7-Sep-05 20:28 
GeneralRe: How to get all the frames of a web page(CHtmlView)? Pin
Tcpip20057-Sep-05 20:32
Tcpip20057-Sep-05 20:32 
GeneralRe: How to get all the frames of a web page(CHtmlView)? Pin
Hans Ruck7-Sep-05 20:35
Hans Ruck7-Sep-05 20:35 
AnswerRe: How to get all the frames of a web page(CHtmlView)? Pin
Ralf Martin Hansen3-Apr-24 21:05
Ralf Martin Hansen3-Apr-24 21:05 
QuestionHelp please can someone rewrite this Pin
SummoningDan7-Sep-05 16:33
SummoningDan7-Sep-05 16:33 
AnswerRe: Help please can someone rewrite this Pin
PJ Arends7-Sep-05 16:51
professionalPJ Arends7-Sep-05 16:51 
AnswerRe: Help please can someone rewrite this Pin
Marc Soleda7-Sep-05 20:40
Marc Soleda7-Sep-05 20:40 
QuestionThe PlaySound Function Pin
Mr. Bombastic7-Sep-05 15:30
sussMr. Bombastic7-Sep-05 15:30 
AnswerRe: The PlaySound Function Pin
Christian Graus7-Sep-05 15:42
protectorChristian Graus7-Sep-05 15:42 
QuestionGet a file icon for a given file type... Pin
Ian Bowler7-Sep-05 13:21
Ian Bowler7-Sep-05 13:21 
AnswerRe: Get a file icon for a given file type... Pin
Gary R. Wheeler7-Sep-05 14:32
Gary R. Wheeler7-Sep-05 14:32 
GeneralRe: Get a file icon for a given file type... Pin
Ian Bowler8-Sep-05 7:42
Ian Bowler8-Sep-05 7:42 
AnswerRe: Get a file icon for a given file type... Pin
Graham Bradshaw7-Sep-05 14:33
Graham Bradshaw7-Sep-05 14:33 
GeneralRe: Get a file icon for a given file type... Pin
Ian Bowler8-Sep-05 5:48
Ian Bowler8-Sep-05 5:48 
AnswerRe: Get a file icon for a given file type... Pin
David Crow8-Sep-05 3:22
David Crow8-Sep-05 3:22 
Questionprogram step into non defined area Pin
valerie997-Sep-05 12:25
valerie997-Sep-05 12:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.