Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with OnSize

Status
Not open for further replies.

ltsi

Programmer
Jul 10, 2003
7
FR
I have an important when using the Windows Message Handler OnSize() in my CView class.
I have the following code:

for(int i=0; i<doc->GetNbElecProf(); i++)
{
CPoint point1;
CPoint point2;
point1.x=COIN_X+(i%(doc->GetNbElecProf()/7))*(TAILLE_X_PROF);
point1.y=COIN_Y+(i/(doc->GetNbElecProf()/7))*(TAILLE_Y_PROF);
ClientToScreen(&point1);
point2.x=COIN_X+(i%(doc->GetNbElecProf()/7))*(TAILLE_X_PROF)+(TAILLE_X_PROF);
point2.y=COIN_Y+(i/(doc->GetNbElecProf()/7))*(TAILLE_Y_PROF)+TAILLE_Y_PROF;
ClientToScreen(&point2);
CRect clRectl(point1.x,point1.y,point2.x,point2.y);
if :):IsWindow(m_Graph->m_hWnd) && m_Graph->IsWindowVisible ())
m_Graph->MoveWindow (clRectl);
}

It enables the creation of small windows (representing a chart) within the mainframe (CView).
But when I use another computer , the size does not seem adapted anymore and I can't see all the small windows.
How can i di?
If someone can help me, I would be very happy.
Thanks.
Ltsi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top