?
Solved

How to open winhelp as inactive

Posted on 1997-07-15
5
Medium Priority
?
285 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 200 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 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