Click here to Skip to main content
16,012,223 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: virtual member is not called, but base implementation instead? Pin
CherezZaboro22-Jun-04 4:45
CherezZaboro22-Jun-04 4:45 
GeneralVC++ 6, ATL windows service, pausing... Pin
CherezZaboro22-Jun-04 3:33
CherezZaboro22-Jun-04 3:33 
GeneralRe: VC++ 6, ATL windows service, pausing... Pin
palbano22-Jun-04 5:44
palbano22-Jun-04 5:44 
GeneralInfo on Hooks Pin
Member 115017622-Jun-04 3:27
Member 115017622-Jun-04 3:27 
GeneralRe: Info on Hooks Pin
Anonymous22-Jun-04 5:53
Anonymous22-Jun-04 5:53 
GeneralRe: Info on Hooks Pin
gamitech22-Jun-04 13:00
gamitech22-Jun-04 13:00 
Generalstring to PDU hex conversion function Pin
sm_sharp22-Jun-04 3:15
susssm_sharp22-Jun-04 3:15 
GeneralRe: string to PDU hex conversion function Pin
jmkhael22-Jun-04 4:36
jmkhael22-Jun-04 4:36 
CString CAutoMsnDlg::Decode_8_to_7(CString &str_Input_8_bits)
{
unsigned short temp [1000] ;
unsigned short result [1000];

int length = str_Input_8_bits.GetLength();

for ( int i = 0 ; i < length; i ++ )
{
if ( ( str_Input_8_bits [i] >= '0') && ( str_Input_8_bits [i] <= '9' ) )
temp [i] = str_Input_8_bits [i] - '0' ;
else
if ( str_Input_8_bits [i] >= 'A' )
temp [i] = str_Input_8_bits [i] - 'A' + 10 ;
else
temp [i] = str_Input_8_bits [i] - 'a' + 10 ;
}


for ( i = 0 ; i < length ; i+=2 )
{
temp[i/2] = (temp[i]<<4 ) | temp[i+1];
}

length = length / 2 ;

for ( i = 0 ; i < length/7 ; i++ )
{
result [i*8 + 0] = ( temp [i*7 + 0] & 0x7f ) ;
result [i*8 + 1] = ( ( temp [i*7 + 1] & 0x3f ) << 1 ) | ( temp [i*7 + 0] >> 7 ) ;
result [i*8 + 2] = ( ( temp [i*7 + 2] & 0x1f ) << 2 ) | ( temp [i*7 + 1] >> 6 ) ;
result [i*8 + 3] = ( ( temp [i*7 + 3] & 0x0f ) << 3 ) | ( temp [i*7 + 2] >> 5 ) ;
result [i*8 + 4] = ( ( temp [i*7 + 4] & 0x07 ) << 4 ) | ( temp [i*7 + 3] >> 4 ) ;
result [i*8 + 5] = ( ( temp [i*7 + 5] & 0x03 ) << 5 ) | ( temp [i*7 + 4] >> 3 ) ;
result [i*8 + 6] = ( ( temp [i*7 + 6] & 0x01 ) << 6 ) | ( temp [i*7 + 5] >> 2 ) ;
result [i*8 + 7] = ( temp[i*7 + 6] >> 1 ) ;
}

i = length/7 ;

if ( i*7 + 0 < length )
result [i*8 + 0] = temp [i*7 + 0] & 0x7f ;
if ( i*7 + 1 < length )
result [i*8 + 1] = ( ( temp[i*7 + 1] & 0x3f ) << 1 ) | (temp[i*7 + 0] >> 7 );
if ( i*7 + 2 < length )
result [i*8 + 2] = ( ( temp[i*7 + 2] & 0x1f ) << 2 ) | (temp[i*7 + 1] >> 6 );
if ( i*7 + 3 < length )
result [i*8 + 3] = ( ( temp[i*7 + 3] & 0x0f ) << 3 ) | (temp[i*7 + 2] >> 5 );
if ( i*7 + 4 < length )
result [i*8 + 4] = ( ( temp[i*7 + 4] & 0x07 ) << 4 ) | (temp[i*7 + 3] >> 4 );
if ( i*7 + 5 < length )
result [i*8 + 5] = ( ( temp[i*7 + 5] & 0x03 ) << 5 ) | (temp[i*7 + 4] >> 3 );
if ( i*7 + 6 < length )
result [i*8 + 6] = ( ( temp[i*7 + 6] & 0x01 ) << 6 ) | (temp[i*7 + 5] >> 2 );

int new_length = length*8/7 ;

CString str_Output_7_bits = CString ( result , new_length);

return str_Output_7_bits;

}

