New topic: 

Adding Help To RS App

<http://forums.realsoftware.com/viewtopic.php?t=47373>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        sgdeveloper          Post subject: Adding Help To RS AppPosted: 
Fri Mar 22, 2013 12:08 pm                         
Joined: Fri Mar 22, 2013 11:33 am
Posts: 1                Just started using RS. Can anyone tell me what is the 
best way to add user help (via the Help Menu) to an RS app? Can .chm help file 
form a Windows app be used, and if so, how is this done?   
                             Top                Bob Keeney          Post 
subject: Re: Adding Help To RS AppPosted: Fri Mar 22, 2013 1:07 pm              
                   
Joined: Fri Sep 30, 2005 11:48 am
Posts: 3461
Location: Lenexa, KS                There are any number of ways of doing this. 
 Some people just add a text, pdf, or html files into the bundle (mac) or 
resources directory (win/linux) and find the file and launch it via a 
folderitem.  Some will create Apple Help files or CHM files and do the 
proscribed way of calling them in their respective platforms.  

You can create cross platform Help Files from one source using Simple Help 
Editor which can be found at http://www.bkeeney.com/simple-help-editor/

This is some code I have to launch Window Help:

Private Function ShowWinHelp(pagePath as String, parentWin as window, file As 
String = "") As Boolean
  #if TargetWin32
  dim f as FolderItem
  dim winHandle as Integer
  dim theURL as MemoryBlock
  
  Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (hwnd as 
Integer, url as Ptr, command as Integer, data as integer) as Integer
  Declare Function GetDesktopWindow Lib "user32" () As Integer
  
  if file = "" Then
  f = GetFolderItem("Resources").child("MyWindowsHelp.chm")
  Else
  f = GetFolderItem("Resources").child(file)
  End If
  
  if f is nil or not f.Exists Then
  Return False
  end if
  
  if parentWin is nil then
  winHandle = GetDesktopWindow
  Else
  winHandle = parentWin.Handle
  end if
  
  if pagePath = "" Then pagePath = "index.htm"
  
  theURL = new MemoryBlock(LenB(f.AbsolutePath)+lenb(pagePath)+16)
  theURL.CString(0) = f.AbsolutePath+"::/"+pagePath
  
  Return HTMLHelp(winHandle, theURL, 0, 0) <> 0
  #endif
  
End Function
      
_________________
Bob K.

Real Word Processing for your Real Studio Applications with Formatted Text 
Control
http://www.bkeeney.com/formatted-text-control/  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to