Click here to Skip to main content
16,005,114 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Finding the User privileges on a windows OS Pin
JudyL_MD24-Oct-07 2:59
JudyL_MD24-Oct-07 2:59 
GeneralRe: Finding the User privileges on a windows OS Pin
Prasann Mayekar24-Oct-07 19:11
Prasann Mayekar24-Oct-07 19:11 
AnswerRe: Finding the User privileges on a windows OS Pin
NiceNaidu23-Oct-07 23:28
NiceNaidu23-Oct-07 23:28 
GeneralRe: Finding the User privileges on a windows OS Pin
junkMind23-Oct-07 23:45
junkMind23-Oct-07 23:45 
AnswerRe: Finding the User privileges on a windows OS Pin
junkMind25-Oct-07 21:21
junkMind25-Oct-07 21:21 
QuestionHow to disable mouse click in HTML view [modified] Pin
aaaan23-Oct-07 23:00
aaaan23-Oct-07 23:00 
QuestionWhy wizards generate enum IDD for dialogs? Pin
NiceNaidu23-Oct-07 22:31
NiceNaidu23-Oct-07 22:31 
AnswerRe: Why wizards generate enum IDD for dialogs? Pin
Naveen23-Oct-07 23:08
Naveen23-Oct-07 23:08 
NiceNaiduCan somebody tell me the reason ,Why wizards generate enum IDD for dialogs?


The IDD enum of a dialog class contains the ID of dialog in the resource.

enum { IDD = IDD_MYDLG_DIALOG };

This IDD is passed in the constructor of your dialog to CDialog constructor.

CMyDlg::CMyDlg(CWnd* pParent /*=NULL*/)<br />
	: CDialog(CMyDlg::IDD, pParent)<br />
{<br />
}


You can simply get the ID of the dialog with a statement like CMyDlg::IDD

So when creating a dialog, we can use like

CMydlg dlg;<br />
dlg.Create( CMydlg::IDD, 0 )


Instead of

CMydlg dlg;<br />
Dlg.Create( IDD_MYDLG_DIALOG, 0 )


When MFC was initially developed a statement like the below one was not supported.

Class CMyDlg: public CDialog<br />
{<br />
  ....<br />
<br />
  public:<br />
  static const DWORD IDD = IDD_MYDLG_DIALOG;<br />
}


Also the trick of keeping an enum doesnt increase the memory size of object Smile | :)




GeneralRe: Why wizards generate enum IDD for dialogs? Pin
NiceNaidu24-Oct-07 3:20
NiceNaidu24-Oct-07 3:20 
QuestionCHTMLView and Compound File (IStorage) Pin
sdancer7523-Oct-07 21:03
sdancer7523-Oct-07 21:03 
Questiontypes of DLL... Pin
himuskanhere23-Oct-07 20:49
himuskanhere23-Oct-07 20:49 
AnswerRe: types of DLL... Pin
Paresh Chitte23-Oct-07 22:07
Paresh Chitte23-Oct-07 22:07 
AnswerRe: types of DLL... Pin
Sameerkumar Namdeo23-Oct-07 22:51
Sameerkumar Namdeo23-Oct-07 22:51 
GeneralRe: types of DLL... Pin
Paresh Chitte23-Oct-07 23:32
Paresh Chitte23-Oct-07 23:32 
QuestionHow to store data of distinct datatype in one object? Pin
manish.patel23-Oct-07 20:35
manish.patel23-Oct-07 20:35 
AnswerRe: How to store data of distinct datatype in one object? Pin
Cedric Moonen23-Oct-07 20:51
Cedric Moonen23-Oct-07 20:51 
GeneralRe: How to store data of distinct datatype in one object? Pin
manish.patel23-Oct-07 21:10
manish.patel23-Oct-07 21:10 
GeneralRe: How to store data of distinct datatype in one object? Pin
Cedric Moonen23-Oct-07 21:16
Cedric Moonen23-Oct-07 21:16 
GeneralRe: How to store data of distinct datatype in one object? Pin
manish.patel23-Oct-07 21:22
manish.patel23-Oct-07 21:22 
GeneralRe: How to store data of distinct datatype in one object? Pin
Cedric Moonen23-Oct-07 21:27
Cedric Moonen23-Oct-07 21:27 
QuestionRe: How to store data of distinct datatype in one object? Pin
manish.patel23-Oct-07 22:39
manish.patel23-Oct-07 22:39 
AnswerRe: How to store data of distinct datatype in one object? Pin
Cedric Moonen23-Oct-07 22:49
Cedric Moonen23-Oct-07 22:49 
GeneralRe: How to store data of distinct datatype in one object? Pin
manish.patel23-Oct-07 23:37
manish.patel23-Oct-07 23:37 
QuestionRe: How to store data of distinct datatype in one object? Pin
Hamid_RT23-Oct-07 21:06
Hamid_RT23-Oct-07 21:06 
AnswerRe: How to store data of distinct datatype in one object? Pin
manish.patel23-Oct-07 21:14
manish.patel23-Oct-07 21:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.