View unanswered posts | View active topics It is currently Thu May 23, 2013 11:38 pm



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 29 posts ]  Go to page Previous  1, 2
 languageBar plugin or how to get keyboard layout code using 
Author Message
BBSage
User avatar

Joined: Thu Jul 26, 2007 12:27 pm
Posts: 116
Location: Kyiv, Ukraine
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
I've tested plugin under blackbox. Plugin can be loaded in slit, but loading it in BBI causes blackbox to crush.
Here is a part of BB log. Maybe it will be usefull:
Code:
13:59:18 - MBoxErrorValue Called:  Plugins\bbLangdis\LangDis.dll
This plugin signaled an error on loading.
13:59:18 - MBoxErrorValue Called:  Plugins\bbLangdis\LangDis.dll
This plugin crashed on loading.

_________________
Read this first: sorry for my mistakes above ;) . I'm Ukrainian and don't know English well.


Tue Jul 31, 2007 11:14 am
Report this post
Profile ICQ
Sponsored Links
Google Adsense


Site Admin
User avatar

Joined: Sun Dec 05, 2004 8:59 pm
Posts: 1316
Location: Boise, Idaho
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
I'll dig a little deeper, see what I can find. Thanks for the heads up!

_________________
-- Brian


Tue Jul 31, 2007 7:54 pm
Report this post
Profile ICQ YIM WWW
Site Admin
User avatar

Joined: Sun Dec 05, 2004 8:59 pm
Posts: 1316
Location: Boise, Idaho
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
Thanks to noccy we figured out what was going on with LangDis. Get the v1.2 DLL in the original post here. I've tested under BBLean 1.16 and noccy tested under bbClean. Should work under bbLean_mod as well.

For the programmer types out there, here's what happened. I was reporting TRUE (1) on beginPluginEx which actually means there was an error. So the core thought the plugin did not load and apparently released the plugin's memory after I had done all initialization including sending the BB_REGISTERMESSAGE. In addition because the plugin had actually loaded, I did not delete the class instance that I was using. I was registered for the hook messages include BB_ACTIVATE, BB_REDRAW, etc. so when the core tried to send up a messagebox it also signalled to my now released winproc (via post message) that the window was changing. Can we see this going downhill?

Anyway, all fixed, thanks noccy for helping me knock this out!

_________________
-- Brian


Tue Jul 31, 2007 9:58 pm
Report this post
Profile ICQ YIM WWW
BBSage
User avatar

Joined: Thu Jul 26, 2007 12:27 pm
Posts: 116
Location: Kyiv, Ukraine
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
It works!
I noticed, that slit is no needed now. But how can I change plugin' position, when it is not in slit?

And some downsides:
1. Terrible BIG (about 16-18 pt) font, if plugin is in slit or in BBI. I dont know, how it can be fixed.
2. It is impossible to view current keyboard layout, if switching with Ctrl+Shift or other default combinations. Plugin needs window reactivation to refresh the information in this case.

TNX for plugin!

_________________
Read this first: sorry for my mistakes above ;) . I'm Ukrainian and don't know English well.


Tue Jul 31, 2007 11:35 pm
Report this post
Profile ICQ
Site Admin
User avatar

Joined: Sun Dec 05, 2004 8:59 pm
Posts: 1316
Location: Boise, Idaho
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
eDio wrote:
It works!
I noticed, that slit is no needed now. But how can I change plugin' position, when it is not in slit?

You can't yet, one of the reasons that even if you do load it outside the slit, you shouldn't ;)

Quote:
And some downsides:
1. Terrible BIG (about 16-18 pt) font, if plugin is in slit or in BBI. I dont know, how it can be fixed.

Uses the style information returned from the core (specificly returned by GetStyleSettingPtr). Uses toolbar.windowlabel or toolbar (depending on whether it's slitted or on it's own.)

Quote:
2. It is impossible to view current keyboard layout, if switching with Ctrl+Shift or other default combinations. Plugin needs window reactivation to refresh the information in this case.


Hmm... Will have to see what can be done about that. To my knowledge the notification is only sent to the active window (which is why the plugin doesn't get the message.) But I'll see what I can find. My only recommendantion would be not to use the default key combinations and instead bind them as hot keys to the supplied broams.

_________________
-- Brian


Wed Aug 01, 2007 12:11 am
Report this post
Profile ICQ YIM WWW
BBSage
User avatar

Joined: Thu Jul 26, 2007 12:27 pm
Posts: 116
Location: Kyiv, Ukraine
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
Quote:
Uses the style information returned from the core (specificly returned by GetStyleSettingPtr). Uses toolbar.windowlabel or toolbar (depending on whether it's slitted or on it's own.)

hm... In my style font "snap" defined for all elements. But look at this screenshot:
Attachment:
screen1.PNG
screen1.PNG [ 718 Bytes | Viewed 2059 times ]


And there is no such font defined nor in windows' theme settings nor in "global fonts" settings. :?:

_________________
Read this first: sorry for my mistakes above ;) . I'm Ukrainian and don't know English well.