CString CAutoMsnDlg::Decode_7_to_8(CString &str_Input_7_bits)
{
unsigned short temp [1000];
unsigned short result [1000];

int i=0;

int length = str_Input_7_bits.GetLength();

for ( i = 0 ; i< length/8 ; i++ )
{
temp [i*7 + 0] = ( ( str_Input_7_bits[i*8 + 0] >> 0 ) & 0x7f ) | ( str_Input_7_bits[i*8 + 1] << 7 ) ;
temp [i*7 + 1] = ( ( str_Input_7_bits[i*8 + 1] >> 1 ) & 0x3f ) | ( str_Input_7_bits[i*8 + 2] << 6 ) ;
temp [i*7 + 2] = ( ( str_Input_7_bits[i*8 + 2] >> 2 ) & 0x1f ) | ( str_Input_7_bits[i*8 + 3] << 5 ) ;
temp [i*7 + 3] = ( ( str_Input_7_bits[i*8 + 3] >> 3 ) & 0x0f ) | ( str_Input_7_bits[i*8 + 4] << 4 ) ;
temp [i*7 + 4] = ( ( str_Input_7_bits[i*8 + 4] >> 4 ) & 0x07 ) | ( str_Input_7_bits[i*8 + 5] << 3 ) ;
temp [i*7 + 5] = ( ( str_Input_7_bits[i*8 + 5] >> 5 ) & 0x03 ) | ( str_Input_7_bits[i*8 + 6] << 2 ) ;
temp [i*7 + 6] = ( ( str_Input_7_bits[i*8 + 6] >> 6 ) & 0x01 ) | ( str_Input_7_bits[i*8 + 7] << 1 ) ;
}

i = length/8 ;

if ( i*8 + 0 < length -1 )
temp [i*7 + 0] = ( ( str_Input_7_bits [i*8 + 0] >> 0 ) & 0x7f ) | ( str_Input_7_bits [i*8 + 1] << 7 ) ;
if ( i*8 + 1 < length -1 )
temp [i*7 + 1] = ( ( str_Input_7_bits [i*8 + 1] >> 1 ) & 0x3f ) | ( str_Input_7_bits [i*8 + 2] << 6 ) ;
if ( i*8 + 2 < length -1 )
temp [i*7 + 2] = ( ( str_Input_7_bits [i*8 + 2] >> 2 ) & 0x1f ) | ( str_Input_7_bits [i*8 + 3] << 5 ) ;
if ( i*8 + 3 < length - 1)
temp [i*7 + 3] = ( ( str_Input_7_bits [i*8 + 3] >> 3 ) & 0x0f ) | ( str_Input_7_bits [i*8 + 4] << 4 ) ;
if ( i*8 + 4 < length - 1)
temp [i*7 + 4] = ( ( str_Input_7_bits [i*8 + 4] >> 4 ) & 0x07 ) | ( str_Input_7_bits [i*8 + 5] << 3 ) ;
if ( i*8 + 5 < length -1 )
temp [i*7 + 5] = ( ( str_Input_7_bits [i*8 + 5] >> 5 ) & 0x03 ) | ( str_Input_7_bits [i*8 + 6] << 2 ) ;
if ( i*8 + 6 < length - 1)
temp [i*7 + 6] = ( ( str_Input_7_bits [i*8 + 6] >> 6 ) & 0x01 ) | ( str_Input_7_bits [i*8 + 7] << 1 ) ;

if ( (i*8 + 0) == length-1)
temp [i*7 + 0] = ( ( str_Input_7_bits [i*8 + 0] >> 0 ) & 0x7f );
if ( (i*8 + 1) == length-1)
temp [i*7 + 1] = ( ( str_Input_7_bits [i*8 + 1] >> 1 ) & 0x3f ) ;
if ( (i*8 + 2) == length-1)
temp [i*7 + 2] = ( ( str_Input_7_bits [i*8 + 2] >> 2 ) & 0x1f ) ;
if ( (i*8 + 3) == length-1)
temp [i*7 + 3] = ( ( str_Input_7_bits [i*8 + 3] >> 3 ) & 0x0f ) ;
if ( (i*8 + 4) == length-1)
temp [i*7 + 4] = ( ( str_Input_7_bits [i*8 + 4] >> 4 ) & 0x07 ) ;
if ( (i*8 + 5) == length-1)
temp [i*7 + 5] = ( ( str_Input_7_bits [i*8 + 5] >> 5 ) & 0x03 ) ;
if ( (i*8 + 6) == length-1 )
temp [i*7 + 6] = ( ( str_Input_7_bits [i*8 + 6] >> 6 ) & 0x01 ) ;


int iNewLength = length*7/8 + ((length%8) ? 1Blush | :O ) ;
iNewLength = 2 * iNewLength ;

for ( i = 0 ; i <iNewLength ; i=i+2 )
{
result [i] = ( temp [i/2] >> 4 ) & 0x0f ;
result [i+1] = ( temp [i/2] >> 0 ) & 0x0f ;
}

for ( i = 0 ; i < iNewLength ; i ++ )
{

if ( result [i] >= 0 && result [i] <=9 )
{
result [i] = result [i] + '0' ;
}

else
{
result [i] = result [i] - 10 + 'A';
}

}

CString str_Output_8_bits = CString ( result, iNewLength );

return str_Output_8_bits;

}


