| View previous topic :: View next topic |
| Author |
Message |
Lefteous Power Member


Joined: 08 Feb 2003 Posts: 7671 Location: Germany
|
Posted: Wed Dec 27, 2006 12:24 pm Post subject: |
|
|
Quite funny to see people discussing about how to _close_ the help file. This seems to be the number one use case of the help file
Who cares about the content? |
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2867 Location: Moscow, Russia
|
Posted: Wed Dec 27, 2006 12:54 pm Post subject: |
|
|
| roentgen666 wrote: | | We should have a contest... you will lose with such method for sure |
Certainly not - in Russian environment. To use your methode with Russian Windows it is necessary to press: Alt+Space, Ctrl+Shift (to switch the keyboard layout; Alt+Shift alternatively), then Alt+P (the Russian key for closing is located there).
In any case, this discussion is useless. The question is: Is it possible to close CHM by Esc without external tools, and if yes - how to do it? One can suggest not to use CHM, another can suggest to press Alt+Space/C, third can suggest to press Alt+F4, but all these are not the answer to the original question.
| Lefteous wrote: | Quite funny to see people discussing about how to _close_ the help file. This seems to be the number one use case of the help file
Who cares about the content? |
Changing the content is not a problem. If you wish to change it - you just change it, and it becomes changed. So, there is just nothing to discuss.  _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
Lefteous Power Member


Joined: 08 Feb 2003 Posts: 7671 Location: Germany
|
Posted: Wed Dec 27, 2006 1:05 pm Post subject: |
|
|
| Quote: | | If you wish to change it - you just change it, and it becomes changed. |
Yes of course - I'm the help file author and all my change requests are applied immediately  |
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2867 Location: Moscow, Russia
|
Posted: Wed Dec 27, 2006 1:19 pm Post subject: |
|
|
| Lefteous wrote: | | Yes of course - I'm the help file author |
You know what I mean. _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
Lefteous Power Member


Joined: 08 Feb 2003 Posts: 7671 Location: Germany
|
Posted: Wed Dec 27, 2006 1:37 pm Post subject: |
|
|
| Quote: | | You know what I mean. |
Changing the html help engine is not a problem. If you wish to change it - you just change it, and it becomes changed. Just write a letter to steve@microsoft.com So, there is just nothing to discuss.  |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24590 Location: Switzerland
|
Posted: Fri Dec 29, 2006 11:34 am Post subject: |
|
|
Perhaps someone will write a HLP file viewer plugin for lister? Then TC could simply sow the HLP files by itself!
Are the specifications for HLP available? _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
Thoemmeli Junior Member

Joined: 27 Dec 2006 Posts: 2 Location: Cham, CH
|
Posted: Mon Jan 01, 2007 8:27 am Post subject: |
|
|
There is a way to close CHM / HTML Help with Esc:
Use Windows Hooks to hook into the Keyboard messages and close the HTML Help whenever the Total Command help is the active window.
Here is some pseudo code (I have an example that works, but with C# and a hooking library from MSDN Magazine):
(Sorry for the lazy formatting and incompletness)
| Code: |
IntPtr m_hhook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHook, instanceOfModule, 0);
int KeyboardHook(int code, IntPtr wParam, IntPtr lParam)
{
if (code < 0)
return CallNextHookEx(m_hhook, code, wParam, lParam);
CloseChmIfActive(lParam);
// Yield to the next hook in the chain
return CallNextHookEx(m_hhook, code, wParam, lParam);
}
void CloseChmIfActive(IntPtr lParam)
{
KBDLLHOOKSTRUCT kbdStruct = (KBDLLHOOKSTRUCT)Marshal.PtrToStructure(lParam, typeof(KBDLLHOOKSTRUCT));
if (kbdStruct.vkCode == 27) // Esc
{
FindAndCloseHelpForm();
}
}
void FindAndCloseHelpForm()
{
int handle = FindWindow("HH Parent", "Total Commander");
if (handle == 0) return false;
int foregroundHandle = GetForegroundWindow();
if (handle == foregroundHandle)
{
// Post a message to Application to end its existence.
Win32.SendMessage(handle, WM_SYSCOMMAND, SC_CLOSE, 0);
}
}
|
Good luck
Thomas _________________ Don't try to bend the spoon - there is no spoon. |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24590 Location: Switzerland
|
Posted: Tue Jan 02, 2007 11:01 am Post subject: |
|
|
That's indeed an interesting idea, I will try it! _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24590 Location: Switzerland
|
|
| Back to top |
|
 |
Lefteous Power Member


Joined: 08 Feb 2003 Posts: 7671 Location: Germany
|
Posted: Fri Jan 12, 2007 2:22 pm Post subject: |
|
|
| I have tested this and it works fine (both Escape and Shift+Escape). |
|
| Back to top |
|
 |
djk Power Member


Joined: 17 Mar 2003 Posts: 1651 Location: Poland
|
Posted: Fri Jan 12, 2007 4:15 pm Post subject: |
|
|
Yes, it works ok now. _________________ DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl |
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2867 Location: Moscow, Russia
|
Posted: Fri Jan 12, 2007 5:47 pm Post subject: |
|
|
Works fine, but only till first change of the language! Steps to reproduce:
0. I have TotalCmd.chm in the TC installation directory and WCMD_RUS.HLP in the Language subdir. Initially, the language of TC is English.
1. I start TC, press F1 (CHM help is opened), then Esc - the help is closed.
2. Now I go to Configuration -> Language and select the Russian, press OK.
3. I press F1 - Russian HLP file is opened. Close it with e.g. the same Esc.
4. Again to Configuration -> Language and select the English language (internal); OK.
5. Press F1 - CHM help is opened, but it cannot be closed with Esc anymore. TC restart is needed.
(You can experiment with German help file instead of the Russian: unpack it from the TC installation archive, rename into WCMD_DEU.HLP and put into the Language subdir.) _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24590 Location: Switzerland
|
Posted: Sun Jan 14, 2007 8:11 am Post subject: |
|
|
I fear that this is impossible, because the old CHM window is still hooked, not the new one. I will try to find a solution, but I cannot promise anything. You will probably need to close and restart TC. _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2867 Location: Moscow, Russia
|
Posted: Thu Feb 22, 2007 11:46 am Post subject: |
|
|
The problem is fixed in beta4. _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24590 Location: Switzerland
|
Posted: Fri Feb 23, 2007 3:17 am Post subject: |
|
|
Thanks! _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
|