Click here to Skip to main content
14,839,738 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBlockQuote Pin
Sarvan AL6-Aug-06 21:02
MemberSarvan AL6-Aug-06 21:02 
AnswerRe: BlockQuote Pin
_AnsHUMAN_ 6-Aug-06 22:01
Member_AnsHUMAN_ 6-Aug-06 22:01 
GeneralRe: BlockQuote___Thanks Pin
Sarvan AL7-Aug-06 19:50
MemberSarvan AL7-Aug-06 19:50 
QuestionAGAIN MY LIST CONTROL : Hy all ! Pin
Bravoone_20066-Aug-06 21:01
MemberBravoone_20066-Aug-06 21:01 
QuestionRe: AGAIN MY LIST CONTROL : Hy all ! Pin
Hamid_RT6-Aug-06 21:54
MemberHamid_RT6-Aug-06 21:54 
QuestionRe: AGAIN MY LIST CONTROL : Hy all ! Pin
Bravoone_20066-Aug-06 22:17
MemberBravoone_20066-Aug-06 22:17 
AnswerRe: AGAIN MY LIST CONTROL : Hy all ! Pin
Hamid_RT6-Aug-06 22:51
MemberHamid_RT6-Aug-06 22:51 
QuestionBase64 Pin
urid6-Aug-06 20:51
Memberurid6-Aug-06 20:51 
May be for someone it will be useful function to converting CString to CString with Base64

const char _caMMI[64] = <br />
					{	'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',<br />
						'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',<br />
						'0','1','2','3','4','5','6','7','8','9','+','/'};<br />
<br />
CString sGetBase64(CString a_sString )<br />
{<br />
		CString l_sReturned;<br />
		int l_iBlocks = a_sString.GetLength() / 3;<br />
		long l_iValue = 0;<br />
		for( int l_iBlock = 0 ; l_iBlock < l_iBlocks ; l_iBlock++ )<br />
		{<br />
			CString l_sTemp = "";<br />
			l_iValue = 0;<br />
			l_iValue = (char)(a_sString[l_iBlock*3]);<br />
			l_iValue<<=8;<br />
			l_iValue |= (char)(a_sString[l_iBlock*3+1]);<br />
			l_iValue<<=8;<br />
			l_iValue |= (char)(a_sString[l_iBlock*3+2]);<br />
<br />
			l_sTemp+= _caMMI[l_iValue & 0x3F];<br />
			l_iValue>>=6;<br />
			l_sTemp+= _caMMI[l_iValue & 0x3F];<br />
			l_iValue>>=6;<br />
			l_sTemp+= _caMMI[l_iValue & 0x3F];<br />
			l_iValue>>=6;<br />
			l_sTemp+= _caMMI[l_iValue & 0x3F];<br />
			l_iValue>>=6;<br />
			l_sTemp.MakeReverse();<br />
			l_sReturned += l_sTemp;<br />
		}<br />
		if( a_sString.GetLength() - l_iBlocks*3  == 2 )<br />
		{<br />
			CString l_sTemp = "";<br />
			l_iValue = 0;<br />
			l_iValue = (char)(a_sString[l_iBlocks*3]);<br />
			l_iValue<<=8;<br />
			l_iValue |= (char)(a_sString[l_iBlocks*3+1]);<br />
			l_iValue<<=8;<br />
<br />
<br />
			l_sTemp+= '=';<br />
			l_iValue>>=6;<br />
			l_sTemp+= _caMMI[l_iValue & 0x3F];<br />
			l_iValue>>=6;<br />
			l_sTemp+= _caMMI[l_iValue & 0x3F];<br />
			l_iValue>>=6;<br />
			l_sTemp.MakeReverse();<br />
			l_sReturned+=l_sTemp;<br />
		}<br />
		if( a_sString.GetLength() - l_iBlocks*3 == 1 )<br />
		{<br />
			CString l_sTemp = "";<br />
			l_iValue = 0;<br />
			l_iValue = (char)(a_sString[l_iBlocks*3]);<br />
			l_iValue<<=8;<br />
			l_iValue |= (char)(a_sString[l_iBlocks*3+1]);<br />
			l_iValue<<=8;<br />
<br />
			l_sTemp+= '=';<br />
			l_iValue>>=6;<br />
			l_sTemp+= '=';<br />
			l_iValue>>=6;<br />
			l_sTemp+= _caMMI[l_iValue & 0x3F];<br />
			l_iValue>>=6;<br />
			l_sTemp.MakeReverse();<br />
			l_sReturned+=l_sTemp;<br />
		}<br />
<br />
		return l_sReturned;<br />
}<br />