Wed Aug 01, 2007 8:44 am
Report this post
Profile ICQ
Site Admin
User avatar

Joined: Sun Dec 05, 2004 8:59 pm
Posts: 1316
Location: Boise, Idaho
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
Hmm.. Seems to be working for me under BBLean 1.16..

Attachment:
screeny.png
screeny.png [ 27.52 KiB | Viewed 1426 times ]


The ENU in the menu is obviously hard coded ;)

_________________
-- Brian


Wed Aug 01, 2007 7:05 pm
Report this post
Profile ICQ YIM WWW
BBDinosaur
User avatar

Joined: Fri Jan 27, 2006 4:16 am
Posts: 794
Location: Karlstad, Sweden
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
tresni wrote:
Anyway, all fixed, thanks noccy for helping me knock this out!


No problem! Crashing blackbox is twice as fun when you're doing it with someone :D

_________________
Don't forget to check the BlackBox FAQs.

Jabber: noccy@jabber.se | Web: www.noccy.com | Blog: Minimal Security


Wed Aug 01, 2007 7:12 pm
Report this post
Profile ICQ YIM WWW
BBSage
User avatar

Joined: Thu Jul 26, 2007 12:27 pm
Posts: 116
Location: Kyiv, Ukraine
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
It looks allready fine, when is not in slit. Problem appears only when I load plugin in slit or BBI.
Attachment:
langdis.PNG
langdis.PNG [ 2.34 KiB | Viewed 2090 times ]

_________________
Read this first: sorry for my mistakes above ;) . I'm Ukrainian and don't know English well.


Wed Aug 01, 2007 7:14 pm
Report this post
Profile ICQ
Site Admin
User avatar

Joined: Sun Dec 05, 2004 8:59 pm
Posts: 1316
Location: Boise, Idaho
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
Ah. Okay, I think I know the problem then ;) Thanks for the heads up!

_________________
-- Brian


Wed Aug 01, 2007 7:17 pm
Report this post
Profile ICQ YIM WWW
Site Admin
User avatar

Joined: Sun Dec 05, 2004 8:59 pm
Posts: 1316
Location: Boise, Idaho
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
Update for 1.4
Checks to make sure there is a font, if not requests SN_TOOLBAR which should always have a font ;)

Download at original post

_________________
-- Brian


Wed Aug 01, 2007 8:01 pm
Report this post
Profile ICQ YIM WWW
BBSage
User avatar

Joined: Thu Jul 26, 2007 12:27 pm
Posts: 116
Location: Kyiv, Ukraine
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
Once more little problem:
I have turned off default key combinations. Now I use Bro@ms via bbKeys to change layout. But plugin not always refresh info. About every 15th switch stays unnoticed by plugin. The next switch returns plugin to it's normal work.

And another interesting thing: when I'm using bbKeyHook and scancodes of Ctrl and Shift to switch layout, plugin ignores the first switch and displays previous to current layout (need to say, I have 3 layouts: ENU, RUS, UKR). For example if layout is Ukrainian, langDis displays "RUS", if - English, langDis displays "UKR" and so on. It lasts till the next "freeze" or reactivation of window.

_________________
Read this first: sorry for my mistakes above ;) . I'm Ukrainian and don't know English well.


Wed Aug 01, 2007 8:24 pm
Report this post
Profile ICQ
BBSage
User avatar

Joined: Thu Jul 26, 2007 12:27 pm
Posts: 116
Location: Kyiv, Ukraine
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
It's all right with fonts now!

Thank you!

_________________
Read this first: sorry for my mistakes above ;) . I'm Ukrainian and don't know English well.


Wed Aug 01, 2007 8:30 pm
Report this post
Profile ICQ
Site Admin
User avatar

Joined: Sun Dec 05, 2004 8:59 pm
Posts: 1316
Location: Boise, Idaho
Reply with quote
Post Re: languageBar plugin or how to get keyboard layout code using
So are these the same problem or two seperate ones? I'm thinking they are seperate, and I think I might have a way around the second one. The first one is likely due to delay between the message being sent and when the application processes it. There's no return for it though (according to the documentation it should always be a PostMessage, meaning you don't wait for it.)

I'll try a couple things though and see how they work.

_________________
-- Brian


Wed Aug 01, 2007 11:37 pm
Report this post
Profile ICQ YIM WWW
Sponsored Links
Google Adsense


Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 29 posts ]  Go to page Previous  1, 2


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.