JB3DG
Resource contributor
- Messages
- 1,325
- Country

This one is for guys like virtuali and other GDI+ programmers.
Some of the users of my WX radar gauge are getting a really odd crash in the gauge constructor where I initialize the GDI+ objects in my gauge. It is an extremely rare error as hardly anyone gets it and I cannot replicate it. The only way I figured out where it was coming from was by tracing offsets in the disassembler in my dll.
The exact line is the dPen->SetDashPattern(dv, 4); call. I cannot fathom what could cause it to wrong for one person when it works for so many others.
Anyone got any ideas?
Some of the users of my WX radar gauge are getting a really odd crash in the gauge constructor where I initialize the GDI+ objects in my gauge. It is an extremely rare error as hardly anyone gets it and I cannot replicate it. The only way I figured out where it was coming from was by tracing offsets in the disassembler in my dll.
Code:
dPen = new Pen(Color(255, 94, 183, 255), 2);
lBrush = new SolidBrush(Color(255, 94, 183, 255));
REAL dv[4] = {3.0f, 4.0f, 3.0f, 4.0f};
dPen->SetDashPattern(dv, 4);
wxfont = new Font(L"Glass Gauge", 20.0f, FontStyleRegular, UnitPixel );
wx2font = new Font(L"Arial", 20.0f, FontStyleRegular, UnitPixel );
The exact line is the dPen->SetDashPattern(dv, 4); call. I cannot fathom what could cause it to wrong for one person when it works for so many others.
Anyone got any ideas?

