|
I'm working on putting some animated goodness into my Settlers of Catan freeware port (http://www.settlers3d.net). Specifically, I'm trying to hide player information until the mouse passes over it, at which point the player info zooms out from the right and stays there until the button gets the WM_MOUSELEAVE message and then it zooms back left.
The problem is that I have a couple of owner draw buttons inside my main player info button. Whenever the mouse cursor moves over these buttons, even though it is still within the player button client area, Windows sends a WM_MOUSELEAVE message and my control zooms back to the left. I've tried commenting out all mouse-handling messages within these child owner-draw buttons to no avail. I still get the WM_MOUSELEAVE message. Anyone know how to prevent this from happening?
I suspect that I'm screwed, but maybe there are some decent workarounds.
|
|
|
|
|
when u get the wm_mouseleave message cant u check to see where it is on the screen or what window its still over and decide from there?
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
Yes, I can do that. The problem is that I then have to call _TrackMouseEvent again immediately to set up the mouse handler and it causes some bad flickering in the control. I might look into that a little more, though.
|
|
|
|
|
We had the same issue with some snapping windows done here. What we did was on the WM_MOUSELEAVE, we used the GetCursorPos() and WindowFromPoint() functions and checked who the parent of that window was. If it was the window the TrackMouseEvent was used on, we setup a new one for the button. When it leaves the button you will have to check again that its not on the parent or another child window of the parent etc...
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
Yeah, thanks, that's exactly what I ended up doing last night, execpt I used GetCursorPos(), GetWindowRect(), and the PtInRect() function of CRect to check if the cursor position was inside the client rectangle.
Thanks for the help. I got it to work without flicker by overriding the OnEraseBackground() method and immediately returning TRUE, which I should have done a while ago, anyway.
|
|
|
|
|
Arrrggghh!
I'm having trouble with InsertItem(), for an CTreeCtrl object. The following gives me an Assertion Error, twice on each iteration of the for loop.
CdlgABC* dlgABC = new CdlgABC(this);
for(int j=0; j<i; j++)
dlgABC->m_tree.InsertItem(dlgABC->m_strArray.GetAt(j), TVI_ROOT, TVI_SORT);
dlgABC.DoModal();
Any clues as to what to check out, would be greatly appreciated.
Thanks!!
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
Before DoModal your CTreeCtrl isn't associated with Win32 HWND. It can't do anything, especially invoke InsertItem. Put your code in CYourDlg::OnInitDialog.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
...and slowly, painfully the pieces come together.
Thanks for your help!
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
Hi everyone,
Does anybody know of an easy way to change the dropdown arrow on a Combobox to a user-defined icon? I guess it will need some sort of owner-drawn implementation? Are there any examples that anyone knows of?
Thanks in advance for your help...
Steve
|
|
|
|
|
I run the console application (ie. ipconfig) from another process and need to read ipconfig's text output.
Is it possible or not?
Thanks,
Marek.
|
|
|
|
|
|
Hello there,
I tried to make my dialog like Windows Media player skins by using CRgn ...
But i don't know to do it
Could you show me source code how to do this ?
Or can you help me ???
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
Hello Chris and thanks for the article
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I have two charachter string.I want to check if first one exist in second one.With which C library functiom or win32 API I can do it?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
|
Thnaks.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Hi, I have created an MDI using CFormView. I have 2 forms. CMyProjView is the 1st form containing user inputs. The second form is activated using a button handler.
How to access data stored in CMyProjDoc from the second form?
I tried this in OnInitialUpdate() of CForm2
CMyProjDoc * pDoc = (CMyProjDoc*) GetDocument();
m_Variable = pDoc->data[i];
m_EditBox.Format("%.2f",m_Variable);
but I get an Assertion failure.
Any suggestions?
Thanks
|
|
|
|
|
Where exactly you're getting assertion failure?
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
The form is created in CMyProjApp::InitInstance and a call to OnInitialUpdate() is made.
The failure occurs when I execute the project; i.e. immediately
|
|
|
|
|
Look at the call stack and check where exactly are you getting the assert.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
As Title.
It's said that "The system associates a window station with a process when the process is created" in MSDN.
but in what case does a process not associate a window station?
hi
|
|
|
|
|
From MSDN:
"A window station is a secure object that contains a clipboard, a set of global atoms and a group of desktop objects. The interactive window station assigned to the logon session of the interactive user also contains the keyboard, mouse, and display device. The interactive window station is visible to the user and can receive input from the user. All other window stations are noninteractive, which means that they cannot be made visible to the user, and cannot receive user input"
Johndotcom wrote:
but in what case does a process not associate a window station?
AFAIR, service processes under NT 3.5 had no winstation, but they've changed in NT 4.0. Why are you asking?
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
A window station in the MS terminology is a virtual window station in which processes are run in a separate address space, and by the way are not visible to your current session (even in the task manager).
In fact MS introduced window stations along with desktops. The system can have many window stations. Each window stations can have many desktops.
The interactive window station, yours , is window station named "winsta0" with default desktop named "default".
Wat are window stations for ? for instance to circumvant current NT limits such like the total amount of GDI objects per session.
If you need to know more about this, do a search with "winsta0",
And I swallow a small raisin.
|
|
|
|
|
StephaneRodriguez wrote:
virtual window station in which processes are run in a separate address space
Processes are executed in separate address spaces, with winstations or not.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|