Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In mfc dialog based application i draw one graph on picture control and plot points as i needed,but problem is whenever i resize dialog that picture control remained as it is and looked weired! I can write some code on event of 0nSize() of dialog but it only resize other controls except picture control, so how to make changes on event of size changes of dialog?

C++
RECT rc;
GetClientRect(&rc);
rc.top+=25;
rc.bottom-=80;
rc.left+=15;
rc.right+=15;

GetDlgItem(IDC_PIC1)->MoveWindow(&rc);

Above i paste some code which i tried so much but not working,please give me any idea for that!
Posted
Comments
CPallini 30-Oct-13 3:15am    
What does it mean 'not working', exactly(please be specific)?
rc.right+=15;
Shouldn't that be rc.right-=15;?
Venkat Raghvan 30-Oct-13 5:11am    
Sorry!it mistakly write down + sign.
it's not working for picture control which should resized as dialog resize
Richard MacCutchan 30-Oct-13 6:02am    
Where are you calling the code to redraw your graph?
Venkat Raghvan 30-Oct-13 6:38am    
On Resize event of dialog

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900