15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


inconsistant behaviour of ToolTips

Srinivas Vanga -- srini@concentra.com
Thursday, November 21, 1996


Environment: VC++ 4.2-flat, Win 95

BackGround:

 In  a CFormView divided into 4 panes with splitters,
 I've a third party grid control occupying the entire 
 client area  in each of these panes.

 I've created tool tip control successfully and registered
 tools for each of the grid control columns, so that the 
 column identifiers are displayed in the tooltips.

Problem:

 Though tool tips are created and displayed properly they
 are not visible  always - instead they start appearing
 suddenly and go off whenever I do some other action like
 hiding some of the grid control columns etc. 

 I am using a single member function on the CFormView derived
 class to register tools for all columns(or reset tool bounding 
 rectangle) and calling this same member function from all the 
 places, whenever I need to update tool rectangle regions (i.e, 
 after scrolling, after resizing columns, and grid control client 
 area or after hiding some of these columns based on user actions 
 etc.,)

 what surprises me is, initially when the view comes up, tool 
 tips are working fine for grid  control in two panes and not 
 in the other one (I thought of active view, but I am creating 
 control with TTS_ALWAYSTIP style).
 but when I resize grid control, they start appearing in all 
 the panes (Onsize() calls the same member function that resets
 the tool rect).

 When ever scrolling takes place, I call the same function that
 resets the bounding rectangle. Again, immediately after scrolling
 tool tips doesn't appear, but if I click any where in the client 
 area, they start working again. 

 I turn off visibility of one of the columns in the grid, tool tips 
 stops working even though I am calling the same magical function. 
 But I force some scrolling they start working. 

 I am not having a clue about what's going wrong.. as I can't find any
 thing wrong with my logic as  I've verified TOOLINFO structure
 and all the data seem to be correct. 
 
 I create control like this:

	CToolTipCtrl m_pToolTip = new CToolTipCtrl();
	m_pToolTip->Create(GridControl, TTS_ALWAYSTIP); 

	(GridControl is a CWnd derived object).

 and register each column tool like this:

 if (tool_is_not_already_registered)
	m_pToolTip->AddTool(GridControl, IDofString,&ToolRect, IDofTool);
 else 
      // if tool bounding rectangle changes
      m_pToolTip->SetToolRect(GridControl,IDofTool,&ToolRect); 

 and also overriding PreTranslateMessage() to include the line
  m_pToolTip->RelayEvent(pMsg);


 Gurus out there - any help? 

 Thanks in advance,
 Srini


 Srinivas Vanga
 srini@concentra.com
 Concentra Corporation, Burlington, MA-01803
 





Jim Lawson Williams -- jimlw@mail.ccur.com.au
Sunday, November 24, 1996

G'day!

At 09:37 AM 21-11-96 -0600, you wrote:
>
>Environment: VC++ 4.2-flat, Win 95
>
>BackGround:
>
> In  a CFormView divided into 4 panes with splitters,
> I've a third party grid control occupying the entire 
> client area  in each of these panes.
>
> I've created tool tip control successfully and registered
> tools for each of the grid control columns, so that the 
> column identifiers are displayed in the tooltips.
>
>Problem:
>
> Though tool tips are created and displayed properly they
> are not visible  always - instead they start appearing
> suddenly and go off whenever I do some other action like
> hiding some of the grid control columns etc. 
>

I suspect you are, for a while at least, ahead of the Tooltips
implementation:  please see below  --  as yet nothing other than the
automatic acknowledgement.  I think your Users will just have to grin
and bear it for a bit until Microsoft adds the facilities you want.

Regards,
Jim LW


