Solved

How to open winhelp as inactive

Posted on 1997-07-15
5
282 Views
Last Modified: 2010-04-06
I want my program to work so that every time dialog is displayed -> help appears next to it (they will be side by side). Only problem is that the focus is transfered to the winhelp-window, so that key shortcuts in my dialog dosent work.

Any ideas how to open winhelp and keep to focus in a main program.
0
Comment
Question by:olmy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 1

Expert Comment

by:ygolan
ID: 1338914
Why don't you post a message to yourself right after you call WinExec, and call Application.MainForm.BringToFront when you get the message ?
0
 
LVL 1

Author Comment

by:olmy
ID: 1338915
Have you tried it? I couldn't make it work!
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 100 total points
ID: 1338916
Look at this :

Call your help-file with :

BOOL WinHelp(

    HWND  hwnd,      // handle of window requesting Help
    LPCTSTR  lpszHelp,      // address of directory-path string
    UINT  uCommand,      // type of Help
    DWORD  dwData       // additional data
   );

Winhelp(hwnd, lpszHelp, HELP_SETWINPOS, HelpWinInfo)

HelpWinInfo is of structure :

typedef struct {    // hwi

    int   wStructSize;
    int   x;
    int   y;
    int   dx;
    int   dy;
    int   wMax;
    TCHAR rgchMember[2];
} HELPWININFO;

Variable wMax specifies how the window is shown :

so give wMax SW_SHOWNA.

I haven't tried it out, but I guess this works. Hope it for you!
If it works, let us know!

Have fun
c.u.
ZifNab.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1338917
I think you better reject my answer, don't think it works. But maybe I've helped you a little bit. I'll have a closer look when I have the time.

I think you even don't have to call WinHelp, you can also use HelpCommand(Help_SetWinPos, HelpWinInfo)
The problem at the moment is that I don't know how to fill in HelpWinInfo. Maybe you've to give it with the helpfile source.

Other sollution??? Use the Windows API : SetWindowPos() and use the handle of the help-form.

Hope I've helped you already a little bit. If you've found to beat the HelpWinInfo problem, please give me a sign.

Have fun,
c.u. ZifNab!
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1338918
Hi Olmy,

Sorry, haven't found a solution.

A asked somebody and he says that when a program, online help starts, the help-window automaticaly becomes activated. You can't do anything about it.
What you can do is after activating help online, to activate your  own window.

Like this :

Application.HelpContext({something});
SetActiveWindow(Form1.Handle);

Hopes this helps you,
Have fun,
c.u. ZifNab;


0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question