Solved

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

Posted on 1999-01-12
5
164 Views
Last Modified: 2010-04-02
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...
0
Comment
Question by:chari112598
  • 3
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
arunprakash earned 100 total points
ID: 1181932
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.
thanx,
bye
0
 

Author Comment

by:chari112598
ID: 1181933
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 .
0
 

Author Comment

by:chari112598
ID: 1181934
I checked ur suggestion but it does not work.

0
 
LVL 1

Expert Comment

by:arunprakash
ID: 1181935
hey i told to change the style for the main dialog and not the second dialog
0
 

Author Comment

by:chari112598
ID: 1181936
Its working fine even without making the first dialog style to overlapped.
Thank you very much.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question