Requested Enhancement (to msvc@microsoft.com, 13th Nov. '96)
=====================
Fulltime availability of CToolBarCtrl Tooltips.

Problem Description
===================
I have a need for tooltips from dialog-owned toolbars whenever the Application is active, even when the owning dialog does not have the focus.  Having to click somewhere on the dialog in order for the tooltips to become available is not intuitive.  Neither is it consistent with the behaviour of the Mainframe toolbar, where tooltips are available so long as the focus is on the Application.

Please see below for correspondence through the mfc-l@netcom.com newsgroup.

It is not clear to me whether, in fact, this can be achieved right now. I could find no way, nor did any list-member give a useful response.  

  *  If such IS possible, could you please clarify the documentation?

  *  If it isn't at present, could this be done either as a bar-creation parameter, or alternatively, through SetToolInfo()?

Regards,

J. M. Lawson Williams

P.S.   , and a paid-up MSVC "Professional" subscriber.  So far, no 4.2, but I doubt that has any bearing on the subject...

                       <<<<<<******>>>>>>


Dated at:  23:22    on 23 October 96

Environment:  Win 95, MVC++ 4.1

G'Day!

        Problem:  How to get Tooltips displayed when the owning modeless dialog does not have the focus?

Background.

I am extending an existing application with a number of modeless dialogs which each employ (typically) a dozen "standard" wizard-built buttons.  These dialogs are all owned/hidden/displayed by the MainFrame.  The aims to replace the dialog buttons with toolbars, "pallette"-style, and thereby get more buttons in less area.

Using the sample CMNCTRLS as a guide, my CToolBarCtrl works fine so long as the dialog has the focus.  However, the application is essentially an edit, so as the document is modified, the focus shifts from the dialog to the current view.  Depending upon the function selected, there may be several ways of terminating the sequence, but now the toolbar buttons give no clues as to which to use!

Substituting "p_MainFrame" for "this" in CMyToolBarCtrl::Create loses the relationship between placement of the dialog and the placement of the toolbar;  the toolbar is displayed on startup though the dialog is concealed;  no tooltips are displayed anyway!  No sign of anything going to the Mainframe except the standard Afx stuff E100, E101, etc.

Watching "OnNotify" in both the Dialog and the ToolBar shows that a particular TB Button is only identified in the WPARAM value when the dialog has the focus.  Only "OnNcHitTest" is invoked regardless of the focus, but the code-sequence into the source-library disappears into a mire of thread-state analysis and message-filtering which I would prefer not to have to unravel, and most likely can't change anyway.  Putting in a (yuk!)

          CWnd* pWndOwner = GetParent();
          CWnd* pWndPrev = pWndOwner->SetActive();
          UINIT i=CToolBarCtrl::OnNcHitTest(...);
          pWndPrev->SetActive();

just caused the screen to flash  --  still no tooltips!

I am reluctant to start experimenting with CToolTipCTrls because of the sheer convenience of using the Wizard/.RC file/CToolBarCtrl approach.  Little geometry to consider, neat rows and columns, and simple to add new buttons or change the button order.

So, can anyone throw any light on how to enable these tooltips so long as the application has the focus?

Yours in hope,
Jim LW

                       <<<<<<******>>>>>>

Dated at:  11:51    on 25 October 96
Reply-To: mfc-l@netcom.com
Sender: owner-mfc-l@majordomo.netcom.com
From: jimt1@voicenet.com (Jim Tannenbaum)

[Mini-digest: 2 responses]

>Problem:  How to get Tooltips displayed when the owning modeless
>          dialog does not have the focus?
>

Jim,

        Enable the TTN_ALWAYSTIP attribute for ToolTips.

Jet



JJM Systems, Inc                 Phone: (215) 672-3660
1 Ivybrook Blvd, Suite 190       Fax:   (215) 672-5702
Ivyland, PA  19874               Net:   jimt1@voicenet.com


-----From: Dong Chen 

Try to overwrite the OnToolHitTest() function.
Inside the function, use ChildWindowFromPoint() to get a CWnd* pointer.  It will ensure you get one no matter if it has the focus. Then display your tooltip. This worked in my App Bar application.
Hope this help.

                       <<<<<<******>>>>>>

Dated at:  19:04    on 29 October 96
Message:To:  mfc-l@netcom.com
        cc:  jimt1@voicenet.com
        cc:  d.chen@ix.netcom.com

G'day!
No joy, I'm afraid.

1)  "OnToolHitTest()" doesn't get invoked in the ToolBarCtrl,
     the dialog that owns it, or the MainFrame.

