Re: [3/7] dinput: Added enumerated devices to ConfigureDevices dialog
Lucas Fialho Zawacki <lfzawacki(a)gmail.com> writes:
+static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + static LPDIACTIONFORMATW lpdiaf; + static DIDevicesData devices_data; + static ConfigureDevicesData *conf_data; + + switch(uMsg) + { + case WM_INITDIALOG: + /* Initialize action format and enumerate devices */ + conf_data = (ConfigureDevicesData*) lParam; + lpdiaf = conf_data->params->lprgFormats;
It doesn't make sense to pass the info as WM_INITDIALG parameter if it's going to be stored in global variables anyway. A better way would be to store this in the window info. -- Alexandre Julliard julliard(a)winehq.org
It doesn't make sense to pass the info as WM_INITDIALG parameter if it's going to be stored in global variables anyway. A better way would be to store this in the window info.
Any pointers on what's the set of winapi functions used to store and retrieve data in windows? I've searched MSDN for almost 30 minutes and no luck.
On Wed, Aug 31, 2011 at 3:11 AM, Lucas Zawacki <lfzawacki(a)gmail.com> wrote:
Any pointers on what's the set of winapi functions used to store and retrieve data in windows? I've searched MSDN for almost 30 minutes and no luck.
Try SetWindowLongPtr [1] / GetWindowLongPtr [2]. You probably want to use the W variants of the functions, though the A/W distinction doesn't make much sense in this case. Octavian [1] http://msdn.microsoft.com/en-us/library/ms644898(v=VS.85).aspx [2] http://msdn.microsoft.com/en-us/library/ms633585(v=VS.85).aspx
On Tue, Aug 30, 2011 at 09:11:33PM -0300, Lucas Zawacki wrote:
It doesn't make sense to pass the info as WM_INITDIALG parameter if it's going to be stored in global variables anyway. A better way would be to store this in the window info.
Any pointers on what's the set of winapi functions used to store and retrieve data in windows? I've searched MSDN for almost 30 minutes and no luck.
SetPropA/W Also offset 0 of the window longs are usually used, like e.g. in comctl32/tooltips.c: SetWindowLongPtrW (hwnd, 0, (LONG_PTR)infoPtr); Ciao, Marcus
participants (4)
-
Alexandre Julliard -
Lucas Zawacki -
Marcus Meissner -
Octavian Voicu