CHtmlView, CCustomOccManager, and disabling the context menu and 3d borders

Hello,

I am trying to create a CustomControlSite that can hook into the basic
operations of a CHtmlView. I want to disable the context menu and also
get rid of the 3d border.

Ive checked out this article, and followed it to a T. 
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q236312

It seems like my COleControlSite* CreateSite(COleControlContainer*
pCtrlCont)
is not getting called. If I can figure out how to get this working, I
think the rest will fall into place.



I also created a standalone project and followed the directions again,
just to make sure something else in my code wasnt screwing it up.

Im calling AfxEnableControlContainer(pMgr); with my custom manager.
and overwrite the create function in my CHtmlView so the default
implementation wont call it again with a NULL pointer to a manager.

Im running Dev Studio .NET 2003. if that makes any difference. I also
checked out the local CHtmlView implementation file to make sure
AfxEnableControlContainer wasnt being called in some other place.

Thanks
Dave
0
info6601 (3)
8/12/2003 2:35:36 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
1155 Views

Similar Articles

[PageSpeed] 49

Dave,

Sorry in advance for not directly answering the question you've asked,
but this might help you: In MFC7, the CHtmlView class implementation has
been extended to provide a built-in IDocHostUIHandler implementation
that routes the method calls to virtual functions that you can override.
I don't see them showing up in the class's Properties->Overrides list,
but they are there (to add manually if I'm not missing a bet).
-- 
Jeff Partch [VC++ MVP]

"Dave" <info@boltcreative.com> wrote in message
news:20b6bb29.0308111835.f3e7f43@posting.google.com...
> Hello,
>
> I am trying to create a CustomControlSite that can hook into the basic
> operations of a CHtmlView. I want to disable the context menu and also
> get rid of the 3d border.
>
> Ive checked out this article, and followed it to a T.
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;q236312
>
> It seems like my COleControlSite* CreateSite(COleControlContainer*
> pCtrlCont)
> is not getting called. If I can figure out how to get this working, I
> think the rest will fall into place.
>
>
>
> I also created a standalone project and followed the directions again,
> just to make sure something else in my code wasnt screwing it up.
>
> Im calling AfxEnableControlContainer(pMgr); with my custom manager.
> and overwrite the create function in my CHtmlView so the default
> implementation wont call it again with a NULL pointer to a manager.
>
> Im running Dev Studio .NET 2003. if that makes any difference. I also
> checked out the local CHtmlView implementation file to make sure
> AfxEnableControlContainer wasnt being called in some other place.
>
> Thanks
> Dave


0
jeffp (1711)
8/12/2003 2:49:50 AM
Thanks, that was way easier.

"Jeff Partch" <jeffp@mvps.org> wrote in message
news:eXU3lxHYDHA.2620@TK2MSFTNGP09.phx.gbl...
> Dave,
>
> Sorry in advance for not directly answering the question you've asked,
> but this might help you: In MFC7, the CHtmlView class implementation has
> been extended to provide a built-in IDocHostUIHandler implementation
> that routes the method calls to virtual functions that you can override.
> I don't see them showing up in the class's Properties->Overrides list,
> but they are there (to add manually if I'm not missing a bet).
> -- 
> Jeff Partch [VC++ MVP]
>
> "Dave" <info@boltcreative.com> wrote in message
> news:20b6bb29.0308111835.f3e7f43@posting.google.com...
> > Hello,
> >
> > I am trying to create a CustomControlSite that can hook into the basic
> > operations of a CHtmlView. I want to disable the context menu and also
> > get rid of the 3d border.
> >
> > Ive checked out this article, and followed it to a T.
> > http://support.microsoft.com/default.aspx?scid=kb;EN-US;q236312
> >
> > It seems like my COleControlSite* CreateSite(COleControlContainer*
> > pCtrlCont)
> > is not getting called. If I can figure out how to get this working, I
> > think the rest will fall into place.
> >
> >
> >
> > I also created a standalone project and followed the directions again,
> > just to make sure something else in my code wasnt screwing it up.
> >
> > Im calling AfxEnableControlContainer(pMgr); with my custom manager.
> > and overwrite the create function in my CHtmlView so the default
> > implementation wont call it again with a NULL pointer to a manager.
> >
> > Im running Dev Studio .NET 2003. if that makes any difference. I also
> > checked out the local CHtmlView implementation file to make sure
> > AfxEnableControlContainer wasnt being called in some other place.
> >
> > Thanks
> > Dave
>
>


0
info6601 (3)
8/12/2003 4:14:20 AM
Reply:

Similar Artilces:

Add menu options via Developer Toolkit
Is it possible to add menu items to standard GP 9.0 menus using the Developer Toolkit? For instance, there is the following menu in GP: \Tools\Routines\Sales\ I would like to add a custom option at the bottom of this menu (below "Checklists"). Can this be done from VB.NET via the Developer Toolkit? If so, how? Thanks, Chris Chris, This question has been asked quite a number of times in this newsgroup. The answer is that Dexterity is the only application that can add to the GP menu structure. patrick developer support -- This posting is provided "AS IS" with n...

Disable ETRN on Exchange 5.5
Hi I have a customer with a Exchange 5.5 server and they are using ETRN to collect their mail. How do I disable the use of ETRN since we want to deliver the mail directly to the Exchange server? Best regards Lasse Lasse, If memory serves correct - take a look here: Exchange 5.5 Administrator - - Internet Mail Service - - Mail Retrieval - - Click on "Retrieve Mail using ETRN" C. Smith Enso Technologies, Incorporated http://www.ensotech.com On Tue, 13 Jun 2006 00:21:02 -0700, Lasse <Lasse@discussions.microsoft.com> wrote: >Hi > >I have a customer with a Exch...

Borders and page numbering changes in 2007
Hi Everyone, Quick question. In previous versions of excel i use to be able to select multiple rows and then click the bottom border button and all the selected rows would then have bottom borders. However when i now do this in 2007 only the last row i have higlighted gets the boarder. Have they taken this funtionality away or is there another way to do it? Second quick question. I have an excel document with multiple pages that i want to have the page number displayed at the top of. However when i click header and footer and click the page number button and then go back to normal...

Merge Icon utility GONE from Actions menu Drop Down!
I am trying to merge two accounts but when I click on more actions the Merge Option is not even there.. WTF Any idea's before I start a MS support request.... First, I assume you are NOT trying to do this Off-line with the Outlook Laptop client. Assuming that, perhaps you do not have sufficient permissions to do the merge. Larry "ConSol IT" <ConSolIT@discussions.microsoft.com> wrote in message news:C741F5C9-D7C6-48D2-B3EC-3C5FF4221FE7@microsoft.com... >I am trying to merge two accounts but when I click on more actions the >Merge > Option is not even there....

How to disable dialog box
Hi all, I am new to MFC programming, I want to disable a dialog box, I thought it's similar to the disable of button, in a dialog box, so I tried some thing like this in the CAboutDlg:: OnInitDialog(), GetDlgItem(IDD_ABOUTBOX)->EnableWindow(FALSE); But it gives run time error while launching about dialog box. Please some body explain how to do it? Thanks in advance, SeemaRao seema wrote: > Hi all, > I am new to MFC programming, I want to disable a dialog box, I thought > it's similar to the disable of button, in a dialog box, > so I tried some thing like this in the C...

Disabling a contacts folder
We recently migrated away from an exchange server, but because we still receive email through the old server we have to maintain the connections for now. Is there any way to tell Outlook 2003 -not- to use any of the contacts in my old folder on the box? I want to use ONLY the contacts in the .pst? Sure, you can open the address book, select tools | options, and specify which books should be used for name resolution. you can also right click on a contact folder and go to the outlook address book tab to enable/disable a folder on the fly. "Wowbagger" <none> wrote in messag...

Missing Tools Menu in Word
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: intel I don't have a "tools" menu (and the related functions) in Word 08, even though I have it in Excel. What gives? (expletives withheld) Well, I have one. Maybe you accidentally deleted yours. If you go to View | Customize Toolbars/Menus, select the Menu Bar, and click Reset, it should set all your main menus and built-in toolbars back to the default. If you have customized your menus or toolbars, you may want to explore the Customize dialog, and drag the commands you are missing back to the toolbars/m...

Disable items in list control
Hi Experts, How to disable any item in list control, list box tree control etc. > How to disable any item in list control, list box tree control etc. There is no concept like this. Best you can do is to color these differently and not allow selection of these items. --- Ajay ...

Disable spell check in word 2007
Does anyone now hove too disable spell check in word 2007? I need to be sure that my students can't start the tool during a test. Short of uninstalling the proofing tools, there is no practical way. And, given that it requires some judgment to use the proofing tools intelligently, and students are unlikely ever to have to work without them, why hamstring them? -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Oistein" <Oistein@discussions.microsoft.com> wrote in message news:FC7556EF-0279-4ACE-AA...

How disable postmaster reply in exchange 5.5
I receive mail from virus in my Exchange 5.5 with this format name@mydomain with a virus attached My exchange server reply with postmaster with the original mail attached. I think that this is Mydoom virus. Please help me to disable NDR messages for any e-mail sent to an invalid address. Virus send e-mail with field FROM with addres that want attack and my exchange reply with postmaster with the original mail that contain mydoom virus. Excuse me for my bad english. It is not possible to disable generation of NDR with E55. Why not install antivirus for Exchange? ALEX wrote: > I rece...

3D Stacked Column Chart
Hi Team, I know how to do 2D stacked columns and separate 3D Column carts but I want to do a 3D Stacked column chart ie. 4 variables. I've explored links on similar discussions but have seen no example. I recognise the detrimental presentation risks on a 2D printout. Could you please advise? Thank you, Ditch It's not so much "detrimental presentation risks", it's detrimental comprehension risks. The chart will be difficult to read and impossible to understand. It's possible to build such a chart, but it requires you to build multiple 2D stacked columns with 3D e...

Disable Quotes
Is there any way to permanently disable the update of Stock Quotes, News, and Exchange Rates? I have nothing for it to update but it runs for at least 10 minutes trying to download them when accounts are updated. ...

how can i remove a drop-down menu
Hi to All, can anyone please tell me how to remove a drop-down menu from a cell or column? Thank you, Cheers, RonW. If you're talking about removing a Data Validation list that displays in a cell Try this: Select the offending cell From the Excel Main Menu: <data><validation>...Allow: Any Value...Click [OK] Does that help? Post back if you have more questions. -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) <Ron.Winkley@gmail.com> wrote in message news:1194484323.283481.125630@k79g2000hse.googlegroups.com... > Hi to All, &...

How to create a report border that changes color w/each new secti
I want to create a report in Access that has a border color change each time the section changes. For example: Green border for all Learning courses Red border for all Technical courses, etc. Any suggestions? The first step is to add a field to your table of courses to store the color. Then add some code in the On Format event of your report section to change the border color of a control. -- Duane Hookom Microsoft Access MVP "Felicia" wrote: > I want to create a report in Access that has a border color change each time > the section changes. ...

How to remove disabled user private & WIP queues
Hello, A previous SysAdmin setup a user who has since left the company. This user has been disabled & their Active Directory account has been deleted. For some reason the WIP & private queues for this user appear in the queue list when you go to assign an item to another queue. I can't seem to do much with this user account as for some reason the user name field contains the username only, not DOMAIN\Username. So if I try to Enable/Disable or re-assign records I get an error message telling me that the logon name must be in the DOMAIN\Username format. Is there a way I can ...

right to left menu
hi, Is there a way to make menus right to left ? thnaks, Yes. 1. Select the 'menu' in the resource editor and goto its properties. 2. Click on the 'Extended Styles' tab. 3. Check the box that says 'Right to left order and alignment' -- Cheers Check Abdoul [VC++ MVP] ----------------------------------- "bn1" <bn1@yahoo.com> wrote in message news:uEITXNH3DHA.632@TK2MSFTNGP12.phx.gbl... > hi, > Is there a way to make menus right to left ? > > thnaks, > > ...

coloring the sides of 3d bars in a different color than the front?
Hi, is it possible to give the sides of a 3d bar another color than the front? Greets Xaver You can apply a picture to either the front or the side: Create a picture in a graphics program (e.g. MS Paint) that is just a block of colour. In Excel, select the chart series that you want to colour Choose Format>Selected Data Series On the Patterns tab, click the Fill Effects button On the Picture tab, click the Select Picture button Find the colour block picture that you created, and select it, then click Insert For 'Apply To', check Sides or check Front Click OK, click OK ...

disable users to exit outlook ?
Well my boss wants me to do something like when clients logins outlook starts & then wont be able to quit outlook even if they want to .. :) any ideas ? thanks "There are seldom technological solutions to behavioral problems." Having said that, does your boss mean that people should NEVER log out of Outlook? Only during work days? Working hours? If yes to most all (except 1, of course) of the above, you will need to send a memo or use training to instill this into your work force, and enforce the fact that email sent to workers during working hours MUST be read and act...

Is there any way to disable window printer installation?
hey,all I have an issue and want to disable windows printer installation. The reason we need to do this is, our company provides clients laptops, with our program running on it(full screen, running all the time when power on). And as a contract, clients only can use our laptop to our program, can not to do anything else. The boss don't want users to install printer or even other programs, is there possible in vc? Thanks, Now, I can delete the printers if users already installed one, our program will delete it. But I found we only can delete local printer. I got a Access Denied ...

Essential Business Server and removing/disabling TMG
Hi there, whilst I was on vacation my collegues did our first EBS install. According to them it's not possible to disable or remove the TMG server. Is this true? We use UTM appliances and therefore have no use for TMG. It just clutters the setup. Kind regards TMG is an integral part of EBS and is installed on the Security or Edge server. You can set the rules for it to be minimally invasive, but removing it isn't an option. -- Charlie. http://msmvps.com/blogs/russel "Freaky" <wontsay@ondeja.com> wrote in message news:eCjP5Q8hKHA.5020@TK...

help with drop down menu data
i am trying to create a worksheet where i am picking items out of inventory cell "A-1" has drop down menu which i select item (no problem, i can do that) Cell "B-1" is the corresponding price for the item selected in cell "A-1" example: the drop down allows me to select widgets, modifed widgets, budget widgets, or premium widgets. (up to about 30 choices)......the price of widgets is 10.00, the price of modified widgets is 20.00 the price of budget widgets is 5.00 while the price of premium widgets is 30.00 and so on....... how do i get cell "B-1&q...

Excel Recent File menu listing
Hi, In ExcelXP or 2003, is there a way to list the files that you want to open in the File menu? So, no matter what other excel files that you opened. The files that you want is always listed in the File Menu. Any help would be appreciated. HappyGuy > In ExcelXP or 2003, is there a way to list the files that > you want to open in the File menu? Not AFAIK. What I tend to do is record macros in personal.xls to open the files, e.g. Sub Home() Workbooks.Open Filename:= _ "C:\Documents and Settings\Andy\My Documents\home.xls" End Sub , then assign the macros to a custom me...

Context menu #2
Hi, I used Prompt for context menu items to display text in status bar. But disabled menu items before calling TrackPopupMenu become enabled. Please help. TIA! -- Deli > I used Prompt for context menu items to display text in status bar. But > disabled menu items before calling TrackPopupMenu become enabled. I found that menu items that have message handler become active, even if they're grayed. If 'this' is used in TrackPopupMenu as 4th parameter (instead of AfxGetMainWnd()), enabling/disabling menu items is OK, but then status bar info isn't displayed. ;-( Thanks fo...

Disable MailboX #2
I have a user who just went out on maternity leave. I have diabled her user account but this prevents her from receiving email. IS there anyway to diable the acount without prevent email from arriving to her emailb box. yes...grant the "self" account full mailbox access...that should do it... -- Susan Conkey [MVP] "George Schneider" <georgedschneider@news.postalias> wrote in message news:B348D398-986C-49FE-A591-6418D8AEBC0D@microsoft.com... > I have a user who just went out on maternity leave. I have diabled her user > account but this prevents her f...

How can i disable BCC from the server level
I need to disable the ability to send BCC mail. Is there a way to do this at the server level. If not is how do i disable it on the client side. Your help is greatly apprciated. Thanks On Fri, 3 Feb 2006 03:44:09 -0800, "Andy Exchange admin" <Andy Exchange admin@discussions.microsoft.com> wrote: >I need to disable the ability to send BCC mail. Is there a way to do this at >the server level. If not is how do i disable it on the client side. Your >help is greatly apprciated. Thanks Not really possible. ...