Click here to Skip to main content
15,920,836 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDialog Handle Pin
max_gundam152-Dec-04 14:05
max_gundam152-Dec-04 14:05 
GeneralRe: Dialog Handle Pin
David Crow3-Dec-04 2:26
David Crow3-Dec-04 2:26 
GeneralC++ dll into visual basic - expert needed! Pin
hemenders2-Dec-04 13:38
hemenders2-Dec-04 13:38 
Generaldetermine the menu option selected Pin
Araj012-Dec-04 12:23
Araj012-Dec-04 12:23 
GeneralRe: determine the menu option selected Pin
Maximilien2-Dec-04 12:31
Maximilien2-Dec-04 12:31 
GeneralRe: determine the menu option selected Pin
Araj012-Dec-04 12:37
Araj012-Dec-04 12:37 
GeneralRe: determine the menu option selected Pin
Maximilien2-Dec-04 13:50
Maximilien2-Dec-04 13:50 
GeneralRe: determine the menu option selected Pin
David Crow3-Dec-04 2:32
David Crow3-Dec-04 2:32 
Menu items f, g, and h each have their own handler function. In that handler function is where you can create an instance of the dialog object and pass it one of three values. Make sense?

Here's an example:

BEGIN_MESSAGE_MAP(CMyDoc, CDocument)
	//{{AFX_MSG_MAP(CMyDoc)
	ON_COMMAND(ID_ITEM_ADD, OnItemAdd)
	ON_COMMAND(ID_ITEM_EDIT, OnItemEdit)
	ON_COMMAND(ID_ITEM_DELETE, OnItemDelete)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
 
void CMyDoc::OnItemAdd() 
{
    CMyDialog dlg(1);
    dlg.DoModal();
}
 
void CMyDoc::OnItemEdit() 
{
    CMyDialog dlg(2);
    dlg.DoModal();
}
 
void CMyDoc::OnItemDelete() 
{
    CMyDialog dlg(3);
    dlg.DoModal();
}



"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


GeneralRe: determine the menu option selected Pin
Araj013-Dec-04 5:54
Araj013-Dec-04 5:54 
GeneralRe: determine the menu option selected Pin
David Crow3-Dec-04 7:53
David Crow3-Dec-04 7:53 
GeneralRe: determine the menu option selected Pin
Araj013-Dec-04 7:58
Araj013-Dec-04 7:58 
GeneralRe: determine the menu option selected Pin
David Crow3-Dec-04 8:17
David Crow3-Dec-04 8:17 
GeneralRe: determine the menu option selected Pin
Araj013-Dec-04 8:28
Araj013-Dec-04 8:28 
GeneralRe: determine the menu option selected Pin
David Crow3-Dec-04 9:01
David Crow3-Dec-04 9:01 
GeneralRe: determine the menu option selected Pin
Araj013-Dec-04 9:28
Araj013-Dec-04 9:28 
GeneralRe: determine the menu option selected Pin
David Crow3-Dec-04 9:31
David Crow3-Dec-04 9:31 
Generaldsp-file for Visual Studio 6.0 Pin
Reinhold442-Dec-04 11:01
Reinhold442-Dec-04 11:01 
Generalkilled for free std::string, Help please. I will give rate Pin
LongIsland2-Dec-04 10:48
LongIsland2-Dec-04 10:48 
GeneralRe: killed for free std::string, Help please. I will give rate Pin
John R. Shaw2-Dec-04 15:08
John R. Shaw2-Dec-04 15:08 
GeneralRe: killed for free std::string, Help please. I will give rate Pin
Maximilien2-Dec-04 16:19
Maximilien2-Dec-04 16:19 
Generalremoving the Main Frame title bar in a SDI Pin
kdehairy2-Dec-04 10:42
kdehairy2-Dec-04 10:42 
GeneralRe: removing the Main Frame title bar in a SDI Pin
David Crow2-Dec-04 10:45
David Crow2-Dec-04 10:45 
GeneralRe: removing the Main Frame title bar in a SDI Pin
kdehairy2-Dec-04 10:54
kdehairy2-Dec-04 10:54 
GeneralRe: removing the Main Frame title bar in a SDI Pin
Graham Bradshaw2-Dec-04 11:03
Graham Bradshaw2-Dec-04 11:03 
GeneralRe: removing the Main Frame title bar in a SDI Pin
kdehairy2-Dec-04 22:08
kdehairy2-Dec-04 22:08 

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.