2)  I can find no TTN_ALWAYSTIP in my 4.1 MVC, but there is a TTS_ and a TTF_ defined.  Adding these singly & in combination, e.g.,


ok=m_pBar->Create(WS_CHILD | WS_VISIBLE |
                  CCS _NOPARENTALIGN|CCS_NORESIZE|
                  TBSTYLE_TOOLTIPS|TBSTYLE_WRAPABLE|TTF_ALWAYSTIP,
                  rectBar,this,IDR_FRED);

had no effect.

Thanks for consideration.
Jim LW

                       <<<<<<******>>>>>>

Dated at:   8:37    on 31 October 96

From: Mario Contestabile 

>2)  I can find no TTN_ALWAYSTIP in my 4.1 MVC, but there is a TTS_ and a
>TTF_ defined.  Adding these singly & in combination, e.g.,
>
>ok=m_pBar->Create(WS_CHILD | WS_VISIBLE |
>                 CCS _NOPARENTALIGN|CCS_NORESIZE|
>                  TBSTYLE_TOOLTIPS|TBSTYLE_WRAPABLE|TTF_ALWAYSTIP,
>                  rectBar,this,IDR_FRED);
>
>had no effect.

With a CToolBarCtrl you should use TBSTYLE_TOOLTIPS style for creation and handle OnNotify() for tooltips. Although you won't have tooltips when it doesn't have the focus, this seems to be the standard (aka MSVC, IE 3.1). Note this is #defined in commctrl.h to be 0x100 [line 534].

Eg:
YourCToolBarDerivedClass::OnNotify(WPARAM wParam, LPARAM lParam,                                    LRESULT* pResult)
{
 NMHDR* pNMHDR       = (NMHDR*)lParam;
 LPTOOLTIPTEXTA TTextA = (LPTOOLTIPTEXTA)lParam;
 LPTOOLTIPTEXTW TTextW = (LPTOOLTIPTEXTW)lParam;
 if(pNMHDR->code == TTN_NEEDTEXTA || pNMHDR->code == TTN_NEEDTEXTW){
 }
}

In your case, you're using TTF_ALWAYSTIP as a style bit. That flag should be used only for the TOOLINFO::uFlags structure. What you might of done is use YourCToolBarCtrl::SetToolInfo(&ti); making sure you set ti.uFalgs to TTF_ALWAYSTIP.

I guess it can get confusing. You got
CBRS_TOOLTIPS     // Use for CToolBar creation         [afxres.h]
TBSTYLE_TOOLTIPS  // Use for CToolBarCtrl creation  [commctrl.h]
TTS_ALWAYSTIP     //  [winres.h] ??
TTF_ALWAYSTIP     //  Use with CToolBarCtrl::SetToolInfo()  [afxwin.h]

mcontest@universal.com

                       <<<<<<******>>>>>>

Dated at:  11:24    on  1 November 96
To:  mcontest@universal.com
cc:  mfc-l@netcom.com, jimt1@voicenet.com

G'day!
I takes me hat off to you, Mario.  You're a better man than I.
Throwing the TTF ALWAYSTIP into the CToolBarCtrl::Create() was
more in hope than anticipation.  I'd chucked Get/SetToolInfo
into the Too-Hard basket because the Documentation starts off

BOOL GetToolInfo( LPTOOLINFO lpToolInfo, CWnd* pWnd, UINT nIDTool = 0)
                                                          ^^^^^^^
Return Value
Nonzero if successful; otherwise 0.
Parameters
lpToolInfo   Pointer to a TOOLINFO structure.
pWnd         Pointer to the window that contains the tool.
nIDText   ID of the string resource that contains the text for the tool.
         ^^^^^^^