Papa


while (TRUE)
Papa.WillLove ( Bebe ) ;
GeneralRe: string to PDU hex conversion function Pin
HouseSparrow27-Jun-04 22:51
HouseSparrow27-Jun-04 22:51 
GeneralOpenfile dialog box Pin
x-trate22-Jun-04 2:03
x-trate22-Jun-04 2:03 
GeneralRe: Openfile dialog box Pin
P-Rex22-Jun-04 2:16
P-Rex22-Jun-04 2:16 
GeneralRe: Openfile dialog box Pin
David Crow22-Jun-04 2:26
David Crow22-Jun-04 2:26 
GeneralRe: Openfile dialog box Pin
gamitech22-Jun-04 12:55
gamitech22-Jun-04 12:55 
GeneralShowing Multiple frames together Pin
nitinveda22-Jun-04 1:52
nitinveda22-Jun-04 1:52 
QuestionAre there good security code for Win32 system objects ? Pin
vgrigor122-Jun-04 1:24
vgrigor122-Jun-04 1:24 
GeneralCompiling Program in Release mode Pin
DjChris1422-Jun-04 1:17
DjChris1422-Jun-04 1:17 
GeneralRe: Compiling Program in Release mode Pin
David Crow22-Jun-04 2:33
David Crow22-Jun-04 2:33 
QuestionHow do change Dialog Box font name, size in runtime Pin
baskarchinnu22-Jun-04 0:40
baskarchinnu22-Jun-04 0:40 
AnswerRe: How do change Dialog Box font name, size in runtime Pin
Johan Rosengren22-Jun-04 2:47
Johan Rosengren22-Jun-04 2:47 
GeneralThere is no source code available for the current location Pin
dolph_loe22-Jun-04 0:39
dolph_loe22-Jun-04 0:39 
GeneralRe: There is no source code available for the current location Pin
El'Cachubrey22-Jun-04 20:57
El'Cachubrey22-Jun-04 20:57 
GeneralRe: There is no source code available for the current location Pin
dolph_loe25-Jun-04 0:13
dolph_loe25-Jun-04 0:13 
GeneralDock one CDialog into one other during runtime&#8230; Pin
anderslundsgard22-Jun-04 0:37
anderslundsgard22-Jun-04 0:37 
GeneralRe: Dock one CDialog into one other during runtime&#8230; Pin
anderslundsgard22-Jun-04 0:38
anderslundsgard22-Jun-04 0:38 
QuestionHow to copy directory from one drives to other Pin
ThatsAlok22-Jun-04 0:07
ThatsAlok22-Jun-04 0:07 

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.