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

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


TOOLTIPTEXTW

Paul.B.Folbrecht@JCI.Com
Thursday, December 05, 1996

     Environment: VC++ 4.1, Windows95
     
     I need to override CFrameWnd::OnToolTipText() in my CFrameWnd 
     derivitive, and I copied some code out of the MFC class.  This code 
     references a struct called TOOLTIPTEXTW, and my code will not compile 
     because of this.  This is obviously a Unicode structure, and a comment 
     in the MFC code notes that both ANSI and Unicode versions of the 
     message need to be handled, even in non-Unicode builds.  The struct is 
     defined in commctrl.h, inside a #ifndef ANSI_ONLY block.  This would 
     seem to be the culprit, except that I #undef ANSI_ONLY before 
     #including commctrl.h, to no avail.  
     
     My questions are:
     1) Why, out of curiosity, is it necessary to handle the Unicode 
     version of this message even on Win95?
     2) How the devil to I get this to compile?
     
     -Paul Folbrecht
     Compureware Corp.
                                                                            
                                



Kostya Sebov -- sebov@is.kiev.ua
Tuesday, December 10, 1996

>        Environment: VC++ 4.1, Windows95
>
>        I need to override CFrameWnd::OnToolTipText() in my CFrameWnd
>        derivitive, and I copied some code out of the MFC class.  This code
>        references a struct called TOOLTIPTEXTW, and my code will not compile
>        because of this.  This is obviously a Unicode structure, and a comment
>        in the MFC code notes that both ANSI and Unicode versions of the
>        message need to be handled, even in non-Unicode builds.  The struct is
>        defined in commctrl.h, inside a #ifndef ANSI_ONLY block.  This would
>        seem to be the culprit, except that I #undef ANSI_ONLY before
>        #including commctrl.h, to no avail.
>
>        My questions are:
>        1) Why, out of curiosity, is it necessary to handle the Unicode
>        version of this message even on Win95?
>        2) How the devil to I get this to compile?
>
>        -Paul Folbrecht
>        Compureware Corp.
>
>

To solve your problem #define NO_ANSIUNI_ONLY early enough.

If your app is intended to run _exclusively under Win95_ you may safely erase
all the Unicode stuff you inherited from the MFC source code, however under NT,
which uses by default Unicode structures in the nofification messages, such
app will break.
--- 
Kostya Sebov. 
----------------------------------------------------------------------------
Tel: (38 044) 266-6387 | Fax: (38 044) 266-6195 | E-mail: sebov@is.kiev.ua




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