and then it gets confusing.  Follow the instructions by defining a TOOLINFO and you get

error C2664: 'GetToolInfo' : cannot convert parameter 1 from 'struct
tagTOOLINFOA' to 'class CToolInfo &' (new behavior; please see help)

So I've pressed on:  code-slab follows.  But you still have to click somewhere on the damn dialog for the tips to become available.

How DID you get this thing to work????

Yours in extreme puzzlement,
Jim LW


static UINT BASED_CODE button[] =
{
    // same order as in the bitmap 'fredtoolbar.bmp'
    ID_BUTTON_1,
    ID_BUTTON_2,
    
    ID_BUTTON_LAST
};

////////////////////////////////////////////////////////////////////////
// CFredToolBar message handlers

BOOL CFredToolBar::Create(DWORD dwStyle, const RECT& rect,
                   CWnd* pParentWnd, UINT nID,
                   CCreateContext* pContext)
{
    // TODO: Add your specialized code here and/or call the base class
    BOOL ok;
    ok= CToolBarCtrl::Create(dwStyle, rect, pParentWnd, nID);
    if (!ok)
       return -1;

    int nButtons = sizeof(button)/sizeof(button[0]);
    m_pTBButtons = new TBBUTTON[nButtons];

    for  (int i=0;iGetToolInfo(toolInfo,this,button[i]);
        if  (!ok)
            return -1;
        toolInfo.uFlags|=TTF_ALWAYSTIP;
        pTipCtrl->SetToolInfo(&toolInfo);
    }

    return ok;
}




Srinivas Vanga -- srini@concentra.com
Friday, December 13, 1996


Hi Jim,

Remember the tooltips problem I was talking to you earlier.
As I said, in my case I got the tooltips displayed correctly
in the first place but they stop working following any other
actions like hiding columns or displaying any other dialog boxes.

whenever a modal dialog box is activated, it is generating 
the WM_DISABLEMODAL message and CToolTipCtrl class has a 
entry in its message map and calls OnDisableModal() which
is causing the damage and de-activating the tooltip control by 
sending the message TTM_ACTIVATE with wparam 0.
Refer mfc source file : c:\Msdev\mfc\src\Tooltip.cpp

Once I have this info, I could fix my problem by calling
mytooltipctrl->Activate(TRUE) after closing the modal dialog
box. 

I am not sure whether you care for this info. Anyway have a
nice holiday time.

regards

