In this example only one vtable will be created which (ignoring RTTI) will contain a pointer to the single virtual function A::fun. The constructor (implicitly generated by the compiler) will set the vtable pointer in class A's instance data to point to this table. If B had overridden this method then there would be another vtable for class B and B's constructor would replace the vtable pointer (set in A) with a pointer to B's vtable.
Make a dialog box as you want. Now create this dialog using DoModal() in a thread function. Just initiate that thread when you want to show that dialog and kill the thread when you want to make the dialog disappeared.
sir thanks for reply
but it does not work as i use this in oninitdialog function
whwre m_spin is variable of spin control
and m_edit is variable of edit control.
ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN1, OnDeltaposSpin1)
//add in the header file
afx_msg void OnDeltaposSpin1(NMHDR *pNMHDR, LRESULT *pResult);
and copy and paste the code for the implementation of the function as in my above post.
You can right click on the spin control if you are working with an MFC Dialog based application and then go to property window to implement this function.
Declaring functions/definitions are more error prone if they are done by hand and are not recommended.
Somethings seem HARD to do, until we know how to do them. _AnShUmAn_