Classic Shell http://www.classicshell.net/forum/ |
|
Source code question http://www.classicshell.net/forum/viewtopic.php?f=7&t=4480 |
Page 1 of 1 |
Author: | noober [ Tue Apr 14, 2015 6:53 am ] |
Post subject: | Source code question |
Dear Mr. Beltchev, First of all, I'd like to thank you for the brilliant program. We found a lot of tricks, solutions and shortcuts in your source code. Without the classic shell code it would be much, much harder for us to develop our system utilities (one of them is very similar but is different the same time, as we need to show custom URLs, some integration information from another application and so on). Very impressive system knowledge on your side! But there is one trick I still have no ideas about: Code: _Tooltip=CreateWindowEx(WS_EX_TOPMOST|WS_EX_TOOLWINDOW|WS_EX_TRANSPARENT|(m_bRTL?WS_EX_LAYOUTRTL:0),TOOLTIPS_CLASS,NULL,WS_POPUP|TTS_NOPREFIX|TTS_ALWAYSTIP,0,0,0,0,NULL,NULL,g_Instance,NULL); Why do you use the zero-sized tooltip? It somehow fixes handling messages in the rebar, as far as I see, so when you move the taskbar to the left from the bottom (for instance), the rebar is repositioned properly (and if you comment that out, it stops doing so). Thank you in advance! Regards, |
Author: | Ivo [ Tue Apr 14, 2015 7:43 am ] |
Post subject: | Re: Source code question |
That's how I've always done it. The size of the tooltip is determined by the text it is going to display, which is not known at creation time. Zero is as good as any. The MSDN samples use CW_USEDEFAULT, which will probably also work for you. |
Author: | noober [ Tue Apr 14, 2015 8:34 am ] |
Post subject: | Re: Source code question |
Yep, it's understood )) What I mean is the following: until we create the tooltip (uncommenting the quoted line), if we move the main taskbar on the second monitor under Windows 8.0, the rebar subclass procedure isn't called, so our custom startbutton will be drawn over the rebar window. Actually, we tried to fix the problem being inspired by the Classic Shell and created the tooltip. It has helped, but what is the relation between creating the tooltip and handling messages in SubclassRebarProc? Is this relation intentional at all or it's just a coincidence? Thank you very much for the answer! Regards, |
Author: | noober [ Tue Apr 14, 2015 8:38 am ] |
Post subject: | Re: Source code question |
Let me add the following. What we tried is exactly commenting the line out in the Classic Shell source code, not ours. It is the Classic Menu, that starts or stops working properly when moving the taskbar as described above, *NOT* our program. This is why we've copied it for the same purpose. But personally I don't want to be a copycat, I want to understand gears inside )) Regards, |
Author: | Ivo [ Tue Apr 14, 2015 9:16 pm ] |
Post subject: | Re: Source code question |
Which tooltip is this? The one for the start button? Also which version of Windows do you have? |
Author: | noober [ Wed Apr 15, 2015 3:44 am ] |
Post subject: | Re: Source code question |
Tooltip: CStartButton::m_Tooltip, ClassicStartButton.cpp, line #76, Classic Shell 3.6.8. Windows: Windows 8.0. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |