GetFocus() in Win95 vs. 3.1

GetFocus() in Win95 vs. 3.1

Post by Glen Gord » Thu, 07 Sep 1995 04:00:00



I am porting a 16-bit Windows 3.1 application to Windows 95.  It makes
heavy use of GetFocus at times when it is not the active application.
When a 16-bit application is active, the window with focus is properly
returned just like in Windows 3.1.  However, when a 32-bit app is
active, GetFocus returns NULL.  I can speculate as to the reasons for
this, but my goal is to find a work around.  Any ideas would be most
appreciated.

Thanks

--Glen

 
 
 

GetFocus() in Win95 vs. 3.1

Post by Mike H. » Fri, 08 Sep 1995 04:00:00



Quote:>I am porting a 16-bit Windows 3.1 application to Windows 95.  It makes
>heavy use of GetFocus at times when it is not the active application.
>When a 16-bit application is active, the window with focus is properly
>returned just like in Windows 3.1.  However, when a 32-bit app is
>active, GetFocus returns NULL.  I can speculate as to the reasons for
>this, but my goal is to find a work around.  Any ideas would be most
>appreciated.

Hi Glen:

How about GetForegroundWindow()?
It always returns the window that is currently in the foregound.

Regards,

Mike

 
 
 

1. COM Add-in vs. Automation vs. Word Add-ins vs...

Hello Folks,

I am hoping that some learned person out-there in the COM-aware
community can clear-up this... nebulousness, for me.

I am about to begin a project which would traditionally be known as
a "Word Add-in". I am using VC++ 6 and Word2000.

In past such projects we used the old CAPI, and the "Word Add-in"
(a.k.a. .wll) would be loaded by Word upon startup by virtue of it's
existence in Word's "Startup" folder, and began it's life in the  'C'
wdAutoOpen() call. The old application became

- Does "Automation" (formerly "OLE Automation") imply that the Client
  (myClient.dll) launches and commands the Server (in this case Word)?
  How does Automation differ from a COM Add-in?

- Is the "COM Add-in" the right way to go for extending Word's
functionality?

- What are the implied benefits of using a COM Add-in to implement MS
  Word extensions over other methods of doing so?

Any info concerning the above would be much appreciated indeed!

Thanks.

--
Sean

======================
         Sean C. Murphy
    Sr. Software Engineer
      Document.Com, Inc.
       617.542.7200 X232

======================

2. Best method to mix sounds in Windows

3. WM_NCHITTEST 16bit app in Win95 vs 3.1

4. OS/2 1.3 SE Printer Problems

5. Timers under Win95 vs. 3.1

6. HELP HOWTO Keep the object.FOCUS on one object ?

7. Timers under Win95 vs Win 3.1

8. Long---Multiples OS's--Multiple drives

9. < SetFocus() and GetFocus() under Win95 >

10. Win 3.1 look under Win95

11. Win95,NT,3.1 Search(grep) & Replace utility

12. Win95 Beta and TurboDebugger for Borlands C++ 3.1

13. Batch programs for Windows 3.1 (Win95)