Developer Poll: Uptake of Orbiter "Help" feature

Developers: Have you used the ingame vessel or scenario Help feature?


  • Total voters
    41
Ok, that sounds like a good idea. Does windows provide a html viewer control for dialogs (I haven't seen one), or do I need an external package? It would be even better if the viewer allowed the sources to be packed up in chm or zip files to keep everything compact and avoid too many files.

CodeProject's site have often helper class for such things:
https://www.google.fr/search?q=win32+html+codeproject

Maybe this one ?
http://www.codeproject.com/Articles/3365/Embed-an-HTML-control-in-your-own-window-using-pla

I know I've seen such things in the past, I can search more but I have to go yet...
 
Last edited:
Not sure about native Windows SDK, but MFC, wxWidgets and .NET come with such functions. I think you need to embed the Internet Explorer ActiveX for that in Windows SDK.
 
He he, just compiled this one (No mfc, nor net, plain C++/win32)
http://www.codeproject.com/Articles/3365/Embed-an-HTML-control-in-your-own-window-using-pla

Seem to work well :) (compiled with VC++ 2005)

Martin20121126131107.jpg
 
Since this C approach supports the CHM format, it could be a nice way to package the description page. :)
 
But for any user embedded help/scenario description pleaaaaaase
fight.gif
no PDF or CHM or any hard to write/edit/maintain format only.

Html is so easy, light and user/coder friendly.
 
Last edited:
But for any user embedded help/scenario description pleaaaaaase
fight.gif
no PDF or CHM or any hard to write/edit/maintain format only.
It wouldn't be CHM only. Supporting CHM in this case is the additional benefit of using the COM/OLE to make the rendering of the html by Internet Explorer's engine (IWebBrowser2 -- the main object of Internet Explorer), which supports CHM too (which is mainly compressed html).
 
But for any user embedded help/scenario description pleaaaaaase
fight.gif
no PDF or CHM or any hard to write/edit/maintain format only.
Html is so easy, light and user/coder friendly.

CHM is also pretty easy to write/edit/maintain. Its not more than ZIP compressed HTML files with the images, if I remember correctly.
 
CHM is also pretty easy to write/edit/maintain. Its not more than ZIP compressed HTML files with the images, if I remember correctly.

Indeed, but manual assembly of such a package continues to be annoying. I'm sure there is some utility for it, though.
 
Indeed, but manual assembly of such a package continues to be annoying. I'm sure there is some utility for it, though.

Yep, and that prevent simple utility automatic writing of help, image/text edit on the fly etc. etc.

But if we have both no problem, let %&@ CHM die gracefully. :lol:
 
Yep, and that prevent simple utility automatic writing of help, image/text edit on the fly etc. etc.

Well, of course, lets say, it is a no-brainer, if you use a makefile or other automated build-prozess (eg, Ant). The µ-Soft hc tool is pretty much all that is needed beyond making a normal HTML page with images.
 
I've used the codeproject tool Dan suggested. One problem though: It doesn't seem to like loading a text string more than once into the browser window. The second time the window goes blank. Can you check if you get the same problem? (Can be reproduced with the "simple.c" example they provide. Just call the DisplayHTMLStr a second time in main). If you see the same problem - any suggestions how to fix it? I'm not sure I understand their code well enough to go bug hunting.
 

Attachments

  • launchpad.png
    launchpad.png
    219.8 KB · Views: 56
The second time the window goes blank. Can you check if you get the same problem? (Can be reproduced with the "simple.c" example they provide. Just call the DisplayHTMLStr a second time in main). If you see the same problem - any suggestions how to fix it? I'm not sure I understand their code well enough to go bug hunting.

It seem to be a know bug see here:
http://www.codeproject.com/script/Forums/Messages.aspx?fmid=294464

I didn't read all the comments, maybe there is a solution at least you have some explanation above.

Now why not accumulate the texts and send them once with one call only ?

Dan
 
It seem to be a know bug see here:
http://www.codeproject.com/script/Forums/Messages.aspx?fmid=294464

