minifiredragon
Programmer
Ok, I am now beginning to feel like a ninny.
I thought that when a dialog box closes (with Ok or Cancel) it passes an UpdateData to the next window. When I put an OnUpdate and code in there, it doesn't do anyhting. Here is what I am doing.
I have a CFormView Window starting with the appilcation (I am using an SDI w/database support). I finally got it set up so that when you push a certain key a dialog box opens up and asks you to input data via an edit box. Then you push OK (or Cancel) if you change your mind.
Now I added a static box to see if I have properly learned how to access data from a dialog box. But it never updates itself. I know it gets the data, but it never refreshes.
I used OnUpdate, and WM_SETFOCUS to update the static box when the dialog box is closed. But know.
How do I know it works?? I had this bit of code in there:
if ( m_dInsertDlg.DoModal () == IDOK )
m_sCard = m_dInsert.m_sCardNum;
and everytime I compiled the application the darn Card Number Dialog box opened up 1st, I entered my numbers and pushed ok, and it DID update the static box. But when I pushed the key to enter a card number, entered the number, and pushed OK, it never changed the static box.
I have even tried removing just the:
if ( m_dInsertDlg.DoModal () == IDOK )
It doesn't pop up the box, but it still doesn't update the static text.
So much for thinking I was actually getting somewhere in my knowledge.
In the past, I put my code in the main() section and it looped through that, right now, I have no clue where to put my code so it works like it should.
I thought that when a dialog box closes (with Ok or Cancel) it passes an UpdateData to the next window. When I put an OnUpdate and code in there, it doesn't do anyhting. Here is what I am doing.
I have a CFormView Window starting with the appilcation (I am using an SDI w/database support). I finally got it set up so that when you push a certain key a dialog box opens up and asks you to input data via an edit box. Then you push OK (or Cancel) if you change your mind.
Now I added a static box to see if I have properly learned how to access data from a dialog box. But it never updates itself. I know it gets the data, but it never refreshes.
I used OnUpdate, and WM_SETFOCUS to update the static box when the dialog box is closed. But know.
How do I know it works?? I had this bit of code in there:
if ( m_dInsertDlg.DoModal () == IDOK )
m_sCard = m_dInsert.m_sCardNum;
and everytime I compiled the application the darn Card Number Dialog box opened up 1st, I entered my numbers and pushed ok, and it DID update the static box. But when I pushed the key to enter a card number, entered the number, and pushed OK, it never changed the static box.
I have even tried removing just the:
if ( m_dInsertDlg.DoModal () == IDOK )
It doesn't pop up the box, but it still doesn't update the static text.
So much for thinking I was actually getting somewhere in my knowledge.
In the past, I put my code in the main() section and it looped through that, right now, I have no clue where to put my code so it works like it should.