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

C / C++ / MFC

 
GeneralRe: SHGetSpecialFolderPath and NT4 Pin
Michael Dunn15-Mar-02 7:41
sitebuilderMichael Dunn15-Mar-02 7:41 
GeneralCreateEx Pin
Anthony988715-Mar-02 3:35
Anthony988715-Mar-02 3:35 
GeneralRe: CreateEx Pin
Tomasz Sowinski15-Mar-02 3:36
Tomasz Sowinski15-Mar-02 3:36 
GeneralRe: CreateEx Pin
Carlos Antollini15-Mar-02 3:39
Carlos Antollini15-Mar-02 3:39 
Questionwill this cause resource leak? Pin
lucy15-Mar-02 2:56
lucy15-Mar-02 2:56 
AnswerRe: will this cause resource leak? Pin
Tomasz Sowinski15-Mar-02 2:53
Tomasz Sowinski15-Mar-02 2:53 
GeneralRe: will this cause resource leak? Pin
lucy15-Mar-02 3:17
lucy15-Mar-02 3:17 
GeneralA strange problem! Pin
Davidlou15-Mar-02 2:18
Davidlou15-Mar-02 2:18 
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
GeneralAvoid Moving a window Pin
parker_john15-Mar-02 2:17
parker_john15-Mar-02 2:17 
GeneralRe: Avoid Moving a window Pin
Tomasz Sowinski15-Mar-02 2:19
Tomasz Sowinski15-Mar-02 2:19 
GeneralRe: Avoid Moving a window Pin
Prem Kumar15-Mar-02 2:38
Prem Kumar15-Mar-02 2:38 
GeneralRe: Avoid Moving a window Pin
Tomasz Sowinski15-Mar-02 2:43
Tomasz Sowinski15-Mar-02 2:43 
GeneralRe: Avoid Moving a window Pin
Prem Kumar15-Mar-02 2:33
Prem Kumar15-Mar-02 2:33 
GeneralDrag and Resize ActiveX control in CView Pin
sanskypotov15-Mar-02 1:58
sanskypotov15-Mar-02 1:58 
Generalplease help me Pin
15-Mar-02 1:55
suss15-Mar-02 1:55 
GeneralRe: please help me Pin
Tomasz Sowinski15-Mar-02 2:08
Tomasz Sowinski15-Mar-02 2:08 
GeneralRe: please help me Pin
Tim Smith15-Mar-02 2:10
Tim Smith15-Mar-02 2:10 
GeneralRe: please help me Pin
Tomasz Sowinski15-Mar-02 2:14
Tomasz Sowinski15-Mar-02 2:14 
GeneralRe: please help me Pin
Tim Smith15-Mar-02 3:14
Tim Smith15-Mar-02 3:14 
GeneralRe: please help me Pin
Christian Graus15-Mar-02 10:30
protectorChristian Graus15-Mar-02 10:30 
GeneralRGB to HSB Conversion.. Pin
Neha15-Mar-02 1:12
Neha15-Mar-02 1:12 
GeneralRe: RGB to HSB Conversion.. Pin
Tomasz Sowinski15-Mar-02 1:19
Tomasz Sowinski15-Mar-02 1:19 
GeneralRe: RGB to HSB Conversion.. Pin
Neha15-Mar-02 1:43
Neha15-Mar-02 1:43 
GeneralRe: RGB to HSB Conversion.. Pin
Tomasz Sowinski15-Mar-02 2:06
Tomasz Sowinski15-Mar-02 2:06 
GeneralRe: RGB to HSB Conversion.. Pin
Tomasz Sowinski15-Mar-02 2:12
Tomasz Sowinski15-Mar-02 2:12 

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.