Click here to Skip to main content
15,921,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralEvents - How Fast Pin
Grahamfff10-Dec-04 8:47
Grahamfff10-Dec-04 8:47 
GeneralRe: Events - How Fast Pin
John M. Drescher10-Dec-04 10:39
John M. Drescher10-Dec-04 10:39 
GeneralRe: Events - How Fast Pin
Antti Keskinen10-Dec-04 10:39
Antti Keskinen10-Dec-04 10:39 
GeneralRe: Events - How Fast Pin
Mike Dimmick10-Dec-04 12:33
Mike Dimmick10-Dec-04 12:33 
GeneralOnRButtonUp Pin
greba10-Dec-04 8:33
greba10-Dec-04 8:33 
GeneralRe: OnRButtonUp Pin
greba10-Dec-04 9:13
greba10-Dec-04 9:13 
GeneralRe: OnRButtonUp Pin
G. Steudtel10-Dec-04 9:16
G. Steudtel10-Dec-04 9:16 
Generalregular experssion in C++ Pin
pnpfriend10-Dec-04 7:47
pnpfriend10-Dec-04 7:47 
Is there a regular repression class in VC++?
I would like to convert following VB code to VC++ code. Thank you.
<br />
Dim regexp As New Regex("<(B|b)(L|l)(O|o)(C|c)(k|K)(q|Q)(u|U)(O|o)(t|T)(e|E)")<br />
        Dim matches As MatchCollection<br />
        Dim m As Match<br />
<br />
        'matches = regexp.Matches(body, "<\/(B|b)(L|l)(O|o)(C|c)(k|K)(q|Q)(u|U)(O|o)(t|T)(e|E)>")<br />
        'If matches.Count > 2 Then           <br />
        'End If<br />
        'm.index position is in the right position where <blockquote was found<br />
        ' therefore, substracting compund length of deleting <blockquote... > string from original match index <br />
        'finding all the blockquote string and store in the array<br />
        matches = regexp.Matches(body)<br />
        If matches.Count > 2 Then<br />
            Dim bquotes(matches.Count) As String<br />
            Dim bquote As String<br />
            Dim index As Integer = 0<br />
            Dim count As Integer = 0<br />
<br />
            For Each m In matches<br />
                close1 = body.IndexOf(">", m.Index)<br />
                Dim temp As String<br />
                Dim found As Boolean<br />
                temp = body.Substring(m.Index, close1 + 1 - m.Index)<br />
                If index <> 0 Then<br />
                    For Each bquote In bquotes<br />
                        If bquote = Nothing Then<br />
                            Exit For<br />
                        End If<br />
                        If (bquote = temp) Then<br />
                            found = True<br />
                            Exit For<br />
                        Else<br />
                            found = False<br />
                        End If<br />
                    Next<br />
                End If<br />
                If Not found Then<br />
                    bquotes(index) = temp<br />
                    index += 1<br />
                End If<br />
            Next<br />
            Dim i As Integer = 0<br />
            For Each bquote In bquotes<br />
                If (bquote = Nothing Or i = index) Then Exit For<br />
                body = regexp.Replace(body, bquote, "")<br />
                i += 1<br />
            Next<br />
            body = regexp.Replace(body, "<\/(B|b)(L|l)(O|o)(C|c)(k|K)(q|Q)(u|U)(O|o)(t|T)(e|E)>", "")<br />
            body = regexp.Replace(body, "(M|m)(A|a)(R|r)(G|g)(I|i)(N|n)-(L|l)(E|e)(F|f)(T|t):", "")<br />
        End If<br />
        regexp = Nothing

GeneralRe: regular experssion in C++ Pin
John M. Drescher10-Dec-04 8:03
John M. Drescher10-Dec-04 8:03 
GeneralRe: regular experssion in C++ Pin
Jack Puppy10-Dec-04 11:17
Jack Puppy10-Dec-04 11:17 
GeneralRe: regular experssion in C++ Pin
John R. Shaw10-Dec-04 18:44
John R. Shaw10-Dec-04 18:44 
GeneralCDC::BitBlt(...) - strange speed variations Pin
moredip10-Dec-04 7:01
moredip10-Dec-04 7:01 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
G. Steudtel10-Dec-04 7:22
G. Steudtel10-Dec-04 7:22 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
moredip10-Dec-04 7:31
moredip10-Dec-04 7:31 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
G. Steudtel10-Dec-04 7:52
G. Steudtel10-Dec-04 7:52 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
moredip10-Dec-04 8:16
moredip10-Dec-04 8:16 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
G. Steudtel10-Dec-04 9:10
G. Steudtel10-Dec-04 9:10 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
moredip10-Dec-04 9:22
moredip10-Dec-04 9:22 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
Jack Puppy10-Dec-04 11:37
Jack Puppy10-Dec-04 11:37 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
moredip10-Dec-04 11:46
moredip10-Dec-04 11:46 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
Jack Puppy11-Dec-04 13:09
Jack Puppy11-Dec-04 13:09 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
moredip13-Dec-04 4:48
moredip13-Dec-04 4:48 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
John R. Shaw10-Dec-04 19:09
John R. Shaw10-Dec-04 19:09 
GeneralWM message Pin
Ann6610-Dec-04 6:45
sussAnn6610-Dec-04 6:45 
GeneralRe: WM message Pin
prcarp10-Dec-04 7:00
prcarp10-Dec-04 7:00 

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.