I didn't read all the comments, maybe there is a solution at least you have some explanation above.
Thanks, I'll check if I can get anywhere with the suggestions in the comments.

Now why not accumulate the texts and send them once with one call only ?
Not sure I understand. It blanks when I try to replace the text, e.g. after clicking on a different scenario. You didn't mean to recurse through all scenarios and stuff all their description texts into a single string?
 
Ah okay, I didn't dig into this, was out then ac/dc power went down. (bad weather)
You have a pm thought.
 
We're in business :cheers:

Unfortunately there is a small but noticable delay when loading a page, even just a short text string - just long enough to be annoying. I guess that's the price for using a fancy layout engine.

Also, I was trying to change the default text formatting by parsing an entire html page description (including css reference) as a string, but it didn't work. I think the string is copied into an existing page, so the header informations are no longer used. Maybe I find a way to define a style sheet from the code.
 

Attachments

  • launchpad2.png
    launchpad2.png
    93.5 KB · Views: 36
Unfortunately there is a small but noticable delay when loading a page, even just a short text string - just long enough to be annoying. I guess that's the price for using a fancy layout engine.

For delay maybe just reverse to plain text when no link is detected in the string ? Maybe using two overlapping windows one dedicated for fancy engine and the other for default text. (alternate ShowWindows if shutting down/starting Iweb interface take time)

From my test there is no need to shutdown/restart the control to send several DisplayHTMLStr, if you do that it's maybe the cause of the delay ?

Also, I was trying to change the default text formatting by parsing an entire html page description (including css reference) as a string, but it didn't work. I think the string is copied into an existing page, so the header informations are no longer used. Maybe I find a way to define a style sheet from the code.

You can also use richedit windows with the technic above, I made extensive use of those and I have win32 helper ready if you want. (including "in memory" construction of text (Allow colors, font, bold, underline etc. etc.) They are light fast.

Well just some idea, as I'm not testing this actually it may sound off topic.
 
Last edited:
I think I solved the delay problem. There was a hardcoded delay of 1 second built into the code to make sure the page loading had finished. (this apparently is a workaround for the blank page problem I mentioned earlier). I've now reduced this to 50ms and it still seems to work ok.

I also managed to modify the text formatting by prepending a <style></style> section before any text strings I send.
 

Attachments

  • launchpad3.png
    launchpad3.png
    77.4 KB · Views: 30
I think I solved the delay problem. There was a hardcoded delay of 1 second built into the code to make sure the page loading had finished. (this apparently is a workaround for the blank page problem I mentioned earlier). I've now reduced this to 50ms and it still seems to work ok.

Maybe this workaround (and even the 50ms delay) is completely unnecessary with the new code, there is a "WaitOnReadyState" which was not here in the "simple" project.

Anyway great job ! :thumbup: A minimal window size would help also to not completely mess most of the html presentation (580px for example)
 
Hello Dr Schweiger,

Is this the same "device" that will be used internally (in full screen) and do you know if it accepts javascript, SWF ? And if it embarks PDF, will it be necessary to use a dedicated editor or Acrobat for example?

CHM is ... pretty easy to write/edit/maintain. Its not more than ZIP compressed HTML files with the images, if I remember correctly.

Yes, you remember correctly.
 
Last edited:
Is this the same "device" that will be used internally (in full screen) and do you know if it accepts javascript, SWF ? And if it embarks PDF, will it be necessary to use a dedicated editor or Acrobat for example?
Not yet. Currently the window you get when pressing Alt-F1 during a simulation is still the CHM viewer from the HtmlHelp API (including table of contents, navigation buttons etc.) I may consider switching this over as well, but for now the changes only affect the display in the Launchpad dialog.

I haven't tried if the browser plugin allows displaying PDF files. Maybe it automatically utilises whatever PDF viewer plugin is installed in IE. If it works, it may be useful to link to external documention.

Not sure I understand the question about the editor. If you want to generate PDF files, you can use your favourite exporter for whatever word processor you use. LaTeX can do it, OpenOffice can do it, and I think even Word can do it.
 
Back
Top