It is currently Tue Nov 12, 2019 2:04 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Offline MSDN/WIN32 reference
PostPosted: Fri Jul 05, 2019 7:51 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Mar 11, 2009 4:06 pm
Posts: 140
Location: NL
Useful to some:
http://phix.x10.mx/download.php

See paragraph about 'Optional help file'. A modern offline CHM help file distilled from the online MSDN pages. If only PB would allow to use this with F1... Fred? I mean that old win32.hlp thing is way past it's expiration date! And the link in the PB help to the SDK http://www.microsoft.com/msdownload/pla ... sdkupdate/ doesn't even work anymore.

The scripting language Phix (which is similar in use to OpenEuphoria) itself is also worth a look btw.


Top
 Profile  
Reply with quote  
 Post subject: Re: Offline MSDN/WIN32 reference
PostPosted: Fri Jul 05, 2019 10:40 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Apr 10, 2017 6:17 pm
Posts: 285
Location: Germany
Cool thanks. I will incorporate this into my own windows message debugging stuff for purebasic before releasing it. But first i have to check which one is more complete and if the licensing is compatible ;)

_________________
webpage


Top
 Profile  
Reply with quote  
 Post subject: Re: Offline MSDN/WIN32 reference
PostPosted: Fri Jul 05, 2019 11:38 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 628
Location: Linz, Austria
Create your own IDE Tool... https://www.purebasic.fr/english/viewtopic.php?p=535561#p535561


Top
 Profile  
Reply with quote  
 Post subject: Re: Offline MSDN/WIN32 reference
PostPosted: Fri Jul 05, 2019 12:16 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Feb 01, 2012 3:30 pm
Posts: 748
Location: Nottinghamshire UK
Hi chi thanks for the link and both chi and ts-soft for the code :)

Ctrl + F1
Brill :)

Anyone wants win32.chm ---- https://sourceforge.net/projects/win32-help-chm/

Zebuddi. :)

_________________
malleo, caput, bang. Ego, comprehendunt in tempore


Top
 Profile  
Reply with quote  
 Post subject: Re: Offline MSDN/WIN32 reference
PostPosted: Sun Jul 07, 2019 6:04 am 
Offline
Enthusiast
Enthusiast

Joined: Wed Mar 11, 2009 4:06 pm
Posts: 140
Location: NL
slight modification of code
Code:
EnableExplicit

If CreateMutex_(0, 1, "MSDN.CHM") = 0 Or GetLastError_() <> 0
  PostMessage_(FindWindow_(0,"MSDN"), #WM_CLOSE, 0, 0)
EndIf

Prototype HtmlHelp(a, b.s, c, d)

#HH_DISPLAY_TOC    = 1
#HH_DISPLAY_TOPIC = $0
#HH_HELP_FINDER = $0
#HH_SET_WIN_TYPE = $4
#HH_GET_WIN_TYPE = $5
#HH_GET_WIN_HANDLE = $6
#HH_SYNC = $9
#HH_KEYWORD_LOOKUP = $D
#HH_DISPLAY_TEXT_POPUP = $E
#HH_HELP_CONTEXT = $F
#HH_TP_HELP_CONTEXTMENU = $10
#HH_TP_HELP_WM_HELP = $11

Structure HH_AKLINK
  cbStruct.l
  fReserved.l
  pszKeywords.s
  pszUrl.s
  pszMsgText.s
  pszMsgTitle.s
  pszWindow.s
  fIndexOnFail.l
EndStructure

Procedure HtmlHelp(HelpFile.s, Keyword.s) ;by ts-soft (https://www.purebasic.fr/english/viewtopic.php?p=355981#p355981)
  Protected AKLIN.HH_AKLINK, HtmlHelp_.HtmlHelp, hWnd
 
  Protected DLL = OpenLibrary(#PB_Any, "HHCtrl.ocx")
  If DLL
    HtmlHelp_ = GetFunction(DLL, "HtmlHelpW")
    With AKLIN
      \cbStruct = SizeOf(HH_AKLINK)
      \fReserved = 0
      \pszKeywords = Keyword
      \fIndexOnFail = #True
    EndWith
    hWnd = HtmlHelp_(0, HelpFile, #HH_KEYWORD_LOOKUP, AKLIN)
    ;HtmlHelp_(0, HelpFile, #HH_DISPLAY_TOC, 0)
    CloseLibrary(DLL)
    ProcedureReturn hWnd
  EndIf
EndProcedure

Define chm.s, word.s, hWnd_chm

Select CountProgramParameters()
  Case 2
    chm = ProgramParameter(0)
    word = ProgramParameter(1)
  Default
    chm = GetPathPart(GetEnvironmentVariable("PB_TOOL_IDE")) + "Help\mini.chm"
    word = ProgramParameter(0)
    If word = ""
      word = GetEnvironmentVariable("PB_TOOL_Word")
    EndIf
EndSelect
word = RTrim(word, "_")
word = LTrim(word, "#")
hWnd_chm = HtmlHelp(chm, word)
If hWnd_chm
  ;MessageRequester("Debug", chm + #CRLF$ + word, #PB_MessageRequester_Info)
  While IsWindow_(hWnd_chm)
    Delay(1000)
  Wend
Else
  MessageRequester("Help file not found", "Please copy mini.chm to a 'Help' folder in the PureBasic installation folder or specify help file location and keyword as program parameters." + #CRLF$ + #CRLF$ + chm + #CRLF$ + word, #PB_MessageRequester_Info)
EndIf


ps. Somehow GetEnvironmentVariable("PB_TOOL_Word") always returns empty, so at the moment that variable is useless? Anyway, compile to exe, add tool with exe path and arguments "C:\Tools\MSDN\mini.chm" %WORD and shortcut of your choice.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye