Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » FIX - SizeGrip executes first MenuEntry of MenuBar
icon3.gif  FIX - SizeGrip executes first MenuEntry of MenuBar [message #13750] Fri, 25 January 2008 21:42 Go to next message
loki is currently offline  loki
Messages: 36
Registered: October 2007
Member
Hello,

I got some problem with the SizeGrip in the StatusBar.
After releasing the MouseButton on it, the first entry in the MenuBar is executet. Both, StatusBar and MenuBar belong to the same Ctrl.

I think it has something to do with this code:
void SizeGrip::LeftDown(Point p, dword flags)
{
	TopWindow *q = dynamic_cast<TopWindow *>(GetTopCtrl());
	if(!q || q->IsMaximized() || !q->IsSizeable()) return;
	p = q->GetMouseViewPos();
#ifdef PLATFORM_WIN32
	HWND hwnd = q->GetHWND();
	if(hwnd) {
		::SendMessage(hwnd, WM_SYSCOMMAND, 0xf008, MAKELONG(p.x, p.y));
		::SendMessage(hwnd, WM_LBUTTONUP, 0, MAKELONG(p.x, p.y));
	}
#endif


Edit
This should fix it under Windows. Can't test it under Linux.
p = q->GetMouseViewPos();

I use 2008.1 beta


greetings
loki
  • Attachment: Testcase.zip
    (Size: 740.02KB, Downloaded 427 times)

[Updated on: Fri, 25 January 2008 22:40]

Report message to a moderator

Re: FIX - SizeGrip executes first MenuEntry of MenuBar [message #13751 is a reply to message #13750] Fri, 25 January 2008 22:51 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
loki wrote on Fri, 25 January 2008 15:42

This should fix it under Windows. Can't test it under Linux.
p = q->GetMouseViewPos();



Thanks, indeed, good testcase, good hint at the problem!

Anyway, what if the TopWindow has some frame?

I have fixed it with:

	p = GetMousePos() - q->GetRect().TopLeft();


Mirek
Previous Topic: Look of MenuBar dependent on position of calls
Next Topic: How do I text overlay an image in a Upp::Button ?
Goto Forum:
  


Current Time: Thu Mar 28 16:11:18 CET 2024

Total time taken to generate the page: 0.01073 seconds