Click here to Skip to main content
15,915,089 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: compilation speed vs6 vs. vs.net 2003 Pin
Antti Keskinen3-Dec-03 3:22
Antti Keskinen3-Dec-03 3:22 
GeneralRe: compilation speed vs6 vs. vs.net 2003 Pin
niklo3-Dec-03 3:56
niklo3-Dec-03 3:56 
Generalopen dialog.. Pin
R. Thomas2-Dec-03 21:23
R. Thomas2-Dec-03 21:23 
GeneralRe: open dialog.. Pin
BaldwinMartin2-Dec-03 22:48
BaldwinMartin2-Dec-03 22:48 
GeneralRe: open dialog.. Pin
R. Thomas3-Dec-03 5:41
R. Thomas3-Dec-03 5:41 
GeneralRe: open dialog.. Pin
BaldwinMartin3-Dec-03 5:50
BaldwinMartin3-Dec-03 5:50 
GeneralRe: open dialog.. Pin
R. Thomas3-Dec-03 15:50
R. Thomas3-Dec-03 15:50 
GeneralRe: open dialog.. Pin
BaldwinMartin4-Dec-03 1:35
BaldwinMartin4-Dec-03 1:35 
Sure you can!

First allow me to say it is a good question, I just did not understand what you wanted. Most of the guys on this site are pro's and have been programming for years, so we sort of understand what we are talking about, and use the ART of the language itself to communicate. This can lead to problems.


Now:
If you look at your IDR_MAINFRAME-> FILE OPEN property you will see the resource ID -> ID_FILE_OPEN right?

Just for fun let's go to the toolbar and create a new button
and select the properties for the new button ID_FILE_OPEN
compile the project and run it.
see the new button calls File open right?

So how does it do it is your question and can I make the call directly, right?
Yes you can

In the app under initistance
enter this at the bottom ject before retrun TRUE;

OpenMyFile();





Now in the app create a new member function

void CMyCoolApp::OpenMyFile()


Enter this code inside your new function.
{
OnFileOpen();
}


It should look like this now.
void CMyCoolApp::OpenMyFile()
{
OnFileOpen();
}

There you go!


Best Wishes and Happy Holiday's,
ez_way

I received your private message and here is a response to it!

HUH?????????
what dialog?????
there is no dialog......

>> The file open box is a dialog!

the question is can i CALL the dilog that comes up when we click : File->Open from the menu that is already given in SDI app by MFC...

>> Yes I told you how above!


that very same open dialog which is made by MFC AppWiard and put inSDI app's menu...

>> I understand

can i call it from my program WITHOUT actually clicking : File->Open
can i call the menu itself from my program without clicking it??

>> Yes!


GeneralOpen Program @ File Pin
Best Friend2-Dec-03 21:22
Best Friend2-Dec-03 21:22 
GeneralRe: Open Program @ File Pin
RChin2-Dec-03 22:32
RChin2-Dec-03 22:32 
GeneralSimple dialo app, memory leak Pin
J.B.2-Dec-03 21:13
J.B.2-Dec-03 21:13 
GeneralRe: Simple dialo app, memory leak Pin
Anonymous2-Dec-03 21:22
Anonymous2-Dec-03 21:22 
GeneralRe: Simple dialo app, memory leak Pin
J.B.2-Dec-03 21:43
J.B.2-Dec-03 21:43 
GeneralRe: Simple dialo app, memory leak Pin
Marek Grzenkowicz2-Dec-03 21:23
Marek Grzenkowicz2-Dec-03 21:23 
Questionhow to get the message for window show? Pin
zecodela2-Dec-03 20:57
zecodela2-Dec-03 20:57 
AnswerRe: how to get the message for window show? Pin
BaldwinMartin2-Dec-03 22:50
BaldwinMartin2-Dec-03 22:50 
Generalscrolling logic Pin
R. Thomas2-Dec-03 20:48
R. Thomas2-Dec-03 20:48 
Questionmapping mode prob? Pin
R. Thomas2-Dec-03 20:40
R. Thomas2-Dec-03 20:40 
QuestionHow do I make wrapper funtion such as "sprintf" without using "va_arg"? Pin
dowa2-Dec-03 19:53
dowa2-Dec-03 19:53 
AnswerRe: How do I make wrapper funtion such as "sprintf" without using "va_arg"? Pin
Anonymous2-Dec-03 21:33
Anonymous2-Dec-03 21:33 
AnswerRe: How do I make wrapper funtion such as "sprintf" without using "va_arg"? Pin
BaldwinMartin2-Dec-03 23:01
BaldwinMartin2-Dec-03 23:01 
AnswerRe: How do I make wrapper funtion such as "sprintf" without using "va_arg"? Pin
David Crow3-Dec-03 3:39
David Crow3-Dec-03 3:39 
AnswerRe: How do I make wrapper funtion such as "sprintf" without using "va_arg"? Pin
Tim Smith3-Dec-03 4:24
Tim Smith3-Dec-03 4:24 
GeneralGetUserName() fails in ATL COM object Pin
bryces2-Dec-03 19:47
bryces2-Dec-03 19:47 
GeneralRe: GetUserName() fails in ATL COM object Pin
Michael P Butler2-Dec-03 20:20
Michael P Butler2-Dec-03 20:20 

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.