How to prevent ole container hwnd receive certain messages? #2

I used CSubclassWnd of Paul DiLascia to subclass(in fact use SetWindowLong
to replace WindowProc) hwnd returned from IOleWindow::GetWindow. In the
WindowProc I prevent it by
LRESULT CShellEmbedding::WindowProc(UINT msg, WPARAM wp, LPARAM lp)
{
 if (msg == WM_WINDOWPOSCHANGING)
  return 0;
 return CSubclassWnd::WindowProc(msg, wp, lp); // Important!!
}
but spy++ still tell me that hwnd of ole get the send WM_WINDOWPOSCHANGING
message and return. So Is it right way to eat message in win32 or ole
container hwnd does special things?


0
Su
5/15/2004 3:54:59 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
543 Views

Similar Articles

[PageSpeed] 33

"Su Wei" <suwei@sina_com> wrote in message
news:Ol3%239VpOEHA.1616@TK2MSFTNGP12.phx.gbl
> I used CSubclassWnd of Paul DiLascia to subclass(in fact use
> SetWindowLong to replace WindowProc) hwnd returned from
> IOleWindow::GetWindow. In the WindowProc I prevent it by
> LRESULT CShellEmbedding::WindowProc(UINT msg, WPARAM wp, LPARAM lp)
> {
>  if (msg == WM_WINDOWPOSCHANGING)
>   return 0;
>  return CSubclassWnd::WindowProc(msg, wp, lp); // Important!!
> }
> but spy++ still tell me that hwnd of ole get the send
> WM_WINDOWPOSCHANGING message and return. So Is it right way to eat
> message in win32 or ole container hwnd does special things?

Spy++ does not tell you which window proc got the message. It can only
tell you which window got the message. The HWND does not change when you
subclass, so you won't notice any changes in Spy++ trace regardless of
whether you subclass or not.
-- 
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


0
itandetnik (127)
5/17/2004 6:44:38 PM
Reply:

Similar Artilces:

How to restrict emailing to internal users only for certain mailbox in Exchange 2003?
How to restrict emailing to internal users only for certain mailbox in Exchange 2003? -- Danny From ADUC you can go to the Exchange tabs and control who is allowed to send to a mailbox. Setting it to "authenticated users" should accomplish what you want. There are probably other ways as well. -GT "Danny Hoon" <danny.hoon@phoonhuat.com> wrote in message news:eE8aMDKIFHA.2784@TK2MSFTNGP09.phx.gbl... > How to restrict emailing to internal users only for certain mailbox in > Exchange 2003? > > > -- > Danny > Thanks but doesn't ...

outlook feature to prevent forgetting attachments
Often people forget to send attachments with emails. Very often they will write something along the lines of "I have attached the minutes from our meeting" and then forget to atcually attach a file. Is there a way therefore that outlook can check the text of an email for words like attach, attached, attachment and query the user before sending if there does not appear to be an attachment? ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree"...

Error message et.dll
Using Outlook 2003 with Win XP I keep getting the following error message "the add in et.dll cannot be installed or loaded The problem may be resolved by running detect and repair". I have run detect and repair twice, but the error box keeps reappearing. Once the box is closed, Outlook seems to be functioning properly, but the message is annoying. Any help would be most appreciated. Roger Delete the addin by going to Tools, Options, Other, Advanced Options, Addin Mgr. Many thanks, no more error messages. Roger >-----Original Message----- >Delete the addin by going to ...

Money 2004 crash on startup #2
just find that it only crash when i use my current user, not happening when i logon as another user, seems my profile has some problem, maybe more startup & program installed. any idea on how to troubleshoot ? =========== just install in my WinXP SP1, which has IE6.0 SP1 installed already. Money2004 Std keep crashing on startup after install. with error dialog of "restart Money - Send / don't send report" any idea ? a further findings, i run Money2004 using "run as" another user, it works ! using local adm or domain userwith local adm right also run correctly....

Hyperlinks dont work I get a message "Cannot download the info..
None of hyperlinks in my PPt 2007 presentaion work I get the massage "Cannot download the information you requested" when I try to activate the links. I cant find anything in PPT 2007 help about this. In article <2DA5A2AD-97F2-48AD-B23E-96A7CCF26C8B@microsoft.com>, Etienne 67 wrote: > None of hyperlinks in my PPt 2007 presentaion work I get the massage "Cannot > download the information you requested" when I try to activate the links. What do the hyperlinks point to? ============================== PPT Frequently Asked Questions http://www.ppt...

Receiving Duplicate Messages
Hi, I recently tried to set up Outlook Express on a 2nd computer. Since that time I am receiving duplicate messages from senders. How can I stop receiving dual messages? Thanks, Todd Have you configured this connection (presumably to a POP3 server) to "delete" messages on the server after download? If you, should to stop the duplicates. However, this in confict to have OE running on a second machine where presumably you want to have duplicate mails. That's what IMAP servers were invented for ... If you can use than protocol instead of POP3, then do so. Hope this i...

