Hello, I hope that somebody can help me, the thing is this:
the context: my application has one main dialog and one non-main dialog.
the question:
When I press a specific button in the non-main dialog, a line has to be drawn in the client area of the main dialog. how can I do this?
Actually I have a method declared as public and defined in the main dialog class (an instance from Cdialog let's say) to draw my lines, this is the method:
void CCalibracionDlg::BorrarRecta(int Rx,unsigned char D_Ry, unsigned char Vref)
{
CClientDC pDC(this) ;
float tgAng=0,Ry=0; // float porque estas variables tienen cocientes
int x = 0 , y = 0 ,y_=0; // int porque pueden ser mayor q 255
char multiplo=0;
unsigned char indice_recta=0, y_RectaVieja[300]; // con char alcanza
unsigned int pixel=0, PixelRectaVieja[300]; // int porque son de 32bit
pDC.SetWindowOrg(-168,-165); // seteo el origen de coordenadas a ese punto, q es el centro de la grilla
.
.a lot of code that it isn't important for this issue
.
}
Of course when i use this code within the main dialog it works fine, the lines are drawn in the client area of the main dialog, but how can i do to use this code to draw in the client area of the main dialog when i press a button in the non-man dialog? .
Thanks in advance, let me know if you need more information.