Re: dialog and other probs
Hi,
Concerning the calendar control, you can use it in your app, and you need to make it appear in your workspace so you can use it. (Sorry, but I'm not sure how to do that. Try doing whatever it was you did before.)
Concerning where to call the Logon dialog, it makes more sense to put the call in InitInstance(), because that will give you greater control over program flow. You can, however, make it work if you put the call in OnCreate for CMainFrame.
Concerning the password dialog, if you want the first edit box to have focus, put it first in the tab order (to set the tab order, goto Layout->Tab Order, or press CTRL+D). To have the user press enter after entering the first password and have focus set to the next edit box requires a bit of trickery. First, make sure the OK button is the default button. Second, Override the OnOK() member function, and call UpdateData(). Then, check to see if the second edit box's variable (m_strPwdConfirm, or whatever) is empty by calling m_strPwdConfirm.IsEmpty(). If it is empty, call SetFocus() for the second edit box, and return from the function without calling CDialog::OnOK(). If the second password is not empty, than compare the two passwords. If they are not equal, then tell the user (MessageBox works well), and return without calling the base class version of OnOK(). Otherwise, just continue on, and allow it to close.
I hope this helps.
Daniel.
Re: dialog and other probs
Hi.
1) When you want to add ActiveX control like Canledar control, Project->Add to project->Componet(?)
and choose the ActiveX control which you want to add. VC asks you to the class name which you want to use.
After this, control toolbar has the ActiveX control which you did.
However, after this, you may face more diffcult problem?
2) When I made a password dialog, I use loop to generate the dialog. However, the provious post mehod seems to be better.
In my case, the program tries to read user name and password from txt file and compare the data. Also, the databasse will
be available. I want to manupulate the password and user id later programmtically because if we write the data in the code,
we can't change it later.
Hope for help.
-Masaaki Onishi-
Re: dialog and other probs
Thank you for your responses. That is exactly what I was looking for.
Mark