Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Way to Convert this MFC Code to C++ Builder?

Status
Not open for further replies.

cjtaylor

Programmer
Aug 12, 2001
69
US
I am looking for a C++ Builder equivelent to this MFC Code. The code I am concerned about is the CByteArray type, CString.Mid method.

Thanks for any help.

CString fileName;//Create file path
CString strTemp;//Temp string
CString strLow;//byte low
CString strHigh;//byte high
CString strTr;//Input string
CByteArray byteTr;//Input byte
long rtNext = 0;//See part of 2byte and start position


byteTr.SetSize(m_Cochkscan1.GetImageDataSize() / 2);
for(long i = 0;i < m_Cochkscan1.GetImageDataSize() /2;i++){
strHigh = strTemp.Mid(rtNext,1);
strLow = strTemp.Mid(rtNext+1,1);
rtNext = rtNext + 2;
byteTr.SetAt(i,(BYTE)(strChange(strHigh) * 16 + strChange(strLow)));
}
ImCreateFile(fileName);
 
I think I saw an applet in BCB Enterprise that was used to convert MVC++ to builder.

Visual C++ project conversion utility.

Havent used it.

Happy Turkey!!!!!!!!!!!!!!!!!!!!!!!!!
 
CString i'm uncertain of but it could equate AnsiString and by hitting Help on AnsiString You will come a long way, there are a couple of functions connected with AnsiString, look at those!
But the function You creates by this....it looks like Your'e reading a bitmap and saves the lower nibble of each byte of the bitmap and there are WAY smarter solutions to that than this approach. Totte
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top