Set a break point at the line containing the " for" statement, so that we can step into the code while the window is being drawn. Int y = (rect.Height() - cyIcon + 1) / 2 ĭc.TextOut( 200,i, " THIS IS DRAWED STEP BY STEP!") Int cyIcon = GetSystemMetrics(SM_CYICON) Int cxIcon = GetSystemMetrics(SM_CXICON) SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0) If you don't have VC++ installed in the remote machine ( it's not required :) ), you need to copy the following files to the system directory of the remote computer:ĬPaintDC dc( this) // device context for painting The first thing you need to do is install the remote debugger in the remote machine. To explain how this VC++ feature works, we are going to use the sample project provided with this article. The remote debugger enables you to execute your app in one machine while you step into the code in another machine. MS VC++ has a workaround to this problem called remote debugger. ![]() This situation is very common in directX programming too, where the program needs to use fullscreen mode and doesn't allow you to switch to VC++. ![]() When this happens, your onpaint event is lost and you can't even see what's happening during the painting process. The problem is that when you set up a break point in the OnPaint message handler, the focus of the window goes to the VC++ environment. ![]() Most of the developers that work with graphic applications or work with applications that have full-screen window sometimes need to know exactly what is going on behind the OnPaint function or any other screen-drawing function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |