1. simple WINHELP.E !

I don't know why, but this does all I want... on my machine,  .....if it
reformats your drive... oops.
( Yikes !! , Irv, I guess we were just trying "too" hard. Again thanks for
all your help. )
Pasting the "essentials" from this into msgbox.e would save a cluster, AND
one line of typing ! smile
Next dumb question from a "newbie" too busy USING EUPHORIA to learn HOW.
How do I get a custom_sort to work in descending order. ( 999 TO 0 ), or
better yet, does anyone have a custom_sort() that works either way, maybe
by passing a flag parameter ?  ...any help appreciated.
Thanks to all.. Wolf.

------winhelp.e------

include dll.e
include machine.e
include misc.e

atom user32
integer winhlp_id

if platform() = WIN32 then
 user32 = open_dll("user32.dll")
 if user32 = 0 then
    puts(1,"Error opening user32.dll\n")
    abort(1)
 end if

 winhlp_id =
 if winhlp_id = -1 then
 puts(2, "Error registering WinHelpA\n")
 abort(1)
 end if

end if

-- where atom command is
-- = #0002  ..quits help (HELP_QUIT). in YOUR terminate procedure
-- = #0003  ..starts helpfile index (HELP_INDEX)
-- = #0003  ..starts helpfile contents (HELP_CONTENTS)
-- = #0004  ..starts help on help (HELP_HELPONHELP)
-- = #0009  ..forces use of named helpfile (HELP_FORCEFILE)
-- these are the only ones I've tested blink
-- called like this..  GetHelp(MYWINDOW,"myhelp.hlp",#0003,0)

global procedure GetHelp(atom hwnd, -- handle of owner window
                         sequence FileName, --help file
                         atom command, -- type of help needed
                         atom data) -- value related to type of command

atom file_ptr, start
  -- how to pass messages to the help engine !!
file_ptr = allocate_string(FileName)
   start = c_func(winhlp_id, {NULL, file_ptr, command, data})
--notice hwnd is NULL here, if I tried to use it, NOTHING !
free(file_ptr)
end procedure

---------------------

new topic     » topic index » view message » categorize

2. Re: simple WINHELP.E !

>How do I get a custom_sort to work in descending order. ( 999 TO 0 ), or
>better yet, does anyone have a custom_sort() that works either way, maybe
>by passing a flag parameter ?  ...any help appreciated.
>Thanks to all.. Wolf.

>>>>
function descending (object x, object y)
    return -compare(x,y)
end function

constant p_descending = routine_id ("descending")
-- now pass p_descending as the custom compare function with custom_sort
>>>>

You're welcome..
BTW im back from vacation.. all tanned and stuff... going through too many
mails..

>>>>>>>

A New list.. oh well, one thing for sure, I'll always post to both at the
same time, the minute Nate's list actually gets some users. So, people, if
you receive every mail of me twice you know why ? Cuz I (still) am not in
favor of multiple lists, but this way it works for me.... (subscribe to all,
post to all)

There is such a gray line with many subjects... and Im wondering, will there
be any people not subscribing to all lists ? I mean, a seperate list means a
different audience.. and I dont think we're talking about a different
audience ... so why a different room ? Its only more confusing... oh
well.... its not my choice and shouldnt be as well...

Happy coding, discussing, etc.. people.

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu