Click here to Skip to main content
16,011,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to create multithread? Any example? Pin
16-Mar-02 6:53
suss16-Mar-02 6:53 
QuestionClient/Server programming over internet??? Pin
Rickard Andersson2015-Mar-02 20:47
Rickard Andersson2015-Mar-02 20:47 
AnswerRe: Client/Server programming over internet??? Pin
Nish Nishant15-Mar-02 21:07
sitebuilderNish Nishant15-Mar-02 21:07 
GeneralRe: Client/Server programming over internet??? Pin
Rickard Andersson2015-Mar-02 21:44
Rickard Andersson2015-Mar-02 21:44 
GeneralRe: Client/Server programming over internet??? Pin
Nish Nishant15-Mar-02 22:00
sitebuilderNish Nishant15-Mar-02 22:00 
GeneralRe: Client/Server programming over internet??? Pin
Rickard Andersson2015-Mar-02 22:20
Rickard Andersson2015-Mar-02 22:20 
QuestionHow do you call a default view in MDI application? Pin
Jasmyn15-Mar-02 19:55
Jasmyn15-Mar-02 19:55 
GeneralA strange problem! Pin
Davidlou15-Mar-02 18:42
Davidlou15-Mar-02 18:42 
Who has used the regexp object in system32\vbscipt.dll to parse the text string. I have tried it and make it work!
But i don't know why i can get only one match(that is the matches.GetCount()==1), even there are many exist. The next is my code:

void CInetSessionDlg::ParsePage(CString szPattern, CString szContent){	
//m_regExp's declaration is on other place link this: IRegExp m_regExp;	
//The class IMatchCollection and IMatch are both got from the tlb	
//m_regExp = regExp;	
try{		
     if(m_regExp.CreateDispatch(__uuidof(RegExp)) == FALSE)
	{			
           AfxMessageBox("CreateDispatch Failed!");	
           return;		
        }		
     //IMatchCollection2 * temp;	
     m_regExp.SetIgnoreCase(TRUE);	
     m_regExp.SetPattern(LPCTSTR(szPattern));		
     if(m_regExp.Test(LPCSTR(szContent)))	
      {			
          //IMatchCollection2 matches=m_regExp.Execute(szContent);			
          ISubMatches matches = m_regExp.Execute(szContent);
          for(long i = 0; i < matches.GetCount(); i++)	
	{			
	     IMatch2 match = matches.GetItem(i);	
   	     //IMatch2 match = temp->GetItem(i);	
  	     CString strLink = match.GetValue();	
	     m_cbHref.AddString(strLink);			}
     }	
}	
catch(_com_error& e)	
{	
	AfxMessageBox("Com Error occurred!" + e.Description());	
	return;
}
}

in this implementation file's header file:
i defined the RegExp(copied from the file RegExp.tlh got from vbscript.dll)


struct __declspec(uuid("3f4daca4-160d-11d2-a8e9-00104b365c9f"))RegExp; // [ default ] interface IRegExp2

Why? Who can tell me how to use vbscript.dll in VC++ 6.0

thanks a lot!



Sincerely, Davidlou
davidlou68@hotmail.com
GeneralRe: A strange problem! Pin
Nish Nishant15-Mar-02 18:42
sitebuilderNish Nishant15-Mar-02 18:42 
GeneralRe: A strange problem! Pin
Davidlou15-Mar-02 19:00
Davidlou15-Mar-02 19:00 
GeneralRe: A strange problem! Pin
Christian Graus15-Mar-02 19:06
protectorChristian Graus15-Mar-02 19:06 
GeneralRe: A strange problem! Pin
Christian Graus15-Mar-02 19:08
protectorChristian Graus15-Mar-02 19:08 
GeneralRe: A strange problem! Pin
Davidlou15-Mar-02 19:12
Davidlou15-Mar-02 19:12 
GeneralRe: A strange problem! Pin
Christian Graus15-Mar-02 18:52
protectorChristian Graus15-Mar-02 18:52 
Generala question in learning the Programing Windows with MFC Pin
Angel Kid15-Mar-02 17:46
Angel Kid15-Mar-02 17:46 
GeneralRe: a question in learning the Programing Windows with MFC Pin
Nish Nishant15-Mar-02 18:01
sitebuilderNish Nishant15-Mar-02 18:01 
GeneralRe: a question in learning the Programing Windows with MFC Pin
Christian Graus15-Mar-02 18:05
protectorChristian Graus15-Mar-02 18:05 
GeneralRe: a question in learning the Programing Windows with MFC Pin
Nish Nishant15-Mar-02 18:45
sitebuilderNish Nishant15-Mar-02 18:45 
GeneralRe: a question in learning the Programing Windows with MFC Pin
Christian Graus15-Mar-02 18:53
protectorChristian Graus15-Mar-02 18:53 
GeneralRe: a question in learning the Programing Windows with MFC Pin
Nish Nishant15-Mar-02 19:41
sitebuilderNish Nishant15-Mar-02 19:41 
GeneralRe: a question in learning the Programing Windows with MFC Pin
Michael Dunn15-Mar-02 19:46
sitebuilderMichael Dunn15-Mar-02 19:46 
GeneralRe: a question in learning the Programing Windows with MFC Pin
Angel Kid16-Mar-02 5:30
Angel Kid16-Mar-02 5:30 
Generala vc++ warning. Pin
Angel Kid15-Mar-02 17:44
Angel Kid15-Mar-02 17:44 
GeneralRe: a vc++ warning. Pin
Christian Graus15-Mar-02 18:06
protectorChristian Graus15-Mar-02 18:06 
GeneralShow or Hide someone elses .exe Pin
RobJones15-Mar-02 14:52
RobJones15-Mar-02 14:52 

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.