Sign in to follow this  
Followers 0
Stumpii

Function Popup Dev Question

8 posts in this topic

I am planning to write a Function Popup utility (like the one that comes with SciTE) for UltraEdit. My question is whether the existing Function Popup code could easily be changed to work with a different editor.


“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites



I am planning to write a Function Popup utility (like the one that comes with SciTE) for UltraEdit. My question is whether the existing Function Popup code could easily be changed to work with a different editor.

<{POST_SNAPBACK}>

FuncPopUp is an application that uses the SciTE Director interface which "communicates" in the background. It comes down to this: Funcpopup asks SciTE at a regular interval what the "Current Word" is and when thats a known entry in the Helpfile or Functionlist , this entry will be shown. When an entry in thelist is double clicked this text is sent to the Editor pane via this background connection.

I don't know if UltraEdit has the same functionality ?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

FuncPopUp is an application that uses the SciTE Director interface which "communicates" in the background. It comes down to this: Funcpopup asks SciTE at a regular interval what the "Current Word" is and when thats a known entry in the Helpfile or Functionlist , this entry will be shown. When an entry in thelist is double clicked this text is sent to the Editor pane via this background connection.

I don't know if UltraEdit has the same functionality ?

<{POST_SNAPBACK}>

OK thanks. I don't think that UltraEdit has that functionality. I have been using it for a long time and never read of any such feature. There may be a workaround using a macro or accessing the edit control directly. I will need to look in to.

Another question: Are you using KeyHH to bring up the Help file, or using the Help API? I have looked at the KeyHH.exe program, but it does not appear to be able to open the help file topic only without the navigation/index pane and menu bar.


“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites

OK thanks. I don't think that UltraEdit has that functionality. I have been using it for a long time and never read of any such feature. There may be a workaround using a macro or accessing the edit control directly. I will need to look in to.

Another question: Are you using KeyHH to bring up the Help file, or using the Help API? I have looked at the KeyHH.exe program, but it does not appear to be able to open the help file topic only without the navigation/index pane and menu bar.

<{POST_SNAPBACK}>

I am using the standard API calls to open the helpfile because this enabled me to make my own screen layout with just the Function/Keyword information.

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I am using the standard API calls to open the helpfile because this enabled me to make my own screen layout with just the Function/Keyword information.

<{POST_SNAPBACK}>

OK, I hoped you wouldn't say that. just spent all morning working out how KeyHH works! :"> Still it may come in handy for something else. Any chance you can let me know what settings you are using for the API call? It would save me some time searching through M$ documentation.

I have just checked and UltraEdit responds to the 'ControlCommand' function, using the 'GetSelected' command, so I can try and read the selected text this way.

Thanks for your help.


“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites

OK, I hoped you wouldn't say that. just spent all morning working out how KeyHH works!  :">  Still it may come in handy for something else. Any chance you can let me know what settings you are using for the API call? It would save me some time searching through M$ documentation.

I have just checked and UltraEdit responds to the 'ControlCommand' function, using the 'GetSelected' command, so I can try and read the selected text this way.

Thanks for your help.

<{POST_SNAPBACK}>

This the code that opens the helpfile on the specified KEYWORD using aAKLINK, in its own Windowlayout with the correct size.....

Hope this helps..

static  char  HtmlFile[2048];
memset(&HtmlFile,0,sizeof(HtmlFile));
static  HH_AKLINK  link;
memset(&link,0,sizeof(link));
static  HH_WINTYPE  HHwt;
memset(&HHwt,0,sizeof(HHwt));
//  *** open helpfile on the select function page.. 
link.cbStruct=sizeof(HH_AKLINK);
link.fReserved=FALSE;
link.pszKeywords=Keyword;
link.pszUrl=NULL;
link.pszMsgText=NULL;
link.pszMsgTitle=NULL;
link.pszWindow="FuncPopUp";
link.fIndexOnFail=FALSE;
// setup stuff for the new window that just shows the plain function help 
HHwt.cbStruct=sizeof(HH_WINTYPE);
HHwt.pszType="FuncPopUp";;
HHwt.fsValidMembers=HHWIN_PARAM_PROPERTIES|HHWIN_PARAM_RECT|HHWIN_PARAM_SHOWSTATE;
HHwt.fsWinProperties=HHWIN_PROP_CHANGE_TITLE;
HHwt.pszCaption="AutoIt3 - Function help";;
HHwt.dwStyles=WS_DLGFRAME;
HHwt.dwExStyles=WS_EX_TOOLWINDOW;;
static  RECT  wndPos;
memset(&wndPos,0,sizeof(wndPos));
wndPos.top=0;
wndPos.left=RWinX;
wndPos.right=WINPOS.right;
wndPos.bottom=WINPOS.bottom;
HHwt.rcWindowPos=wndPos;
HHwt.nShowState=SW_SHOW;
//  Create the window 
HtmlHelp(GetDesktopWindow(),HelpFilename,HH_SET_WIN_TYPE,(DWORD)&HHwt);
//  Open helpfile with a Display_Topic 
HelphWnd=HtmlHelp(GetDesktopWindow(),join(2,HelpFilename,">FuncPopUp"),HH_DISPLAY_TOPIC,0);

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

This the code that opens the helpfile on the specified KEYWORD using aAKLINK, in its own Windowlayout with the correct size.....

Hope this helps..

static  char  HtmlFile[2048];
memset(&HtmlFile,0,sizeof(HtmlFile));
static  HH_AKLINK  link;

...

//  Create the window 
HtmlHelp(GetDesktopWindow(),HelpFilename,HH_SET_WIN_TYPE,(DWORD)&HHwt);
//  Open helpfile with a Display_Topic 
HelphWnd=HtmlHelp(GetDesktopWindow(),join(2,HelpFilename,">FuncPopUp"),HH_DISPLAY_TOPIC,0);

<{POST_SNAPBACK}>

Thanks, it helps alot. Is there a bit missing though? Should there not be another API HH_KEYWORD_LOOKUP call after the HH_DISPLAY_TOPIC call, to perform the keyword lookup with the HH_AKLINK structure?

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites

Thanks, it helps alot. Is there a bit missing though? Should there not be another API HH_KEYWORD_LOOKUP call after the HH_DISPLAY_TOPIC call, to perform the keyword lookup with the HH_AKLINK structure?

<{POST_SNAPBACK}>

Yes you are correct... It is in a different section of the program, because the first portion is only needed once at startup. This is to display the correct keyword Help ...

Ret=HtmlHelp(GetDesktopWindow(),HelpFilename,HH_KEYWORD_LOOKUP,(DWORD)&link);

And this to close the session at the end:

HtmlHelp(GetDesktopWindow(),HelpFilename,HH_CLOSE_ALL,0);

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0