July 25, 200619 yr now i have some troubles, "separanting" my code into more files ... i have the "main" file and the "graphics" file ... here's some codemain file:case PANEL_SERVICE_PRE_DRAW: { PELEMENT_STATIC_IMAGE pelement = (PELEMENT_STATIC_IMAGE)(pgauge->elements_list[0]); if( pelement ) { HDC hdc = pelement->hdc; PIXPOINT dim = pelement->image_data.final->dim; if( hdc ) { //risanje DrawSelectedButton( hdc, NewEcamPage, 1 ); } SET_OFF_SCREEN (pelement); } break; }..and the drawing code :)void DrawSelectedButton( HDC hdc, int button, int color ) { int L1_drawX, L1_drawY, L1_drawX2, L1_drawY2; int L2_drawX, L2_drawY, L2_drawX2, L2_drawY2; int L3_drawX, L3_drawY, L3_drawX2, L3_drawY2; int lineLength = 20; int lineVSpacing = 1; Graphics graphics(hdc); . . . //DRAWING graphics.DrawLine( &belo, L1_drawX, L1_drawY, L1_drawX2, L1_drawY2 ); graphics.DrawLine( &belo, L2_drawX, L2_drawY, L2_drawX2, L2_drawY2 ); graphics.DrawLine( &belo, L3_drawX, L3_drawY, L3_drawX2, L3_drawY2 ); }and here is the link too all the code!http://tistidrugi.com/~tilentur/slike/A320...ageSelector.rarTnx in advance!
July 26, 200619 yr huh! Finaly i found the solution ... you must define PEN only after you created Graphics! here's exampleThe right way!....Graphics graphics(hdc);Pen sivo(Color(81, 81, 81, 76));Pen belo(Color(255, 255, 255, 255)); ...The Wrong way...Pen sivo(Color(81, 81, 81, 76));Pen belo(Color(255, 255, 255, 255));Graphics graphics(hdc);...hope this helps someone in future! :D
Create an account or sign in to comment