Home > Back-end >  MFC breakpoint debugging can be, but not execute a program
MFC breakpoint debugging can be, but not execute a program

Time:09-29


Void CFileCom2View: : ontouch * pDC (CDC)
{
CFileCom2Doc * pDoc=GetDocument ();
ASSERT_VALID (pDoc);
//TODO: add the draw code for native data here


CRect rc;
GetClientRect (& amp; Rc);
PDC - & gt; FillSolidRect (& amp; Rc, RGB (0150, 0));

CBitmap bitmap [39].

BITMAP bmp1 [39].
CRect the rect.

The CDC dcCompatible;
GetClientRect (& amp; The rect);
DcCompatible. CreateCompatibleDC (pDC);
for(int j=0; j<37. J++)
{

Bitmap [j] LoadBitmap (IDB_BITMAP1 + j);//strcat (str1, str2 [j]));
Bitmap [j] GetBitmap (& amp; Bmp1 [j]);
DcCompatible. SelectObject (& amp; Bitmap [j]);
PDC - & gt; BitBlt (pt1 [j]. J x, pt1 [j]. J y, the rect. The Width (), the rect. Height (), & amp; DcCompatible, 0, 0, SRCCOPY);
}


Bitmap [37]. LoadBitmap (IDB_BITMAP38);//strcat (str1, str2 [j]));
Bitmap [37]. GetBitmap (& amp; Bmp1 [37]);
DcCompatible. SelectObject (& amp; Bitmap [0]);
PDC - & gt; BitBlt (pt [0]. X, pt [0]. J y, the rect. The Width (), the rect. Height (), & amp; DcCompatible, 0, 0, SRCCOPY);


for (j=0; j
//if (fapaiFlag==1)
{
MessageBox (" ");
DcCompatible. SelectObject (& amp; Bitmap [ID [j]]);//[cd_current. ID]);
PDC - & gt; BitBlt (pt [0]. X, pt. [0] y + 77 * (1 + j), the rect. The Width (), the rect. Height (), & amp; DcCompatible, 0, 0, SRCCOPY);
//fapaiFlag=0;
}
DcCompatible. SelectObject (& amp; Bitmap [37]);
PDC - & gt; BitBlt (pt [0]. X, pt. [0] y + 77 * (1 + j), the rect. The Width (), the rect. Height (), & amp; DcCompatible, 0, 0, SRCCOPY);

}

for(j=0; j
Void CFileCom2View: : OnLButtonDown (UINT nFlags, CPoint point)
{
If (nFlags==MK_LBUTTON)
{
//char string;
X1=point. X;//x
X2=point. Y;/////y horizontal
If (x2 & lt; 651 & amp; & X2 & gt; 509 & amp; & X2!
=580){int I=0;
If (x2 & gt; 580)
{
For (I=0; i<19. I++)
If (x1 & lt; Pt1 [I]. X + 96 & amp; & The x1 & gt; Pt1 [I]. X + 36)//brand x range out of the for loop
{fapaiFlag=1; break; }
Else if (I==18 & amp; & The x1 & lt; Pt1 [I]. X + 96 & amp; & The x1 & gt; Pt1 [I]. X)
{fapaiFlag=1; break; }

}

The else
{
For (I=19; i<38; I++)
If (x1 & lt; Pt1 [I]. X + 96 & amp; & The x1 & gt; Pt1 [I]. X + 36)//brand x range out of the for loop
{fapaiFlag=1; break; }
Else if (I==36 & amp; & The x1 & lt; Pt1 [I]. X + 96 & amp; & The x1 & gt; Pt1 [I]. X)
{fapaiFlag=1; break; }
}
If (fapaiFlag==1)
{
ID [T_num]=I;//which is pressed the card
T_num + +;

//Sleep (1000);
//string=itoa (ii);

}
}
}
The CView: : OnLButtonDown (nFlags, point);

}

CodePudding user response:


When I a breakpoint on the void CFileCom2View: : OnLButtonDown (UINT nFlags, CPoint point) of the
T_num + +; , left-click the mouse after the program is running to the breakpoint, then perform at full speed to get into the for (j=0; j

CodePudding user response:

I know the reason
  • Related