dialog in a class
-
Hi all, I need to know if there's a way to put a dialog as a data member of a class and, if it's possible, how. Thanx in advance, Desmo16.
Yes, and yes. It is no different than declaring any other data member (say, an
int
, for example). You just have to make sure that if your dialog class needs arguments passed to its constructor that you handle that appropriately.If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac
-
Yes, and yes. It is no different than declaring any other data member (say, an
int
, for example). You just have to make sure that if your dialog class needs arguments passed to its constructor that you handle that appropriately.If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac
well, it's great, but i don't understand what should i write in the class. If for example my dialog's idd is IDD_SORGENTE1 in the class should i write: public: IDD_SORGENTE1 varname; or what else ? In other words i don't know the datatype of a dialog and its name
-
well, it's great, but i don't understand what should i write in the class. If for example my dialog's idd is IDD_SORGENTE1 in the class should i write: public: IDD_SORGENTE1 varname; or what else ? In other words i don't know the datatype of a dialog and its name
Are you wanting something like:
#include "MyDialog.h"
class myclass
{
CMyDialog dlg; // derived from CDialog
};
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
-
well, it's great, but i don't understand what should i write in the class. If for example my dialog's idd is IDD_SORGENTE1 in the class should i write: public: IDD_SORGENTE1 varname; or what else ? In other words i don't know the datatype of a dialog and its name
You need to create a class for your dialog first. If you use the classwizard, it will do it for you. You can then do what David mentioned in his post.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac
-
Hi all, I need to know if there's a way to put a dialog as a data member of a class and, if it's possible, how. Thanx in advance, Desmo16.
You insert a dialog to your resource and now you want to insert calss and data members to it,Right?
_**
**_
WhiteSky