Disapearing Ink?

  • Thread starter Thread starter a_unique_name
  • Start date Start date
A

a_unique_name

Guest
Hi Folks:

Developing on Windows 10 Pro, VS 2017 Community, all C++, Win32, no MFC.

My application produces a report. The same function draws the report on a display or to a printer.

A user might produce multiple reports during the time the program is running.

Lines are drawn to separate sections of the report and practically every number is surrounded by a black rectangle.

This starts out fine, and can work great for a lot of reports. Then, for some reason, the lines and rectangles stop being displayed.

I have code to simulate a user in order to test the application. Thousands of reports can be generated while running a test. These start out fine, but after 5, 10 or 100 reports, all of the lines and rectangles disappear while the text in the reports is just fine.

I've proceeded a call to Rectangle() with the following in an effort to figure out what's causing this:

#ifdef _DEBUG

COLORREF current_pen_color = SetDCPenColor(hdc, 0x00);

if (current_pen_color != 0)
{
int test_x = 0;
}

SetDCPenColor(hdc, current_pen_color);
#endif

Rectangle(hdc, rectangle_frame.left,
rectangle_frame.top,
rectangle_frame.right,
rectangle_frame.bottom);



My plan is to see when the pen color stopped being black, but a break point at the test_x = 0 line is never triggered.

Suggestions on what I'm doing wrong, or how I might track down the issue are appreciated.

Thanks
Larry

Continue reading...
 
Back
Top