September 26, 2022, 06:39:57 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


External Help system for Aurora and EBasic

Started by sapero, May 16, 2008, 08:08:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sapero

May 16, 2008, 08:08:36 PM Last Edit: January 16, 2009, 06:22:51 AM by sapero
This is a Document Explorer project, like dexplore from the Platform SDK or MSDN.

When running, it will extend the Aurora/EB build in help system - just select a word in the editor and press F1.
If Aurora/EB fails to find the selected keyword in help files, will send a query to this application to search in installed PSDK help.
You need also to have PSDK/MSDN installed.

Features:
- browse all installed SDK namespaces with single application: Platform SDK for Windows Server 2003, MSDN Library for Visual Studio, Driver Developer Kit, Windows SDKs ...
- the selected namespace and filter will be used to search for keywords that were not found in Aurora/EB help files
- integrated web browser, based on ATL implementation (atl.dll), with extended interface support (script debug disabled)
- typed keywords in edit box are automatically highlighted in topic list, this is done by ultra fast string scanner (divide range and compare)
- history for typed keywords and URLs (not saved on exit)
- drag'drop support - the editbox for typing keywords is accepting dropped text from browser, scintilla or any other OLE source.
- standard web browser commands: print, back, forward, stop, home, show source, save page, document properties, editable content with paste/delete/undo/redo support!

Requirements:
- Microsoft Document Explorer installed with any Platform SDK or MSDN. The application itself is not required, but hxds.dll is.
- at least Windows 2000 - program was developed and tested on Windows XP

Todo list:
- no program options

Notes:
The viewer source code is not yet splitted into modules. But there is a trick to execute many menu commands by single call:
CApp::OnCommand(WPARAM wParam)
{
MENUITEMINFO m;

if ((wParam >= IDM_SAVEAS) && (wParam <= IDM_CONTENTEDITABLE))
{
declare *ExecMenu(CApp *pThis);
ExecMenu = *(int)*(int)this[wParam-IDM_SAVEAS];
ExecMenu(this);
}
else

This piece of code will call the first virtual method of CApp class for menu command IDM_SAVEAS, second for IDM_SAVEAS+1...

What do you think about?


ts-soft

> What do you think about?
Very helpfull, many thanks
Sorry for my bad english

John S

Sapero,
You're amazing!  Keep up the good work.
John Siino, Advanced Engineering Services and Software

Haim


sapero

May 21, 2008, 06:55:31 PM #4 Last Edit: June 22, 2008, 04:18:49 AM by sapero
Here is the second version, it supports now multiple browsers, drag'n'drop, remembers the browser focus history, and uses another hook type: mouse, that allows selecting whole word in Aurora/EB editor with single mouse click, with CTRL key pressed. I missed this feature, maybe you too :)

I have changed the browser hosting code from ATL (I was unable to create initialized and unnavigated browser) to cwebpage.c with modified code.
The UI_GetDropTarget method has been modified to enable drag-drop with the browser control.

What you can drag:
- topic to lookup box, address bar, tab control, browser (external too)
- anchor from browser to address bar, tab control.

When you start dragging a topic from topic list, CWorkerTopics::OnTopicBeginDrag gets called where multiple OLE formats are added to CDataObject class, then DoDragDrop api is called which does not return until left or right mouse button is pressed (controlled by CDropSource class).

Happy coding!


BTW, use SHIFT to open topic/link in new window.

sapero

I've released third version of this tool - attachment in first post.

Bugfix: the hook extension propertly handles the CTRL+mouse combination. Instead sending or posting a set of messages, CallWindowProc directly to scintilla code did the work.
Bugfix: when main window was visible and you pressed F1 in A/EB, the window did not go to the foreground; fixed.
New: Program has now options.
New: When you start it from a shortcut, it will follow your settins for window position, but for option "minimized window" it will hide to tray. I hope it's not a bad idea.
When starting directly, it will hide only if you closed it from tray menu, and the window was invisible.
Bugfix: Hidding and restoring A/EB window did not restore the hook; fixed.

There is still the quick search bug - when you type cb_ in the search box, the index will highligt cb--border-style keyword (7 items above/before CB_ADDSTRING).

sapero

I have updated the attachment with bugfixes in dll and the viewer.
The dll will ignore htmlhelp events if the topic was found, and the viewer will now scroll correctly; the CB_ bug has been fixed.
The popup listbox (sometimes visible over keywords) is created as owned window.

CWorkerTopics::FindKeywordIndex method uses CompareString api instead StrCmpI. If the keyword was not found, topic with 'more equal characters' will be selected.
If you press F1 (in Aurora or EB) and the keyword was not found, keywords index will only scroll to the best suitable keyword.