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

C / C++ / MFC

 
AnswerRe: How can I upload an file in MFC ? Pin
David Crow27-Jan-11 4:16
David Crow27-Jan-11 4:16 
GeneralRe: How can I upload an file in MFC ? Pin
mesajflaviu27-Jan-11 8:54
mesajflaviu27-Jan-11 8:54 
QuestionRe: How can I upload an file in MFC ? Pin
David Crow27-Jan-11 8:57
David Crow27-Jan-11 8:57 
AnswerRe: How can I upload an file in MFC ? Pin
mesajflaviu27-Jan-11 8:59
mesajflaviu27-Jan-11 8:59 
GeneralRe: How can I upload an file in MFC ? Pin
David Crow27-Jan-11 9:14
David Crow27-Jan-11 9:14 
GeneralRe: How can I upload an file in MFC ? Pin
mesajflaviu27-Jan-11 10:19
mesajflaviu27-Jan-11 10:19 
GeneralRe: How can I upload an file in MFC ? Pin
mesajflaviu30-Jan-11 19:55
mesajflaviu30-Jan-11 19:55 
QuestionCan anybody help me to convert some vb function in vc++? [modified] Pin
Le@rner26-Jan-11 23:12
Le@rner26-Jan-11 23:12 
Hi all,

i m working on vc++ and i have no idea of vb,i saw a vb application and want to do same functioning in my vc++

these are some function please help me to convert it in vc++

Shared Function Encode7Bit(ByVal Content As String) As String
                'Prepare
                Dim CharArray As Char() = Content.ToCharArray
                Dim c As Char
                Dim t As String
                For Each c In CharArray
                    t = CharTo7Bits(c) + t
                Next
                'Add "0"
                Dim i As Integer
                If (t.Length Mod 8) <> 0 Then
                    For i = 1 To 8 - (t.Length Mod 8)
                        t = "0" + t
                    Next
                End If
                'Split into 8bits
                Dim result As String
                For i = t.Length - 8 To 0 Step -8
                    result = result + BitsToHex(Mid(t, i + 1, 8))
                Next
                Return result
            End Function

Shared Function CharTo7Bits(ByVal c As Char) As String
                If c = "@" Then Return "0000000"
                Dim Result As String
                Dim i As Integer
                Dim ij As Integer
                For i = 0 To 6
                    ij = Asc(c)
                    If (Asc(c) And 2 ^ i) > 0 Then //how write it in vc++
                        Result = "1" + Result
                    Else
                        Result = "0" + Result
                    End If
                Next
                Return Result
            End Function

 Shared Function BitsToHex(ByVal Bits As String) As String
                'Convert 8Bits to Hex String
                Dim i, v As Integer
                For i = 0 To Bits.Length - 1
                    v = v + Val(Mid(Bits, i + 1, 1)) * 2 ^ (7 - i)
                Next
                Dim result As String
                result = Format(v, "X2")
                Return result
            End Function

Shared Function EncodeUCS2(ByVal Content As String) As String
                Dim i, j, v As Integer
                Dim Result, t As String
                For i = 1 To Content.Length
                    v = AscW(Mid(Content, i, 4))//how write it in vc++
                    t = Format(v, "X4")
                    Result += t
                Next
                Return Result
            End Function


thanks in advance

modified on Thursday, January 27, 2011 5:24 AM

GeneralRe: Can anybody help me to convert some vb function in vc++? Pin
Malli_S26-Jan-11 23:21
Malli_S26-Jan-11 23:21 
AnswerRe: Can anybody help me to convert some vb function in vc++? Pin
CPallini26-Jan-11 23:38
mveCPallini26-Jan-11 23:38 
Questionhow to use CButton class in win 32 Pin
rajniyadav1a26-Jan-11 19:41
rajniyadav1a26-Jan-11 19:41 
AnswerRe: how to use CButton class in win 32 Pin
_AnsHUMAN_ 26-Jan-11 20:19
_AnsHUMAN_ 26-Jan-11 20:19 
AnswerRe: how to use CButton class in win 32 Pin
Cedric Moonen26-Jan-11 20:31
Cedric Moonen26-Jan-11 20:31 
AnswerRe: how to use CButton class in win 32 Pin
CPallini26-Jan-11 21:30
mveCPallini26-Jan-11 21:30 
Questionhow to close document handle Pin
VCsamir26-Jan-11 18:19
VCsamir26-Jan-11 18:19 
AnswerRe: how to close document handle Pin
Cedric Moonen26-Jan-11 20:38
Cedric Moonen26-Jan-11 20:38 
AnswerRe: how to close document handle Pin
CPallini26-Jan-11 22:02
mveCPallini26-Jan-11 22:02 
GeneralRe: how to close document handle Pin
VCsamir26-Jan-11 22:21
VCsamir26-Jan-11 22:21 
GeneralRe: how to close document handle Pin
Richard MacCutchan26-Jan-11 22:38
mveRichard MacCutchan26-Jan-11 22:38 
Questionelse does nto return expected value Pin
jharn26-Jan-11 9:34
jharn26-Jan-11 9:34 
AnswerRe: else does nto return expected value Pin
TheGreatAndPowerfulOz26-Jan-11 9:47
TheGreatAndPowerfulOz26-Jan-11 9:47 
GeneralRe: else does not return expected value Pin
jharn26-Jan-11 10:04
jharn26-Jan-11 10:04 
GeneralRe: else does not return expected value Pin
TheGreatAndPowerfulOz26-Jan-11 10:08
TheGreatAndPowerfulOz26-Jan-11 10:08 
GeneralRe: else does not return expected value Pin
jharn26-Jan-11 10:10
jharn26-Jan-11 10:10 
GeneralRe: else does not return expected value Pin
TheGreatAndPowerfulOz26-Jan-11 10:12
TheGreatAndPowerfulOz26-Jan-11 10: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.