Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Probelmm with TC7 Help on Vista
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Total Commander Forum Index -> TC Fixed bugs Printable version
View previous topic :: View next topic  
Author Message
Lefteous
Power Member
Power Member


Joined: 08 Feb 2003
Posts: 7671
Location: Germany

PostPosted: Wed Dec 27, 2006 12:24 pm    Post subject: Reply with quote

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 Twisted Evil
Who cares about the content?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 2867
Location: Moscow, Russia

PostPosted: Wed Dec 27, 2006 12:54 pm    Post subject: Reply with quote

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. Very Happy So, there is just nothing to discuss. Wink
_________________
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
 
Using TC 8.01 / Win7 x64 SP1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lefteous
Power Member
Power Member


Joined: 08 Feb 2003
Posts: 7671
Location: Germany

PostPosted: Wed Dec 27, 2006 1:05 pm    Post subject: Reply with quote

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 Laughing
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 2867
Location: Moscow, Russia

PostPosted: Wed Dec 27, 2006 1:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Lefteous
Power Member
Power Member


Joined: 08 Feb 2003
Posts: 7671
Location: Germany

PostPosted: Wed Dec 27, 2006 1:37 pm    Post subject: Reply with quote

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 Very Happy So, there is just nothing to discuss. Wink
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 24590
Location: Switzerland

PostPosted: Fri Dec 29, 2006 11:34 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Thoemmeli
Junior Member
Junior Member


Joined: 27 Dec 2006
Posts: 2
Location: Cham, CH

PostPosted: Mon Jan 01, 2007 8:27 am    Post subject: Reply with quote

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
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 24590
Location: Switzerland

PostPosted: Tue Jan 02, 2007 11:01 am    Post subject: Reply with quote

That's indeed an interesting idea, I will try it!
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 24590
Location: Switzerland

PostPosted: Fri Jan 12, 2007 2:06 pm    Post subject: Reply with quote

I have added this code now. You can test it with the old sample CHM help file from here:

http://ghisler.fileburst.com/655_pub_b1/totalcmd_chm.zip

Sorry, currently I don't have a newer CHM file available for testing.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lefteous
Power Member
Power Member


Joined: 08 Feb 2003
Posts: 7671
Location: Germany

PostPosted: Fri Jan 12, 2007 2:22 pm    Post subject: Reply with quote

I have tested this and it works fine (both Escape and Shift+Escape).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
djk
Power Member
Power Member


Joined: 17 Mar 2003
Posts: 1651
Location: Poland

PostPosted: Fri Jan 12, 2007 4:15 pm    Post subject: Reply with quote

Yes, it works ok now.
_________________
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 2867
Location: Moscow, Russia

PostPosted: Fri Jan 12, 2007 5:47 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 24590
Location: Switzerland

PostPosted: Sun Jan 14, 2007 8:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 2867
Location: Moscow, Russia

PostPosted: Thu Feb 22, 2007 11:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 24590
Location: Switzerland

PostPosted: Fri Feb 23, 2007 3:17 am    Post subject: Reply with quote

Thanks!
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC Fixed bugs All times are GMT - 6 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
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
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group