CRM 1.2 Crystal Reports
Hello, Running into some problems with Installing the Crystal Reports that comes with CRM. I get the error that I currently hace Cryatsl Reports 9.2.0 and I need to upgrade to Crystal Reports 9.2.2 before I install. I have Visual Studio 2003 installed on this machine and it is the only item that I could have on this machine with Crystal Reports version 9.2.0 (otherwise a formatted clean system). Any one have any idea what i need to do to install this? Thanks, Chris If you contact crystal decisions they can give you a download location for version 9.2.2 and then you use your own access...

preventing date from changing
I have an If condition that sets the date to "today()" true or "today() + 1" if false. My question is how do I prevent the date from changing? If the date is set for today, then tomorrow I don't want to "update". How can this be done? thanks You could copy the cell, and paste as values, before you close the file. (Edit>Paste Special, Values) Or, you could enter today's date in a cell in the row (Ctrl+; ), then refer to that cell in the formula. For example, instead of: =IF(A2="Local",TODAY(),TODAY()+1) enter: =IF(A2="Local...

Outlook is hanging during Send/Receive
We use Outlook 2003 with Exchange 2003. One user is hanging at 95% after doing a send/receive. He is the only person this happens to and seems to be getting all of his incoming mail. Something just seems to be stuck in Outlook. I have tried doing a Detect and Repair and applying his Office updates, which seemed to have worked for about a month, but its back again. I dont know what to try next. Thanks in advance! Need more information. 1) Check the event logs to see if there are any clues in there. 2) Try to eliminate if the signon to a particular computer is a problem by trying to si...

Outlook won't display body of plain text message
New install of Office 2003 basic (Outlook (11.8002.6568) SP2) running on XP home SP2 Outlook is setup for one POP3 account. Any messages received that were composed in HTML are readable. The body of all messages received that were composed in plain text is not displayed. If I turn on autopreview it shows the first few sentences of the plain text message but if I double click the message the reading pane is empty. If I turn the reading pane on and autopreview off the reading pane is empty for plain text messages. If I turn the reading pane and autopreview off and double click the message the ...

Prevent the sales from Tendering when another Item is Scan at POS
Hello, We have serveral items that our Retail does have price assign to them. The cashier will scan the next item. They will not notice the last item they did not enter a price. Now the 2nd item is the price for the 1st item. Then the cashier will tender out the sales without noticing they have an incorrect total for this transaction. Then the store manager have to performed a post void for this transaction, which hold up the customer awaiting to check out. Have anyone else encounter this and know a way to limited sale from being total out of an acceptable sales amount...

How do I populate a DataGridView with arrays containing strings? (I get convertion error C2664)
This is my code (only the important parts of it): // int Rownumber = 1; string Rowtext[8000]; DataGridView1->Rows->Add(Rowtext[Rownumber]); // This code (here simplyfied) should create a row in the grid and fill the first cell with the text stored in the array Rowtext[1] but when debugging I get the following error message: error C2664: 'int System::Windows::Forms::DataGridViewRowCollection::Add(...cli::array<Type,dimension> ^)' : cannot convert parameter 1 from 'std::string' to 'System::Object ^' If I change the code to DataGridView1->Rows->...

Unblocking attachments #2
A colleague sent me an .ASP page he was working on. O2003 blocked it. I'm not using Exchange. How do I unblock it? It appears from "Help" that I can't. Thanks, Andrew Chalk http://www.slipstick.com/outlook/esecup/getexe.htm -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Andrew Chalk" <achalk@XXXmagnacartasoftware.com> wrote in message news:O3KMjkn$EHA.3424@TK2MSFTNGP11.phx.gbl... >A colleague sent me an .ASP pag...

prevent user from deleting a tab prevent running macro from menu
how can one prevent a user from 1. deleting a specific tab in a workbook? 2. prevent a user from running a macro from the tools menu (where user can only run a macro from a command button)? thanks! #1. Protect the workbook's structure. In xl2003 menus: tools|protection|protect workbook|check structure #2. Make the sub private: Sub Testme() becomes Private Sub testme() This will stop the user from seeing that subroutine--but if they know the name, they can still type it and run it. joemeshuggah wrote: > > how can one prevent a user from...

Mail Delivery #2
I have a user who doesn't always receive his email from a certain user(different server, same site). One day he will receive the mail message and then he will not receive it the next. The person that is cc'd does receive it though. Any ideas? I do not see any error messages in the event log. Thanks in advance, Mary ...

