coda
10-04-2003, 09:20 PM
i have an MFC exe (SDI) and several dialogs within this SDI. Based on the inputs from this dialog, i will draw graphics onto SDI window. Problem is, i was coding say drawing a rectangle in my View.cpp under ONPAINT(), so when i tried to set the criteria in this function:
if(m_dialog.DoModal()==IDOK){
then i draw...glbegin
..
...
..
..
glend}
but erm i get assertion error. the main point is, I do not want the window to have an image when i start running the program but rather after user open program and open dialog and then click say "OK" on dialog then thw view will show something...so i not sure whether i did the correct thing by coding my drawing in the view or should i code in my dialogs.cpp then point to SDI to view? need advice please and i am a beginner to this programming stuff...
if(m_dialog.DoModal()==IDOK){
then i draw...glbegin
..
...
..
..
glend}
but erm i get assertion error. the main point is, I do not want the window to have an image when i start running the program but rather after user open program and open dialog and then click say "OK" on dialog then thw view will show something...so i not sure whether i did the correct thing by coding my drawing in the view or should i code in my dialogs.cpp then point to SDI to view? need advice please and i am a beginner to this programming stuff...