News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Building an HELP

Started by RuiLoureiro, August 02, 2008, 04:07:20 PM

Previous topic - Next topic

RuiLoureiro

Hutch,
         I am learning windows.
         I have not a lot of experince to do the best at the first trial
         So iam going to making things and learning.
         In this case, for now, .Hlp format is good for me.
         One day, may be, i will change to .chm format
         In all cases i found a good tool in HTML Help Workshop: HTML Help Image Editor

        By the way: how do i stick an image here ? I dont know how to show it here
Thanks
Rui

Jimg

Quote from: hutch-- on August 04, 2008, 01:45:07 PM
JJ,

I find search on CHM files useless so I don't waste my time trying to create it. I build the index and contents so they are easy enough to read and don't bother with the rest. Help with search and other facilities could be done much better but I am not going to waste the time writing the help engine to do it.

Hutch-
I just found out my earlier complaints about html searching were incorrect.  The search takes wildcards, so while searching for multi returns nothing, searching for multi* gives me what I wanted.  Enabling search is a simple click on on option.  I'm sure most of us would really appreciate having the capability.

Rui-  Sorry, I don't mean to hijack your topic.

PBrennick

Imagine trying to use WIN32.hlp without a Search option ...

Rui, look at Ewayne Wagner's webpage, he has an editor that builds HLP files easily and it includes the assembly sources.

-- Paul
The GeneSys Project is available from:
The Repository or My crappy website

jj2007

Quote from: hutch-- on August 04, 2008, 01:45:07 PM
JJ,

I find search on CHM files useless so I don't waste my time trying to create it.

Oops, I wanted to hit Bill G. and Hutch got it over the head! I am soooo sorry, Sir  :green2

RuiLoureiro

jj2007,
             everything is going well.
            But how i close the help window when i close the program if the help window is opened.
Thanks
Rui

jj2007

Quote from: RuiLoureiro on August 04, 2008, 05:18:27 PM
jj2007,
             everything is going well.
            But how i close the help window when i close the program if the help window is opened.
Thanks
Rui

Get a handle to the help window with FindWindow etc., then send or post a WM_CLOSE message to this window on WM_CLOSE in your main app...

RuiLoureiro

Quote from: jj2007 on August 04, 2008, 05:23:29 PM

Get a handle to the help window with FindWindow etc., then send or post a WM_CLOSE message to this window on WM_CLOSE in your main app...

jj2007,
        FindWindow returns NULL.
   

.data
_WinHelp         db 'Test.hlp',0        <--- Window Help NAME   
;-------------------------------
_ClassName       db "WinClass",0        <--- Main window class name

;.......................................................................
                invoke  FindWindow, offset _ClassName, offset _WinHelp
                cmp     eax, NULL
                je      @F

It doesnt Find the Help Window and it is opened. Whats going wrong ? Class Name ?
Rui

jj2007

Quote from: RuiLoureiro on August 04, 2008, 06:22:29 PM

It doesnt Find the Help Window and it is opened. Whats going wrong ? Class Name ?
Rui


   invoke FindWindowEx, 0, 0, chr$("MS_WINDOC"), chr$("Test.hlp")

RuiLoureiro

Quote from: jj2007 on August 04, 2008, 07:06:46 PM
   invoke FindWindowEx, 0, 0, chr$("MS_WINDOC"), chr$("Test.hlp")
jj2007,
               Thank you         
               But doesnt work. Class name isnt MS_WINDOC
Rui

PBrennick

Rui,

Try changing it to WinClass

    invoke FindWindowEx, 0, 0, chr$("WinClass"), chr$("Test.hlp")

Whether it will work or not I don't know as I do not have your sources, but one thing is certain, you need to address the classname that 'you' gave it.

-- Paul
The GeneSys Project is available from:
The Repository or My crappy website

jj2007

Quote from: RuiLoureiro on August 04, 2008, 09:29:25 PM
               But doesnt work. Class name isnt MS_WINDOC

Quote from: PBrennick on August 04, 2008, 10:05:04 PM
Whether it will work or not I don't know as I do not have your sources, but one thing is certain, you need to address the classname that 'you' gave it.

Rui launches a .hlp file with an external app (winhelp), and therefore has no influence on its classname. On my XP SP2 machine, WinID finds MS_WINDOC as the classname.

RuiLoureiro

I found the solution:

            - To OPEN the Help Window

.data
_WinHelp         db 'Test.hlp',0         <--- Window Help NAME
;.....................................
.code
invoke  WinHelp, NULL, addr _WinHelp, HELP_CONTENTS, 0     


          - To CLOSE the Help Window

.code
invoke   WinHelp, NULL, addr _WinHelp,HELP_QUIT, 0        


Thank you Paul and jj2007 for your help

*** By the way: how do i stick an image here ? ***

Rui

jj2007

Quoteinvoke  WinHelp, NULL, addr _WinHelp, HELP_CONTENTS, 0

Thanks, Rou, I learnt something new :U

By the way: Did you try finding the classname with WinId? For me, it's MS_WINDOC on all machines, but they are all XP, so it might differ on another OS.

RuiLoureiro

jj2007,
             With WinID it is MS_WINHELP.
             WinID is a good tool.
             Thanks  :U
Rui

thomas_remkus

MAML: http://en.wikipedia.org/wiki/Microsoft_Assistance_Markup_Language

... Just in case you are looking for something a little more cutting edge. Personally, I stick with CHM.