Click here to Skip to main content
15,887,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to load bitmap Pin
Richard MacCutchan10-May-13 3:42
mveRichard MacCutchan10-May-13 3:42 
SuggestionRe: How to load bitmap Pin
David Crow10-May-13 6:00
David Crow10-May-13 6:00 
AnswerRe: How to load bitmap Pin
ThatsAlok20-May-13 23:54
ThatsAlok20-May-13 23:54 
QuestionVideo display gets corrupted, Plays grey only? Pin
mbatra319-May-13 21:34
mbatra319-May-13 21:34 
AnswerRe: Video display gets corrupted, Plays grey only? Pin
SoMad10-May-13 8:22
professionalSoMad10-May-13 8:22 
QuestionQuestion about Streamin CrichEditCtrl Pin
ForNow9-May-13 6:27
ForNow9-May-13 6:27 
AnswerRe: Question about Streamin CrichEditCtrl Pin
Richard MacCutchan9-May-13 7:06
mveRichard MacCutchan9-May-13 7:06 
GeneralRe: Question about Streamin CrichEditCtrl Pin
ForNow9-May-13 18:54
ForNow9-May-13 18:54 
C++
static DWORD CALLBACK readlisting(
         DWORD dwCookie,      // (in) pointer to CFile
         LPBYTE pbBuff,       // (in) pointer to the destination buffer
         LONG cb,             // (in) size in bytes of the destination buffer
        LONG FAR *pcb        // (out) number of bytes transfered
       )
 {
  UNREFERENCED_PARAMETER(cb);
          static BOOL flag = 0;
 //        LPCTSTR lpch;
		 int length;
        // CString buffer((LPCTSTR) lpch,135);
		 CString buffer; 
              //   char *holdptr;
                                 LPBYTE holdptr1;
                 int n;
                 CStdioFile* pFile = (CStdioFile*) dwCookie;

         switch (flag)
                 {
                 case 0:


                         flag = 1;


                                                do {
                                                     pFile->ReadString(buffer);
                                                    } while(buffer.Find((LPCTSTR)"CSECT") == -1);
                        length = buffer.GetLength();                                  
                        strcpy((char *) pbBuff,(char *)buffer.GetBuffer(length));
						holdptr1 = pbBuff + length;
						memcpy(holdptr1,"\r\n",2);
                          //     *pcb = 135;                // 87 btes transfer
							*pcb = length;
                        return 0;
                         break;
                 case 1:

                                                 while(TRUE)
                                                 {
                                                  pFile->ReadString(buffer);
												                                           length = buffer.GetLength();
                                                 if(buffer.Find((LPCTSTR)"END") > 0)
												 {
													                                        *pcb = 0;              // finish it up
                                                          return 0;          //
												 }
                  if(buffer.Find((LPCTSTR) "  ") < 2 || buffer.Find((LPCTSTR) "    ")    
                                                  ==7)          // no Location counter or opcode 
                                                 {
                                                  memset(pbBuff,0x20,135);
                                                  strcpy((char *)pbBuff,"  ");
                                                  holdptr1 =  pbBuff + 2;
                                                  memcpy(holdptr1,buffer.GetBuffer(length),length);
                                                  holdptr1 = holdptr1 + length;
                                                  memcpy(holdptr1,"\r\n",2);
                                                  *pcb = length + 2;
                                                         return 0;
                                                 }
                                                 else
                                                 {
												                                         n = buffer.Find((LPCTSTR) "    ");
                                                  memset(pbBuff,0x20,135);
                                                  strcpy((char *)pbBuff,"_ ");
                                                  holdptr1 =  pbBuff + 2;
                                                  memcpy(holdptr1,buffer.GetBuffer
                                                  (length),length);  // copy over location counter
                                                  holdptr1 = holdptr1 + length;
                                                   memcpy(holdptr1,"\r\n",2);
                                                   *pcb  = length + 2;
                                                   return 0;
                                                 }
                                                                                                 }
                 }
      return 0;
 }

GeneralRe: Question about Streamin CrichEditCtrl Pin
Richard MacCutchan9-May-13 20:49
mveRichard MacCutchan9-May-13 20:49 
GeneralRe: Question about Streamin CrichEditCtrl Pin
ForNow10-May-13 3:06
ForNow10-May-13 3:06 
GeneralRe: Question about Streamin CrichEditCtrl Pin
Richard MacCutchan10-May-13 3:40
mveRichard MacCutchan10-May-13 3:40 
GeneralRe: Question about Streamin CrichEditCtrl Pin
ForNow10-May-13 9:33
ForNow10-May-13 9:33 
QuestionRe: Question about Streamin CrichEditCtrl Pin
Richard MacCutchan10-May-13 21:58
mveRichard MacCutchan10-May-13 21:58 
Questionhow to get self in c++ 21day book source code ? Pin
reytc8-May-13 3:13
reytc8-May-13 3:13 
AnswerRe: how to get self in c++ 21day book source code ? Pin
David Crow8-May-13 4:19
David Crow8-May-13 4:19 
AnswerRe: how to get self in c++ 21day book source code ? Pin
Richard MacCutchan8-May-13 4:57
mveRichard MacCutchan8-May-13 4:57 
AnswerRe: how to get self in c++ 21day book source code ? Pin
Malli_S9-May-13 3:27
Malli_S9-May-13 3:27 
AnswerRe: how to get self in c++ 21day book source code ? Pin
scottgp9-May-13 3:46
professionalscottgp9-May-13 3:46 
AnswerRe: how to get self in c++ 21day book source code ? Pin
Amarnath S9-May-13 21:58
professionalAmarnath S9-May-13 21:58 
Questionintialisation of charecter array Pin
Coder Block7-May-13 19:54
Coder Block7-May-13 19:54 
AnswerRe: intialisation of charecter array Pin
Richard MacCutchan7-May-13 20:45
mveRichard MacCutchan7-May-13 20:45 
GeneralRe: intialisation of charecter array Pin
Coder Block7-May-13 20:54
Coder Block7-May-13 20:54 
GeneralRe: intialisation of charecter array Pin
Richard MacCutchan7-May-13 21:56
mveRichard MacCutchan7-May-13 21:56 
AnswerRe: intialisation of charecter array Pin
rxylinux8-May-13 4:55
rxylinux8-May-13 4:55 
AnswerRe: intialisation of charecter array Pin
ThatsAlok20-May-13 23:46
ThatsAlok20-May-13 23:46 

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.