Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

I was attacked by dselect as a small child and have since avoided debian. -- Andrew Morton


devel / comp.os.ms-windows.programmer.win32 / IDirectInputDevice8 mouse - when to acquire/unacquire problems

SubjectAuthor
o IDirectInputDevice8 mouse - when to acquire/unacquire problemsR.Wieser

1
IDirectInputDevice8 mouse - when to acquire/unacquire problems

<tk2k1u$un0$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1131&group=comp.os.ms-windows.programmer.win32#1131

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: IDirectInputDevice8 mouse - when to acquire/unacquire problems
Date: Fri, 4 Nov 2022 09:55:05 +0100
Organization: Aioe.org NNTP Server
Lines: 44
Message-ID: <tk2k1u$un0$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="31456"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-RFC2646: Format=Flowed; Original
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Fri, 4 Nov 2022 08:55 UTC

Hello all,

I've create a small DirectX program in which I (ofcourse) use the mouse to
point my way in. It runs in a simple dialog (no controls). I think I've
got the graphics side down.

But it turns out that the when to acquire / unacquire the mouse is ...
problematic.

For starters, I initially put them into the WM_SETFOCUS and WM_KILLFOCUS
events of the dialog. It turns out that when restoring the dialog (from a
minimized state) the acquire of the mouse seems to be ignored (no error
though).

So, I tried to use the WM_ACTIVATE event instead, and as far as I can tell
it works (the reason I'm describing this is that I would not mind to get a
hint on what the commonly used method is, as my time using ddg/brave/google
have not turned anything up in that regard).

Secondly, although I can use F10 to "uncapture" the mouse (added code to the
WM_ENTERMENULOOP and WM_EXITMENULOOP events to release and re-acquire the
mouse) to click the dialogs caption to move it about the mouse gets
re-aquired and the whole dialog jumps in big steps to the bottom of the
desktop, leaving only the caption bar visible.

I know *why* that that happens (the mouse gets centered to the dialog, the
dialog caption jumps to the mouse position, rinse and repeat) and can likely
write something that will first check if the mouse is in the client area of
the dialog and only than call the code updating the camera, I was wondering
if its already build in.

tl;dr:
How do I tell IDirectInputDevice8 to ignore the mouse when its not inside
the client-area of the dialog - so I can resize the dialog or move it.

-or-

Which WM_* event(s) should I use to acquire and unacquire the mouse so the
above doesn't happen when I F10 and click outside the dialogs client area.

Regards,
Rudy Wieser

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor