Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: //Need help in Directshow programming Pin
Christopher Lloyd13-May-04 2:41
Christopher Lloyd13-May-04 2:41 
GeneralRe: //Need help in Directshow programming Pin
lonely_life13-May-04 15:59
lonely_life13-May-04 15:59 
GeneralSystem Lock Pin
Arnav12-May-04 21:38
Arnav12-May-04 21:38 
GeneralRe: System Lock Pin
bikram singh12-May-04 22:25
bikram singh12-May-04 22:25 
GeneralRe: System Lock Pin
David Crow13-May-04 5:36
David Crow13-May-04 5:36 
Generalproblem about tray icon Pin
benben12-May-04 21:32
benben12-May-04 21:32 
GeneralRe: problem about tray icon Pin
DaFrawg13-May-04 1:21
DaFrawg13-May-04 1:21 
GeneralVB to VC++ Coding Function Pin
rasha200312-May-04 20:52
rasha200312-May-04 20:52 
Hi all..

I have been searching for long time for encoding Arabic txt by UCS-2 I found this code in VB that give me the correct result when I tried to write such function in VC++ I keep having error in the part where the BYTE variable when I add the string value to it ..
this is the VB function :

Public Function ArabicHex(b() As Byte) As String
Dim s As String, h As String
Dim i As Integer
i = 0
s = ""
While i <= UBound(b)
h = Right("00" & Hex(b(i)), 2)
i = i + 1
h = Right("00" & Hex(b(i)), 2) & h
If h = "000D" Then h = ""
s = s & h
i = i + 1
Wend
ArabicHex = s
End Function

this is the VC++ function :

CString s,h1,h2,h,x;
x="A";
int i;
TBYTE *b;
b=x; /// here where I am getting the error
i=0;
s="";
int xlen=x.GetLength();
while (i < xlen*8)
{
h1.Format("%02x",b[i]);
i++;
h2.Format("%02x",b[i]);

if (h.Compare("000D"))
h=" ";

h=h1+h2;
s=s+h;
i++;
}

now .. i need some one to help me correct the error io the VC++ function
GeneralRe: VB to VC++ Coding Function Pin
bikram singh12-May-04 22:17
bikram singh12-May-04 22:17 
GeneralRe: VB to VC++ Coding Function Pin
rasha200312-May-04 22:43
rasha200312-May-04 22:43 
GeneralRe: VB to VC++ Coding Function Pin
jmkhael13-May-04 3:30
jmkhael13-May-04 3:30 
GeneralRe: VB to VC++ Coding Function Pin
rasha200314-May-04 3:38
rasha200314-May-04 3:38 
GeneralVRML within Visual C++ MFC Application Pin
vadharah12-May-04 20:26
sussvadharah12-May-04 20:26 
GeneralRe: VRML within Visual C++ MFC Application Pin
David Chamberlain13-May-04 3:58
David Chamberlain13-May-04 3:58 
Questionhow to access variable from the another dialog box Pin
shiva shankar12-May-04 19:57
shiva shankar12-May-04 19:57 
AnswerRe: how to access variable from the another dialog box Pin
Maxwell Chen12-May-04 20:08
Maxwell Chen12-May-04 20:08 
AnswerRe: how to access variable from the another dialog box Pin
22491712-May-04 21:01
22491712-May-04 21:01 
AnswerRe: how to access variable from the another dialog box Pin
V.12-May-04 23:31
professionalV.12-May-04 23:31 
GeneralVC++ VS .NET Pin
?????????????????12-May-04 19:30
suss?????????????????12-May-04 19:30 
GeneralRe: VC++ VS .NET Pin
Maxwell Chen12-May-04 19:45
Maxwell Chen12-May-04 19:45 
GeneralRe: VC++ VS .NET Pin
Anthony_Yio12-May-04 20:05
Anthony_Yio12-May-04 20:05 
GeneralRe: VC++ VS .NET Pin
Roger Wright12-May-04 20:46
professionalRoger Wright12-May-04 20:46 
Generalhelp on using visual c++ toolkit 2003 with vc6 Pin
ljbade12-May-04 19:00
ljbade12-May-04 19:00 
GeneralSet height or width of control bar Pin
alex.barylski12-May-04 17:42
alex.barylski12-May-04 17:42 
GeneralRe: Set height or width of control bar Pin
nguyenvhn12-May-04 17:57
nguyenvhn12-May-04 17:57 

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.