Saving Worksheet #2
Can you save a single worksheet instead of the entire workbook. It is to big as a workbook. open a new workbook>go back to the original>right click >sheet tab>move or copy>create a copy>to book -- Don Guillett SalesAid Software donaldb@281.com "Bobby28" <Bobby28@discussions.microsoft.com> wrote in message news:0F253FD4-11A4-4941-B629-68B13AC7E659@microsoft.com... > Can you save a single worksheet instead of the entire workbook. It is to big > as a workbook. use the "copy or move sheet" in <edit> and select "to new workbook&quo...

Re: preventing distribution lists from printing
I work for a large corporation and I often get outlook mail with ver long distribution lists. Is there any way to prohibit these lenght list from printing so that I only get the message? Thank - buddy ----------------------------------------------------------------------- Posted via http://www.mcse.m ----------------------------------------------------------------------- View this thread: http://www.mcse.ms/message548641.htm ...

2 post regarding script error while printing
I continue to get a "script error" while trying to print. It deals with a "dll" called shdoclc.dll/preview.dlg I have reinstalled Office XP professional I've done just about everything I can think of get this thing running again. The script error occurs in both Outlook and Outlook Express And, more interesting, I loaded another e-mail client to see if that would work and it has the same script error. So, I'm beginning to think that the error is Home XP related fundamental to the operating system. Problem is, I have no idea where or how to repair XP home. I n...

Prevent Forwarding #2
Hi. I need to know how to make an email message unable to be forwarded to a third party. For example if I sent an email to John, John couldn't then forward that message to someone else. Thanks!! Shannon <anonymous@discussions.microsoft.com> wrote: > Hi. I need to know how to make an email message unable to > be forwarded to a third party. For example if I sent an > email to John, John couldn't then forward that message to > someone else. Can't be done, in general. -- Brian Tillman You'd need to use a service such as those listed at http://www.slipst...

Receiving Transaction Entry #2
I went into Receiving Transaction Entry to record the receipt of an item. The invoiced price did not agree with the purchase order. I had to add Shipping and adjust the provincial tax. I went to the proper screen to over-ride the calculated tax and the system told me that I couldn't do that because I had not filled in all the BOLD, RED areas. At that point I wanted to close down that screen, but the system would not let me do that either. I could minimize the screen and then I could also see that there wasn't any required information that had not be entered. The only way I c...

New mail message #2
In Outlook 2002 sp3 I used to be able to double click an empty space below any mail in my Inbox and a new mail message window would open. This still works in other mail folders but when I do it in the Inbox a new Discussion window opens. I can't seem to locate a setting in options to revert it back to normal. Is there a way to change this behaviour? Thanks for any tips. Max ...

SYMBOLS #2
HOW DO I TYPE IN FRACTIONS THAT ARE NOT IN THE SYMBOLS LIST? FOR EXAMPLE I WANT 6/19 BUT THAT NOT IN THE LIST. HELP! Hi you may use the formel editor object for this ('Insert - Object') -- Regards Frank Kabel Frankfurt, Germany "SPAKSTA" <SPAKSTA@discussions.microsoft.com> schrieb im Newsbeitrag news:F6FDAF11-C8A3-4E4F-B60B-936A94FBCE2D@microsoft.com... > HOW DO I TYPE IN FRACTIONS THAT ARE NOT IN THE SYMBOLS LIST? FOR EXAMPLE I > WANT 6/19 BUT THAT NOT IN THE LIST. > HELP! > 0 6/19 that is zero space fraction -- HTH RP "SPAKSTA" <...

send receive error #2
hello there, woul dyou please help me on this, i use MS outlook ,when i try to sendlreceive my mesages , an error message is reported that the task is failed and the error ID is 0x800ccc0f tahnk you -- Regards, Marwa marwa <marwa@discussions.microsoft.com> wrote: > woul dyou please help me on this, i use MS outlook ,when i try to > sendlreceive my mesages , an error message is reported that the task > is failed and the error ID is 0x800ccc0f Make sure you're properly authenticating to your outgoing server and that you're not scanning outgoing mail with a virus t...

Prevent calculation of fields in split view
Hi all! I have following problem: Most of my forms are displayed in split view, within some of them i am doing different calculations, displaying the calculated values in text boxes. Since some of those calculations are quite time-consuming, i dont want Access to calc. the values for _each_ record in the split-view (which it is doing right now). I want it to just calc the values for the record currently viewed, is there any way to do this? best regards, --Michael ...

Display message headers in OWA?
Dear all, Can OWA Exchange Server 2003 display message headers and how to enable it? Thanks for your help. Regards, Natthaphol I am assuming that you are talking about the "Internet headers" information that you can look at, on a message, in Outlook. There is no way to see this information in OWA. =================================== From: Kevyn Pietsch[MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at: http://www.microsoft.com/info/cpyright.htm =================...