How do i load an Icon in a dialog based application.

i want to show the dialog based application on status bar.
I have declared a HICON protected member variable in the new created  dialog and used AfxGetApp->LoadIcon function ,
in the constructor and then SetIcon in the Initdialog function.
My application is visible in the status bar for the default
dialog box, as soon as i click ok button of first dialog , to load the next dialog, my dialog comes up but the application is not visible in the status bar.
Could u please help...
Who is Participating?
arunprakashConnect With a Mentor Commented:
Hi da.

        First check on the handler of the ok button whether ur closing the Dialog.
By default if u call the CDialog::OnOK() it will close the dialog.Then check the property of the dialog in the dialog editor. Set the style to Overlapped.
chari112598Author Commented:
I have changed the property of the second dialog to overlapped but it does not work.
I am calling the default CDialog::OnOk() to close the dialog .
chari112598Author Commented:
I checked ur suggestion but it does not work.

hey i told to change the style for the main dialog and not the second dialog
chari112598Author Commented:
Its working fine even without making the first dialog style to overlapped.
Thank you very much.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.