srini
srini@concentra.com

 
--------------------------------------------------------------------


   X-Sender: jimlw@mail.ccur.com.au
   X-Mailer: Windows Eudora Pro Version 2.2 (32)
   Mime-Version: 1.0
   Content-Type: text/plain; charset="us-ascii"
   Date: Sun, 24 Nov 1996 12:39:34 +1100
   From: Jim Lawson Williams 
   Cc: mfc-l@netcom.com
   Content-Length: 10479

   G'day!

   At 09:37 AM 21-11-96 -0600, you wrote:
   >
   >Environment: VC++ 4.2-flat, Win 95
   >
   >BackGround:
   >
   > In  a CFormView divided into 4 panes with splitters,
   > I've a third party grid control occupying the entire 
   > client area  in each of these panes.
   >
   > I've created tool tip control successfully and registered
   > tools for each of the grid control columns, so that the 
   > column identifiers are displayed in the tooltips.
   >
   >Problem:
   >
   > Though tool tips are created and displayed properly they
   > are not visible  always - instead they start appearing
   > suddenly and go off whenever I do some other action like
   > hiding some of the grid control columns etc. 
   >

   I suspect you are, for a while at least, ahead of the Tooltips implementation:  please see below  --  as yet nothing other than the automatic acknowledgement.  I think your Users will just have to grin and bear it for a bit until Microsoft adds the facilities you want.

   Regards,
   Jim LW


   Requested Enhancement (to msvc@microsoft.com, 13th Nov. '96)
   =====================
   Fulltime availability of CToolBarCtrl Tooltips.

   Problem Description
   ===================
   I have a need for tooltips from dialog-owned toolbars whenever the Application is active, even when the owning dialog does not have the focus.  Having to click somewhere on the dialog in order for the tooltips to become available is not intuitive.  Neither is it consistent with the behaviour of the Mainframe toolbar, where tooltips are available so long as the focus is on the Application.

   Please see below for correspondence through the mfc-l@netcom.com newsgroup.

   It is not clear to me whether, in fact, this can be achieved right now. I could find no way, nor did any list-member give a useful response.  

     *  If such IS possible, could you please clarify the documentation?

     *  If it isn't at present, could this be done either as a bar-creation parameter, or alternatively, through SetToolInfo()?

   Regards,

   J. M. Lawson Williams

   P.S.   , and a paid-up MSVC "Professional" subscriber.  So far, no 4.2, but I doubt that has any bearing on the subject...

			  <<<<<<******>>>>>>


   Dated at:  23:22    on 23 October 96

   Environment:  Win 95, MVC++ 4.1

   G'Day!

	   Problem:  How to get Tooltips displayed when the owning modeless dialog does not have the focus?

   Background.

   I am extending an existing application with a number of modeless dialogs which each employ (typically) a dozen "standard" wizard-built buttons.  These dialogs are all owned/hidden/displayed by the MainFrame.  The aims to replace the dialog buttons with toolbars, "pallette"-style, and thereby get more buttons in less area.

   Using the sample CMNCTRLS as a guide, my CToolBarCtrl works fine so long as the dialog has the focus.  However, the application is essentially an edit, so as the document is modified, the focus shifts from the dialog to the current view.  Depending upon the function selected, there may be several ways of terminating the sequence, but now the toolbar buttons give no clues as to which to use!

   Substituting "p_MainFrame" for "this" in CMyToolBarCtrl::Create loses the relationship between placement of the dialog and the placement of the toolbar;  the toolbar is displayed on startup though the dialog is concealed;  no tooltips are displayed anyway!  No sign of anything going to the Mainframe except the standard Afx stuff E100, E101, etc.

   Watching "OnNotify" in both the Dialog and the ToolBar shows that a particular TB Button is only identified in the WPARAM value when the dialog has the focus.  Only "OnNcHitTest" is invoked regardless of the focus, but the code-sequence into the source-library disappears into a mire of thread-state analysis and message-filtering which I would prefer not to have to unravel, and most likely can't change anyway.  Putting in a (yuk!)

	     CWnd* pWndOwner = GetParent();
	     CWnd* pWndPrev = pWndOwner->SetActive();
	     UINIT i=CToolBarCtrl::OnNcHitTest(...);
	     pWndPrev->SetActive();

   just caused the screen to flash  --  still no tooltips!

   I am reluctant to start experimenting with CToolTipCTrls because of the sheer convenience of using the Wizard/.RC file/CToolBarCtrl approach.  Little geometry to consider, neat rows and columns, and simple to add new buttons or change the button order.

   So, can anyone throw any light on how to enable these tooltips so long as the application has the focus?

   Yours in hope,
   Jim LW

			  <<<<<<******>>>>>>

   Dated at:  11:51    on 25 October 96
   Reply-To: mfc-l@netcom.com
   Sender: owner-mfc-l@majordomo.netcom.com
   From: jimt1@voicenet.com (Jim Tannenbaum)

   [Mini-digest: 2 responses]

   >Problem:  How to get Tooltips displayed when the owning modeless
   >          dialog does not have the focus?
   >

   Jim,

	   Enable the TTN_ALWAYSTIP attribute for ToolTips.

   Jet



   JJM Systems, Inc                 Phone: (215) 672-3660
   1 Ivybrook Blvd, Suite 190       Fax:   (215) 672-5702
   Ivyland, PA  19874               Net:   jimt1@voicenet.com


   -----From: Dong Chen 

   Try to overwrite the OnToolHitTest() function.
   Inside the function, use ChildWindowFromPoint() to get a CWnd* pointer.  It will ensure you get one no matter if it has the focus. Then display your tooltip. This worked in my App Bar application.
   Hope this help.

			  <<<<<<******>>>>>>

   Dated at:  19:04    on 29 October 96
   Message:To:  mfc-l@netcom.com
	   cc:  jimt1@voicenet.com
	   cc:  d.chen@ix.netcom.com

   G'day!
   No joy, I'm afraid.

   1)  "OnToolHitTest()" doesn't get invoked in the ToolBarCtrl,
	the dialog that owns it, or the MainFrame.

   2)  I can find no TTN_ALWAYSTIP in my 4.1 MVC, but there is a TTS_ and a TTF_ defined.  Adding these singly & in combination, e.g.,


   ok=m_pBar->Create(WS_CHILD | WS_VISIBLE |
		     CCS _NOPARENTALIGN|CCS_NORESIZE|
		     TBSTYLE_TOOLTIPS|TBSTYLE_WRAPABLE|TTF_ALWAYSTIP,
		     rectBar,this,IDR_FRED);

   had no effect.

   Thanks for consideration.
   Jim LW

			  <<<<<<******>>>>>>

   Dated at:   8:37    on 31 October 96

   From: Mario Contestabile 

   >2)  I can find no TTN_ALWAYSTIP in my 4.1 MVC, but there is a TTS_ and a
   >TTF_ defined.  Adding these singly & in combination, e.g.,
   >
   >ok=m_pBar->Create(WS_CHILD | WS_VISIBLE |
   >                 CCS _NOPARENTALIGN|CCS_NORESIZE|
   >                  TBSTYLE_TOOLTIPS|TBSTYLE_WRAPABLE|TTF_ALWAYSTIP,
   >                  rectBar,this,IDR_FRED);
   >
   >had no effect.

   With a CToolBarCtrl you should use TBSTYLE_TOOLTIPS style for creation and handle OnNotify() for tooltips. Although you won't have tooltips when it doesn't have the focus, this seems to be the standard (aka MSVC, IE 3.1). Note this is #defined in commctrl.h to be 0x100 [line 534].

   Eg:
   YourCToolBarDerivedClass::OnNotify(WPARAM wParam, LPARAM lParam,                                    LRESULT* pResult)
   {
    NMHDR* pNMHDR       = (NMHDR*)lParam;
    LPTOOLTIPTEXTA TTextA = (LPTOOLTIPTEXTA)lParam;
    LPTOOLTIPTEXTW TTextW = (LPTOOLTIPTEXTW)lParam;
    if(pNMHDR->code == TTN_NEEDTEXTA || pNMHDR->code == TTN_NEEDTEXTW){
    }
   }

   In your case, you're using TTF_ALWAYSTIP as a style bit. That flag should be used only for the TOOLINFO::uFlags structure. What you might of done is use YourCToolBarCtrl::SetToolInfo(&ti); making sure you set ti.uFalgs to TTF_ALWAYSTIP.

   I guess it can get confusing. You got
   CBRS_TOOLTIPS     // Use for CToolBar creation         [afxres.h]
   TBSTYLE_TOOLTIPS  // Use for CToolBarCtrl creation  [commctrl.h]
   TTS_ALWAYSTIP     //  [winres.h] ??
   TTF_ALWAYSTIP     //  Use with CToolBarCtrl::SetToolInfo()  [afxwin.h]

   mcontest@universal.com

			  <<<<<<******>>>>>>

   Dated at:  11:24    on  1 November 96
   To:  mcontest@universal.com
   cc:  mfc-l@netcom.com, jimt1@voicenet.com

   G'day!
   I takes me hat off to you, Mario.  You're a better man than I.
   Throwing the TTF ALWAYSTIP into the CToolBarCtrl::Create() was
   more in hope than anticipation.  I'd chucked Get/SetToolInfo
   into the Too-Hard basket because the Documentation starts off

   BOOL GetToolInfo( LPTOOLINFO lpToolInfo, CWnd* pWnd, UINT nIDTool = 0)
							     ^^^^^^^
   Return Value
   Nonzero if successful; otherwise 0.
   Parameters
   lpToolInfo   Pointer to a TOOLINFO structure.
   pWnd         Pointer to the window that contains the tool.
   nIDText   ID of the string resource that contains the text for the tool.
	    ^^^^^^^
   and then it gets confusing.  Follow the instructions by defining a TOOLINFO and you get

   error C2664: 'GetToolInfo' : cannot convert parameter 1 from 'struct
   tagTOOLINFOA' to 'class CToolInfo &' (new behavior; please see help)

   So I've pressed on:  code-slab follows.  But you still have to click somewhere on the damn dialog for the tips to become available.

   How DID you get this thing to work????

   Yours in extreme puzzlement,
   Jim LW


   static UINT BASED_CODE button[] =
   {
       // same order as in the bitmap 'fredtoolbar.bmp'
       ID_BUTTON_1,
       ID_BUTTON_2,
       
       ID_BUTTON_LAST
   };

   ////////////////////////////////////////////////////////////////////////
   // CFredToolBar message handlers

   BOOL CFredToolBar::Create(DWORD dwStyle, const RECT& rect,
		      CWnd* pParentWnd, UINT nID,
		      CCreateContext* pContext)
   {
       // TODO: Add your specialized code here and/or call the base class
       BOOL ok;
       ok= CToolBarCtrl::Create(dwStyle, rect, pParentWnd, nID);
       if (!ok)
	  return -1;

       int nButtons = sizeof(button)/sizeof(button[0]);
       m_pTBButtons = new TBBUTTON[nButtons];

       for  (int i=0;iGetToolInfo(toolInfo,this,button[i]);
	   if  (!ok)
	       return -1;
	   toolInfo.uFlags|=TTF_ALWAYSTIP;
	   pTipCtrl->SetToolInfo(&toolInfo);
       }

       return ok;
   }


   From Mario Contestabile Sat Nov 23 20:49:42 1996
   Return-Path: 
   Received: from majordomo.netcom.com by concentra.com (SMI-8.6/SMI-SVR4)
	   id UAA15613; Sat, 23 Nov 1996 20:49:40 -0500
   Received: by majordomo.netcom.com (8.7.5/8.7.3/(NETCOM MLS v1.01)) id KAA17733; Sat, 23 Nov 1996 10:24:56 -0800 (PST)
   Message-Id: <9611220102.AA0165@UOSMTL2.universal.com>
   To: mfc-l 
   From: Mario Contestabile
     
   Date: 21 Nov 96 16:59:27 EDT
   Subject: MSVC & Internet
   Mime-Version: 1.0
   Content-Type: Text/Plain
   Sender: owner-mfc-l@majordomo.netcom.com
   Errors-To: owner-mfc-l@majordomo.netcom.com
   Precedence: bulk
   Reply-To: mfc-l@netcom.com
   Content-Length: 889

   Environment: MSVC 4.2b, Wnidows NT 3.51 SP5

   I use MFC's collection of Internet classes to download a HTML file.
   Since I haven't found a good way of parsing HTML text myself,
   I use Microsoft's ICP HTML control. It's OnDoRequestEnbedded 
   Event is called for embedded images. The HTML control currently supports only
   HTML 2.0. The control freezes when it downloads certain pages, one
   of which is the Microsoft home page. I don't know why it freezes,
   but I rather not feed it a HTML document which is a version greater than 2.0.
   The control won't get files using "file://".
   I use CHttpFile::QueryInfo to obtain information on pages, but there is no 
   discernible
   difference between pages it reads perfectly(www.universal.com), and pages it 
   chokes on (www.microsoft.com).
   How can I determine the HTML level using MFC?
   Why is the OCX choking on Microsoft's home page?

   mcontest@universal.com







| Вернуться в корень Архива |