Click here to Skip to main content
15,885,767 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to change MFC icon?? Pin
mimimimilaw29-Jun-06 22:27
mimimimilaw29-Jun-06 22:27 
QuestionDirectx8 document Pin
blue_rabbit29-Jun-06 21:49
blue_rabbit29-Jun-06 21:49 
QuestionAdvice on Global Hook Pin
P Gibson29-Jun-06 21:41
P Gibson29-Jun-06 21:41 
QuestionContext menu Pin
_anil_29-Jun-06 21:41
_anil_29-Jun-06 21:41 
AnswerRe: Context menu Pin
Michael Dunn29-Jun-06 21:47
sitebuilderMichael Dunn29-Jun-06 21:47 
GeneralRe: Context menu Pin
_anil_29-Jun-06 22:37
_anil_29-Jun-06 22:37 
AnswerRe: Context menu Pin
RockyJames29-Jun-06 22:31
RockyJames29-Jun-06 22:31 
Questionwhy IHTMLElementCollection can not "Item" all the Items? Pin
Tcpip200529-Jun-06 21:27
Tcpip200529-Jun-06 21:27 
void CParseView::GetEmbeds()
{
	IHTMLElement* pDocElem;
	IHTMLElementCollection* pElemCollections;
	
	IHTMLDocument2 * pHTMLDoc2 = NULL;
	pHTMLDoc2 = (IHTMLDocument2*)(this->GetHtmlDocument());
	pHTMLDoc2->get_all(&pElemCollections);
	
	COleVariant varName;
	varName = SysAllocString(L"OBJECT");
	
	IDispatch* spDispEmbed;
	
	VARIANT name;
	name.vt = VT_I4;
	
	pElemCollections->tags(varName, &spDispEmbed);
	
	IHTMLElementCollection* spCollectEmbed;
	spDispEmbed->QueryInterface(IID_IHTMLElementCollection, (void**)&spCollectEmbed);
	if (spCollectEmbed)
	{
		long lLen;
		spCollectEmbed->get_length(&lLen);
		for (long i = 0; i < lLen; i++)
		{
			IDispatch* pItem;
			
			name.lVal = i;
			spCollectEmbed->item(NULL, name, &pItem);
						
			IHTMLElement* spElement;
			pItem->QueryInterface(IID_IHTMLElement, (void**)&spElement);
						
			if(pItem)
				pItem->Release();
			
			if(spElement)
				spElement->Release();
		}
	}
	if(pHTMLDoc2)
		pHTMLDoc2->Release();
}


use the code, I got the length:lLen=4;but I can only fetch the first two Items,when i=2,pItem got a NULL. How could this happen?
AnswerRe: why IHTMLElementCollection can not "Item" all the Items? Pin
Viorel.29-Jun-06 21:43
Viorel.29-Jun-06 21:43 
GeneralRe: why IHTMLElementCollection can not "Item" all the Items? Pin
Tcpip200529-Jun-06 22:22
Tcpip200529-Jun-06 22:22 
AnswerRe: why IHTMLElementCollection can not "Item" all the Items? Pin
Hamid_RT29-Jun-06 21:58
Hamid_RT29-Jun-06 21:58 
QuestionHow to mask the bitmaps?? Pin
Laxman Auti29-Jun-06 21:19
Laxman Auti29-Jun-06 21:19 
AnswerRe: How to mask the bitmaps?? Pin
Don Box29-Jun-06 21:33
Don Box29-Jun-06 21:33 
GeneralRe: How to mask the bitmaps?? Pin
Laxman Auti29-Jun-06 21:56
Laxman Auti29-Jun-06 21:56 
QuestionIs that madatory to close the socket when error? [modified] Pin
raserove29-Jun-06 20:46
raserove29-Jun-06 20:46 
QuestionProblem when using right click to select an item in CTreeCtrl. Pin
followait29-Jun-06 20:41
followait29-Jun-06 20:41 
AnswerRe: Problem when using right click to select an item in CTreeCtrl. Pin
cje30-Jun-06 5:30
cje30-Jun-06 5:30 
QuestionHow can I register the new fonts with OS ? Pin
Sameer_Thakur29-Jun-06 20:34
Sameer_Thakur29-Jun-06 20:34 
AnswerRe: How can I register the new fonts with OS ? Pin
Michael Dunn29-Jun-06 20:56
sitebuilderMichael Dunn29-Jun-06 20:56 
GeneralRe: How can I register the new fonts with OS ? [modified] Pin
Sameer_Thakur29-Jun-06 21:31
Sameer_Thakur29-Jun-06 21:31 
GeneralRe: How can I register the new fonts with OS ? Pin
David Crow30-Jun-06 2:59
David Crow30-Jun-06 2:59 
Questionplease help uegent Pin
sriv_1829-Jun-06 20:31
sriv_1829-Jun-06 20:31 
AnswerRe: please help uegent Pin
Hamid_RT29-Jun-06 20:41
Hamid_RT29-Jun-06 20:41 
QuestionWhile running my application , Machine (PC) gets slow Pin
zahid_ash29-Jun-06 20:16
zahid_ash29-Jun-06 20:16 
AnswerRe: While running my application , Machine (PC) gets slow Pin
_AnsHUMAN_ 29-Jun-06 20:21
_AnsHUMAN_ 29-Jun-06 20:21 

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.