AnswerRe: Base64 Pin
David Crow7-Aug-06 3:21
MemberDavid Crow7-Aug-06 3:21 
Question[Message Deleted] Pin
georgekjolly6-Aug-06 19:51
Membergeorgekjolly6-Aug-06 19:51 
AnswerRe: Changing Text color on a particular Raw in a CListCtrl Pin
Hamid_RT6-Aug-06 20:01
MemberHamid_RT6-Aug-06 20:01 
AnswerRe: Changing Text color on a particular Raw in a CListCtrl Pin
Michael Dunn6-Aug-06 20:05
sitebuilderMichael Dunn6-Aug-06 20:05 
Questionvoid CWnd::CenterWindow(CWnd* pAlternateOwner) small (?) bug [modified] Pin
Cristian Amarie6-Aug-06 19:49
MemberCristian Amarie6-Aug-06 19:49 
AnswerRe: void CWnd::CenterWindow(CWnd* pAlternateOwner) small (?) bug Pin
Michael Dunn6-Aug-06 19:59
sitebuilderMichael Dunn6-Aug-06 19:59 
GeneralRe: void CWnd::CenterWindow(CWnd* pAlternateOwner) small (?) bug Pin
Cristian Amarie6-Aug-06 20:05
MemberCristian Amarie6-Aug-06 20:05 
AnswerRe: void CWnd::CenterWindow(CWnd* pAlternateOwner) small (?) bug Pin
Hamid_RT6-Aug-06 20:04
MemberHamid_RT6-Aug-06 20:04 
GeneralRe: void CWnd::CenterWindow(CWnd* pAlternateOwner) small (?) bug Pin
Cristian Amarie6-Aug-06 20:06
MemberCristian Amarie6-Aug-06 20:06 
AnswerRe: void CWnd::CenterWindow(CWnd* pAlternateOwner) small (?) bug Pin
David Crow7-Aug-06 3:27
MemberDavid Crow7-Aug-06 3:27 
QuestionHow can I dissable the Combo box from Toolbar? [modified] Pin
Sameer_Thakur6-Aug-06 19:37
MemberSameer_Thakur6-Aug-06 19:37 
AnswerRe: How can I dissable the Combo box from Toolbar? Pin
Hamid_RT6-Aug-06 19:49
MemberHamid_RT6-Aug-06 19:49 
GeneralRe: How can I dissable the Combo box from Toolbar? Pin
Sameer_Thakur6-Aug-06 20:08
MemberSameer_Thakur6-Aug-06 20:08 
AnswerRe: How can I dissable the Combo box from Toolbar? Pin
_AnsHUMAN_ 6-Aug-06 19:53
Member_AnsHUMAN_ 6-Aug-06 19:53 
QuestionHow to Fill regions in a Bitmap with color? Pin
narayanagvs6-Aug-06 19:24
Membernarayanagvs6-Aug-06 19:24 
AnswerRe: How to Fill regions in a Bitmap with color? Pin
Hamid_RT6-Aug-06 19:41
MemberHamid_RT6-Aug-06 19:41 
GeneralRe: How to Fill regions in a Bitmap with color? Pin
narayanagvs6-Aug-06 19:59
Membernarayanagvs6-Aug-06 19:59 

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.