Click here to Skip to main content
15,887,585 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how can i get file names dynamically? Pin
Madhu Nair2-Jul-09 18:27
Madhu Nair2-Jul-09 18:27 
GeneralRe: how can i get file names dynamically? Pin
Stuart Dootson2-Jul-09 20:34
professionalStuart Dootson2-Jul-09 20:34 
JokeRe: how can i get file names dynamically? Pin
Rajesh R Subramanian2-Jul-09 22:00
professionalRajesh R Subramanian2-Jul-09 22:00 
JokeRe: how can i get file names dynamically? Pin
Stuart Dootson2-Jul-09 22:07
professionalStuart Dootson2-Jul-09 22:07 
GeneralRe: how can i get file names dynamically? Pin
Rajesh R Subramanian2-Jul-09 22:09
professionalRajesh R Subramanian2-Jul-09 22:09 
GeneralRe: how can i get file names dynamically? Pin
Stuart Dootson2-Jul-09 22:09
professionalStuart Dootson2-Jul-09 22:09 
QuestionRe: how can i get file names dynamically? Pin
David Crow2-Jul-09 9:34
David Crow2-Jul-09 9:34 
Questiondisable MFC dialog based Microsoft Web Browser showing context menu [modified] Pin
JACyo2-Jul-09 6:39
JACyo2-Jul-09 6:39 
Hi everyone, I got a question about disabling context menu of the web browser and I've searched MSDN, this forum and goole. But seems most of the are either not Dialog Based (most of them use CHtmlView) or not quite same as what I see in my project.

I am using Visual Studio 2005 and Here is my steps of creating the application:

I use MFC application and choose dialog based. Then, in the dialog editor, I add Microsoft Web Browser into the toolbox, and then drag it into the dialog. After that, I right click on that control and choose Add Variable and leave everything default and give it a variable name "myBrowser". Then it automatically creates a explorer.h and explorer.cpp. The explorer.h contains a class declearation of "class CExplorer1 : public CWnd". Then I get stuck at this point. I've tried to declear a message map in explorer.h and find ON_WM_CONTEXTMENU() but seems doesn't work.

From the search of the internet, it seems that I need to implemente IDocHostUIHandler and there I can overload ShowContextMenu() and return S_OK to disable it. But with most of the information I got, seems most of them are for CHtmlView but not CWnd. So, I'd like to ask what I should do to disable the context menu of a Dialog Based Web Browser which inherit CWnd (or my approach is wrong?) and with Visual Studio 2005? (coz I see most of the information are VC++6 and I can't find the same thing in VS2005).

I am new to MFC and these kinds of browser things so my question maybe a stuipd question....
Thanks for any help.

modified on Thursday, July 2, 2009 7:32 PM

AnswerRe: disable MFC dialog based Microsoft Web Browser showing context menu Pin
Stuart Dootson2-Jul-09 9:30
professionalStuart Dootson2-Jul-09 9:30 
GeneralRe: disable MFC dialog based Microsoft Web Browser showing context menu Pin
JACyo2-Jul-09 15:45
JACyo2-Jul-09 15:45 
GeneralRe: disable MFC dialog based Microsoft Web Browser showing context menu Pin
Stuart Dootson2-Jul-09 20:33
professionalStuart Dootson2-Jul-09 20:33 
Questionconvert vbscript to c++ Pin
Mogaambo2-Jul-09 6:26
Mogaambo2-Jul-09 6:26 
QuestionRe: convert vbscript to c++ Pin
led mike2-Jul-09 7:41
led mike2-Jul-09 7:41 
AnswerRe: convert vbscript to c++ Pin
Mogaambo2-Jul-09 8:32
Mogaambo2-Jul-09 8:32 
GeneralRe: convert vbscript to c++ Pin
led mike2-Jul-09 9:00
led mike2-Jul-09 9:00 
GeneralRe: convert vbscript to c++ Pin
Mogaambo2-Jul-09 9:06
Mogaambo2-Jul-09 9:06 
GeneralRe: convert vbscript to c++ Pin
Stuart Dootson2-Jul-09 9:26
professionalStuart Dootson2-Jul-09 9:26 
GeneralRe: convert vbscript to c++ Pin
Mogaambo2-Jul-09 9:28
Mogaambo2-Jul-09 9:28 
QuestionRe: convert vbscript to c++ Pin
David Crow2-Jul-09 9:31
David Crow2-Jul-09 9:31 
AnswerRe: convert vbscript to c++ Pin
Mogaambo2-Jul-09 9:39
Mogaambo2-Jul-09 9:39 
GeneralRe: convert vbscript to c++ Pin
Mogaambo2-Jul-09 9:41
Mogaambo2-Jul-09 9:41 
QuestionDynamic char Array Pin
jlgeris2-Jul-09 5:38
jlgeris2-Jul-09 5:38 
AnswerRe: Dynamic char Array Pin
jlgeris2-Jul-09 5:42
jlgeris2-Jul-09 5:42 
AnswerRe: Dynamic char Array Pin
«_Superman_»2-Jul-09 5:54
professional«_Superman_»2-Jul-09 5:54 
GeneralRe: Dynamic char Array Pin
jlgeris2-Jul-09 7:14
jlgeris2-Jul-09 7: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.