Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
June 2003
- 123 participants
- 692 messages
Re: Wine Status DLL's #2
by Robert North
Tom twickline-at-skybest.com |Wine Mailing Lists| wrote:
> Here is #2 any one have any comments ?
>
> Tom
>
> wintab32.dll 80%
Didn't see that one come in!
Nice to see it up on the list of dlls.
What I'm concerned about is seeing marked as 80% done.
(Aric, don't get me wrong, you've done a great job, but I think the
80% is a bit optimistic.)
Why?
1. It's not even in CVS yet.
2. I think there's a lot of work to do on the patch.
I can't get it to work properly for either Painter or Photoshop,
but I'm getting closer. Will have a demonstration patch & update
on debugging out today.
Aric tells me that it the code works for Codeweavers, and
satisfies their needs perfectly.
3. Parts of the wintab spec are not implemented:
Unicode not implemented.
16 bit calls not implemented.
The Manager part of the spec are not implemented (But I doubt
any users will ever need them).
Tablet Z order changes are not implemented, which
can be important for many more complicated apps, like
CAD systems.
I'd put the state of Wintab at 50% done, and once everything in
point 2. is done, I'd put it at 60-75%.
I suppose you could also add me as a worker on this DLL,
or if you want, wait till I submit the first patch ;-)
Apologies to Aric for raining on his parade.
-Rob.
June 26, 2003
Re: Wine Status Changelog
by Robert North
Tom twickline-at-skybest.com |Wine Mailing Lists| wrote:
> Hello,
>
> Here is what I have for the Changelog thus far.
> There is 49 entries so far and I could have over looked something.
> If anything is out of place, incorrect just let me know and ill fix it.
>
> Tom
>
>
> ------------------------------------------------------------------------
>
>
> Wine Status - ChangeLog
>
> Changes since May 27 2003:
>
> * New - wintab32.dll
Is this in the CVS tree?
Can't see it on the cvsweb page
or in the repository.
Cheers
-Rob.
June 26, 2003
Re: Mac OS X Support : Asm syntax support
by Pierre d'Herbemont
On Thursday, June 26, 2003, at 11:41 AM, Marcus Meissner wrote:
> On Wed, Jun 25, 2003 at 02:32:29PM +0200, Pierre d'Herbemont wrote:
>> Hi,
>>
>> Here is a patch which should add support for Mac OS X ppc asm syntax,
>> and some Mach-O quirk (like text section).
>
>
> This needs 2 places fixed:
>
>> +# define LD_SECTION_TEXT ".section \".text\""
>
> Should be
>
> # define LD_SECTION_TEXT ".section \\\".text\\\""
>
> and:
>
>> +# define PPC_LOW(mem,index) "(" mem ")@l(##index)"
>
> should be:
> # define PPC_LOW(mem,index) "(" mem ")@l(" #index ")"
>
Thanks (and sorry :( ) I am going to fix this, and resend it.
Cheers,
Pierre
June 26, 2003
Re: Mac OS X Support : Asm syntax support
by Marcus Meissner
On Wed, Jun 25, 2003 at 02:32:29PM +0200, Pierre d'Herbemont wrote:
> Hi,
>
> Here is a patch which should add support for Mac OS X ppc asm syntax,
> and some Mach-O quirk (like text section).
> I hope it will be ok. It mainly relay on Macro which are stored in
> build.h (any better place?).
>
> Cheers,
>
> Pierre
>
> ChangeLog:
> - Add support for Mac OS X assembler syntax
This needs 2 places fixed:
> +# define LD_SECTION_TEXT ".section \".text\""
Should be
# define LD_SECTION_TEXT ".section \\\".text\\\""
and:
> +# define PPC_LOW(mem,index) "(" mem ")@l(##index)"
should be:
# define PPC_LOW(mem,index) "(" mem ")@l(" #index ")"
Ciao, Marcus
June 26, 2003
Re: WaitForMultipleObjects loops forever if passed an array of size zero
by Troy Rollo
On Thu, 26 Jun 2003 15:59, Troy Rollo wrote:
> With the condition as (count > MAXIMUM_WAIT_OBJECTS || (count <= 0 &&
> !timeout)), wine's behaviour mirrors that of Win2k, at least for the
> WaitForMultipleObjectsEx(0, 0, INFINITE, QS_ALLEVENTS, 0) case.
While I somehow got MsgWaitForMultipleObjectsEx mixed up with WaitForMultiple
ObjectsEx (too many MSDN windows open), an appropriate test with
WaitForMultipleObjectsEx(0, NULL, FALSE, INFINITE, FALSE) gives the same
result, but...
It now occurs to me that this fix not entirely right either - or at least it
doesn't avoid creating another bug, since Sleep(INFINITE) is valid, and Sleep
goes through WaitForMultipleObjectsEx.
However, since WaitForMultipleObjectsEx(0, NULL, FALSE, INFINITE, FALSE)
returns an error on Win2k, this use of WaitForMultipleObjectsEx to implement
Sleep must be wrong.
June 26, 2003
Re: WaitForMultipleObjects loops forever if passed an array of size zero
by Troy Rollo
On Thu, 26 Jun 2003 10:16, Alexandre Julliard wrote:
> Troy Rollo <wine(a)troy.rollo.name> writes:
> > @@ -412,7 +412,7 @@
> > {
> > int ret, cookie;
> >
> > - if (count > MAXIMUM_WAIT_OBJECTS) return STATUS_INVALID_PARAMETER_1;
> > + if (count > MAXIMUM_WAIT_OBJECTS || count <= 0) return
> > STATUS_INVALID_PARAMETER_1;
>
> This is wrong, 0 is a valid count, and shouldn't cause an infinite
> loop. You'll need to debug this some more.
I see - you're using it for Sleep. It would appear then that the solution is
to change the condition to (count > MAXIMUM_WAIT_OBJECTS || (count <= 0 &&
!timeout)).
The problem manifests in the Borland Library function "wait()". If you call
this library function under real Windows when there are no outstanding child
windows, it returns with an error. Under Wine, it gets stuck in
WaitForMultipleObjectsEx, although it appears it's waiting for some input
from wineserver that never comes rather than looping.
I've just tested Win2K under bochs, and WaitForMultipleObjectsEx is returning
an error of 0x00000057 (ERROR_INVALID_PARAMETER) for wait() without any
children, and for WaitForMultipleObjectsEx(0, 0, INFINITE, QS_ALLEVENTS, 0);
With the condition as (count > MAXIMUM_WAIT_OBJECTS || (count <= 0 &&
!timeout)), wine's behaviour mirrors that of Win2k, at least for the
WaitForMultipleObjectsEx(0, 0, INFINITE, QS_ALLEVENTS, 0) case.
June 26, 2003
PATCH - comdlg32 filedlg win16/32 split
by Steven Edwards
Hello,
Well this is it. Other then in the print dialogs all of the internal
Win16isms are GONE!!!! In a few days I will start on the print dialogs
again.
Now if only it will work =)
Thanks
Steven
Changelog:
Remove calls to FindResource16, FreeResource16, GlobalAlloc16, GlobalFree16
GlobalLock16, GlobalUnLock16, LoadResource16 when building as a 32 bit dll.
Create new internal functions FILEDLG_MapOfnStruct16 and
FILEDLG_DestroyPrivate16.
Share a few other internal functions with the 16 bit commdlg.
Index: filedlg.h
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlg.h,v
retrieving revision 1.2
diff -u -r1.2 filedlg.h
--- filedlg.h 24 Jun 2003 19:24:29 -0000 1.2
+++ filedlg.h 26 Jun 2003 01:43:40 -0000
@@ -60,6 +60,7 @@
LPWSTR FILEDLG_GetFileType(LPWSTR cfptr, LPWSTR fptr, WORD index);
void FILEDLG_MapDrawItemStruct(LPDRAWITEMSTRUCT16 lpdis16, LPDRAWITEMSTRUCT lpdis);
+void FILEDLG_MapOfnStructA(LPOPENFILENAMEA ofnA, LPOPENFILENAMEW ofnW, BOOL open);
BOOL FILEDLG_ScanDir(HWND hWnd, LPWSTR newPath);
LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam,
int savedlg, LPDRAWITEMSTRUCT lpdis);
Index: filedlg.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlg.c,v
retrieving revision 1.64
diff -u -r1.64 filedlg.c
--- filedlg.c 24 Jun 2003 19:24:29 -0000 1.64
+++ filedlg.c 26 Jun 2003 01:43:48 -0000
@@ -155,81 +155,6 @@
return TRUE;
}
-
-/***********************************************************************
- * Get16BitsTemplate [internal]
- *
- * Get a template (FALSE if failure) when 16 bits dialogs are used
- * by a 16 bits application
- *
- */
-BOOL Get16BitsTemplate(LFSPRIVATE lfs)
-{
- LPOPENFILENAME16 ofn16 = lfs->ofn16;
- LPCVOID template;
- HGLOBAL16 hGlobal16 = 0;
-
- if (ofn16->Flags & OFN_ENABLETEMPLATEHANDLE)
- lfs->hDlgTmpl16 = ofn16->hInstance;
- else if (ofn16->Flags & OFN_ENABLETEMPLATE)
- {
- HANDLE16 hResInfo;
- if (!(hResInfo = FindResource16(ofn16->hInstance,
- MapSL(ofn16->lpTemplateName),
- RT_DIALOGA)))
- {
- COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
- return FALSE;
- }
- if (!(lfs->hDlgTmpl16 = LoadResource16( ofn16->hInstance, hResInfo )))
- {
- COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
- return FALSE;
- }
- lfs->hResource16 = lfs->hDlgTmpl16;
- }
- else
- { /* get resource from (32 bits) own Wine resource; convert it to 16 */
- HRSRC hResInfo;
- HGLOBAL hDlgTmpl32;
- LPCVOID template32;
- DWORD size;
-
- if (!(hResInfo = FindResourceA(COMDLG32_hInstance,
- lfs->open ? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA)))
- {
- COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
- return FALSE;
- }
- if (!(hDlgTmpl32 = LoadResource(COMDLG32_hInstance, hResInfo )) ||
- !(template32 = LockResource( hDlgTmpl32 )))
- {
- COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
- return FALSE;
- }
- size = SizeofResource(GetModuleHandleA("COMDLG32"), hResInfo);
- hGlobal16 = GlobalAlloc16(0, size);
- if (!hGlobal16)
- {
- COMDLG32_SetCommDlgExtendedError(CDERR_MEMALLOCFAILURE);
- ERR("alloc failure for %ld bytes\n", size);
- return FALSE;
- }
- template = GlobalLock16(hGlobal16);
- if (!template)
- {
- COMDLG32_SetCommDlgExtendedError(CDERR_MEMLOCKFAILURE);
- ERR("global lock failure for %x handle\n", hGlobal16);
- GlobalFree16(hGlobal16);
- return FALSE;
- }
- ConvertDialog32To16((LPVOID)template32, size, (LPVOID)template);
- lfs->hDlgTmpl16 = hGlobal16;
- lfs->hGlobal16 = hGlobal16;
- }
- return TRUE;
-}
-
/***********************************************************************
* FILEDLG_StripEditControl [internal]
* Strip pathnames off the contents of the edit control.
@@ -1107,44 +1032,6 @@
}
}
-
-/************************************************************************
- * FILEDLG_MapOfnStruct16 [internal]
- * map a 16 bits structure to an Unicode one
- */
-void FILEDLG_MapOfnStruct16(LPOPENFILENAME16 ofn16, LPOPENFILENAMEW ofnW, BOOL open)
-{
- OPENFILENAMEA ofnA;
- /* first convert to linear pointers */
- memset(&ofnA, 0, sizeof(OPENFILENAMEA));
- ofnA.lStructSize = sizeof(OPENFILENAMEA);
- ofnA.hwndOwner = HWND_32(ofn16->hwndOwner);
- ofnA.hInstance = HINSTANCE_32(ofn16->hInstance);
- if (ofn16->lpstrFilter)
- ofnA.lpstrFilter = MapSL(ofn16->lpstrFilter);
- if (ofn16->lpstrCustomFilter)
- ofnA.lpstrCustomFilter = MapSL(ofn16->lpstrCustomFilter);
- ofnA.nMaxCustFilter = ofn16->nMaxCustFilter;
- ofnA.nFilterIndex = ofn16->nFilterIndex;
- ofnA.lpstrFile = MapSL(ofn16->lpstrFile);
- ofnA.nMaxFile = ofn16->nMaxFile;
- ofnA.lpstrFileTitle = MapSL(ofn16->lpstrFileTitle);
- ofnA.nMaxFileTitle = ofn16->nMaxFileTitle;
- ofnA.lpstrInitialDir = MapSL(ofn16->lpstrInitialDir);
- ofnA.lpstrTitle = MapSL(ofn16->lpstrTitle);
- ofnA.Flags = ofn16->Flags;
- ofnA.nFileOffset = ofn16->nFileOffset;
- ofnA.nFileExtension = ofn16->nFileExtension;
- ofnA.lpstrDefExt = MapSL(ofn16->lpstrDefExt);
- if (HIWORD(ofn16->lpTemplateName))
- ofnA.lpTemplateName = MapSL(ofn16->lpTemplateName);
- else
- ofnA.lpTemplateName = (LPSTR) ofn16->lpTemplateName; /* ressource number */
- /* now calls the 32 bits Ansi to Unicode version to complete the job */
- FILEDLG_MapOfnStructA(&ofnA, ofnW, open);
-}
-
-
/************************************************************************
* FILEDLG_DestroyPrivate [internal]
* destroys the private object
@@ -1154,15 +1041,8 @@
HWND hwnd;
if (!lfs) return;
hwnd = lfs->hwnd;
- /* free resources for a 16 bits dialog */
- if (lfs->hResource16) FreeResource16(lfs->hResource16);
- if (lfs->hGlobal16)
- {
- GlobalUnlock16(lfs->hGlobal16);
- GlobalFree16(lfs->hGlobal16);
- }
/* if ofnW has been allocated, have to free everything in it */
- if (lfs->ofn16 || lfs->ofnA)
+ if (lfs->ofnA)
{
LPOPENFILENAMEW ofnW = lfs->ofnW;
if (ofnW->lpstrFilter) HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrFilter);
@@ -1185,7 +1065,7 @@
* allocate a private object to hold 32 bits Unicode
* structure that will be used throughtout the calls, while
* keeping available the original structures and a few variables
- * On entry : type = dialog procedure type (16,32A,32W)
+ * On entry : type = dialog procedure type (32A,32W)
* dlgType = dialog type (open or save)
*/
LFSPRIVATE FILEDLG_AllocPrivate(LPARAM lParam, int type, UINT dlgType)
@@ -1204,14 +1084,6 @@
lfs->fileokstring = RegisterWindowMessageA(FILEOKSTRINGA);
switch(type)
{
- case LFS16:
- lfs->ofn16 = MapSL(lParam);
- if (lfs->ofn16->Flags & OFN_ENABLEHOOK)
- if (lfs->ofn16->lpfnHook)
- lfs->hook = TRUE;
-
- break;
-
case LFS32A:
lfs->ofnA = (LPOPENFILENAMEA) lParam;
if (lfs->ofnA->Flags & OFN_ENABLEHOOK)
@@ -1232,20 +1104,13 @@
lfs->ofnW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(OPENFILENAMEW));
if (lfs->ofnW)
{
- if (lfs->ofn16)
- FILEDLG_MapOfnStruct16(lfs->ofn16, lfs->ofnW, lfs->open);
if (lfs->ofnA)
FILEDLG_MapOfnStructA(lfs->ofnA, lfs->ofnW, lfs->open);
}
else
ret = NULL;
}
- if (lfs->ofn16)
- {
- if (!Get16BitsTemplate(lfs)) ret = NULL;
- }
- else
- if (!Get32BitsTemplate(lfs)) ret = NULL;
+ if (!Get32BitsTemplate(lfs)) ret = NULL;
if (!ret) FILEDLG_DestroyPrivate(lfs);
return ret;
}
Index: filedlg16.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/filedlg16.c,v
retrieving revision 1.2
diff -u -r1.2 filedlg16.c
--- filedlg16.c 24 Jun 2003 19:24:29 -0000 1.2
+++ filedlg16.c 26 Jun 2003 01:43:56 -0000
@@ -184,6 +184,195 @@
return TRUE;
}
+/***********************************************************************
+ * Get16BitsTemplate [internal]
+ *
+ * Get a template (FALSE if failure) when 16 bits dialogs are used
+ * by a 16 bits application
+ *
+ */
+BOOL Get16BitsTemplate(LFSPRIVATE lfs)
+{
+ LPOPENFILENAME16 ofn16 = lfs->ofn16;
+ LPCVOID template;
+ HGLOBAL16 hGlobal16 = 0;
+
+ if (ofn16->Flags & OFN_ENABLETEMPLATEHANDLE)
+ lfs->hDlgTmpl16 = ofn16->hInstance;
+ else if (ofn16->Flags & OFN_ENABLETEMPLATE)
+ {
+ HANDLE16 hResInfo;
+ if (!(hResInfo = FindResource16(ofn16->hInstance,
+ MapSL(ofn16->lpTemplateName),
+ RT_DIALOGA)))
+ {
+ COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
+ return FALSE;
+ }
+ if (!(lfs->hDlgTmpl16 = LoadResource16( ofn16->hInstance, hResInfo )))
+ {
+ COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
+ return FALSE;
+ }
+ lfs->hResource16 = lfs->hDlgTmpl16;
+ }
+ else
+ { /* get resource from (32 bits) own Wine resource; convert it to 16 */
+ HRSRC hResInfo;
+ HGLOBAL hDlgTmpl32;
+ LPCVOID template32;
+ DWORD size;
+
+ if (!(hResInfo = FindResourceA(COMDLG32_hInstance,
+ lfs->open ? "OPEN_FILE":"SAVE_FILE", RT_DIALOGA)))
+ {
+ COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
+ return FALSE;
+ }
+ if (!(hDlgTmpl32 = LoadResource(COMDLG32_hInstance, hResInfo )) ||
+ !(template32 = LockResource( hDlgTmpl32 )))
+ {
+ COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
+ return FALSE;
+ }
+ size = SizeofResource(GetModuleHandleA("COMDLG32"), hResInfo);
+ hGlobal16 = GlobalAlloc16(0, size);
+ if (!hGlobal16)
+ {
+ COMDLG32_SetCommDlgExtendedError(CDERR_MEMALLOCFAILURE);
+ ERR("alloc failure for %ld bytes\n", size);
+ return FALSE;
+ }
+ template = GlobalLock16(hGlobal16);
+ if (!template)
+ {
+ COMDLG32_SetCommDlgExtendedError(CDERR_MEMLOCKFAILURE);
+ ERR("global lock failure for %x handle\n", hGlobal16);
+ GlobalFree16(hGlobal16);
+ return FALSE;
+ }
+ ConvertDialog32To16((LPVOID)template32, size, (LPVOID)template);
+ lfs->hDlgTmpl16 = hGlobal16;
+ lfs->hGlobal16 = hGlobal16;
+ }
+ return TRUE;
+}
+
+/************************************************************************
+ * FILEDLG_MapOfnStruct16 [internal]
+ * map a 16 bits structure to an Unicode one
+ */
+void FILEDLG_MapOfnStruct16(LPOPENFILENAME16 ofn16, LPOPENFILENAMEW ofnW, BOOL open)
+{
+ OPENFILENAMEA ofnA;
+ /* first convert to linear pointers */
+ memset(&ofnA, 0, sizeof(OPENFILENAMEA));
+ ofnA.lStructSize = sizeof(OPENFILENAMEA);
+ ofnA.hwndOwner = HWND_32(ofn16->hwndOwner);
+ ofnA.hInstance = HINSTANCE_32(ofn16->hInstance);
+ if (ofn16->lpstrFilter)
+ ofnA.lpstrFilter = MapSL(ofn16->lpstrFilter);
+ if (ofn16->lpstrCustomFilter)
+ ofnA.lpstrCustomFilter = MapSL(ofn16->lpstrCustomFilter);
+ ofnA.nMaxCustFilter = ofn16->nMaxCustFilter;
+ ofnA.nFilterIndex = ofn16->nFilterIndex;
+ ofnA.lpstrFile = MapSL(ofn16->lpstrFile);
+ ofnA.nMaxFile = ofn16->nMaxFile;
+ ofnA.lpstrFileTitle = MapSL(ofn16->lpstrFileTitle);
+ ofnA.nMaxFileTitle = ofn16->nMaxFileTitle;
+ ofnA.lpstrInitialDir = MapSL(ofn16->lpstrInitialDir);
+ ofnA.lpstrTitle = MapSL(ofn16->lpstrTitle);
+ ofnA.Flags = ofn16->Flags;
+ ofnA.nFileOffset = ofn16->nFileOffset;
+ ofnA.nFileExtension = ofn16->nFileExtension;
+ ofnA.lpstrDefExt = MapSL(ofn16->lpstrDefExt);
+ if (HIWORD(ofn16->lpTemplateName))
+ ofnA.lpTemplateName = MapSL(ofn16->lpTemplateName);
+ else
+ ofnA.lpTemplateName = (LPSTR) ofn16->lpTemplateName; /* ressource number */
+ /* now calls the 32 bits Ansi to Unicode version to complete the job */
+ FILEDLG_MapOfnStructA(&ofnA, ofnW, open);
+}
+
+/************************************************************************
+ * FILEDLG_DestroyPrivate [internal]
+ * destroys the private object
+ */
+void FILEDLG_DestroyPrivate16(LFSPRIVATE lfs)
+{
+ HWND hwnd;
+ if (!lfs) return;
+ hwnd = lfs->hwnd;
+ /* free resources for a 16 bits dialog */
+ if (lfs->hResource16) FreeResource16(lfs->hResource16);
+ if (lfs->hGlobal16)
+ {
+ GlobalUnlock16(lfs->hGlobal16);
+ GlobalFree16(lfs->hGlobal16);
+ }
+ /* if ofnW has been allocated, have to free everything in it */
+ if (lfs->ofn16)
+ {
+ LPOPENFILENAMEW ofnW = lfs->ofnW;
+ if (ofnW->lpstrFilter) HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrFilter);
+ if (ofnW->lpstrCustomFilter) HeapFree(GetProcessHeap(), 0, ofnW->lpstrCustomFilter);
+ if (ofnW->lpstrFile) HeapFree(GetProcessHeap(), 0, ofnW->lpstrFile);
+ if (ofnW->lpstrFileTitle) HeapFree(GetProcessHeap(), 0, ofnW->lpstrFileTitle);
+ if (ofnW->lpstrInitialDir) HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrInitialDir);
+ if (ofnW->lpstrTitle) HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpstrTitle);
+ if ((ofnW->lpTemplateName) && (HIWORD(ofnW->lpTemplateName)))
+ HeapFree(GetProcessHeap(), 0, (LPWSTR) ofnW->lpTemplateName);
+ HeapFree(GetProcessHeap(), 0, ofnW);
+ }
+ TRACE("destroying private allocation %p\n", lfs);
+ HeapFree(GetProcessHeap(), 0, lfs);
+ RemovePropA(hwnd, OFN_PROP);
+}
+
+/************************************************************************
+ * FILEDLG_AllocPrivate16 [internal]
+ * allocate a 16 bit private object to hold 32 bits Unicode
+ * structure that will be used throughtout the calls, while
+ * keeping available the original structures and a few variables
+ * On entry : dlgType = dialog type (open or save)
+ *
+ */
+LFSPRIVATE FILEDLG_AllocPrivate16(LPARAM lParam, UINT dlgType)
+{
+ LFSPRIVATE lfs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct FSPRIVATE));
+ LFSPRIVATE ret;
+ TRACE("alloc private buf %p\n", lfs);
+ if (!lfs) return NULL;
+ lfs->hook = FALSE;
+ lfs->lParam = lParam;
+ if (dlgType == OPEN_DIALOG)
+ lfs->open = TRUE;
+ else
+ lfs->open = FALSE;
+ lfs->lbselchstring = RegisterWindowMessageA(LBSELCHSTRINGA);
+ lfs->fileokstring = RegisterWindowMessageA(FILEOKSTRINGA);
+ lfs->ofn16 = MapSL(lParam);
+
+ if (lfs->ofn16->Flags & OFN_ENABLEHOOK)
+ if (lfs->ofn16->lpfnHook)
+ lfs->hook = TRUE;
+ ret = lfs;
+ if (!lfs->ofnW)
+ { /* this structure is needed internally, so create it */
+ lfs->ofnW = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(OPENFILENAMEW));
+ if (lfs->ofnW)
+ {
+ if (lfs->ofn16)
+ FILEDLG_MapOfnStruct16(lfs->ofn16, lfs->ofnW, lfs->open);
+ }
+ else
+ ret = NULL;
+ }
+ if (!Get16BitsTemplate(lfs)) ret = NULL;
+ if (!ret) FILEDLG_DestroyPrivate16(lfs);
+ return ret;
+}
+
/* ------------------ Dialog procedures ---------------------- */
/***********************************************************************
@@ -312,14 +501,14 @@
if (!lpofn || !FileDlg_Init()) return FALSE;
- lfs = FILEDLG_AllocPrivate((LPARAM) ofn, LFS16, OPEN_DIALOG);
+ lfs = FILEDLG_AllocPrivate16((LPARAM) ofn, OPEN_DIALOG);
if (lfs)
{
hInst = GetWindowWord( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE );
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 6);
bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner,
(DLGPROC16) ptr, (LPARAM) lfs);
- FILEDLG_DestroyPrivate(lfs);
+ FILEDLG_DestroyPrivate16(lfs);
}
TRACE("return lpstrFile='%s' !\n", (char *)MapSL(lpofn->lpstrFile));
@@ -350,14 +539,14 @@
if (!lpofn || !FileDlg_Init()) return FALSE;
- lfs = FILEDLG_AllocPrivate((LPARAM) ofn, LFS16, SAVE_DIALOG);
+ lfs = FILEDLG_AllocPrivate16((LPARAM) ofn, SAVE_DIALOG);
if (lfs)
{
hInst = GetWindowWord( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE );
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 7);
bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner,
(DLGPROC16) ptr, (LPARAM) lfs);
- FILEDLG_DestroyPrivate(lfs);
+ FILEDLG_DestroyPrivate16(lfs);
}
TRACE("return lpstrFile='%s' !\n", (char *)MapSL(lpofn->lpstrFile));
June 26, 2003
Java problems with wine and Vampire
by John Shillinglaw
I am trying to get the Game Vampire The Masquerade: Redemption to run
under wine... I tried wine and got tons of errors, I assume because of a
lack of directX support. After some fiddling, it ran under WineX, except
that the mouse moves very slow, and I get the following messages when
the game starts up ( after I added symcjit.dll and java 1.4.1_03 to
wine):
fixme:font:WineEngCreateFontInstance just using first face for now
fixme:ddraw:Main_DirectDraw_SetCooperativeLevel
(0x4038d22c)->(00010021,00000013)
mmtime pid=4826 tid=4826
fixme:dsound:IDirectSoundImpl_SetCooperativeLevel
(0x4043aa24,00010021,1):stub
fixme:dsound:IDirectSoundImpl_SetCooperativeLevel
(0x403a4850,00010021,2):stub
err:win32:PE_fixup_imports No implementation for
jvm.dll.0(monitorNotify) imported from C:\windows\system32\symcjit.dll,
setting to 0xdeadbeef
err:win32:PE_fixup_imports No implementation for jvm.dll.1(monitorWait)
imported from C:\windows\system32\symcjit.dll, setting to 0xdeadbeef
Symantec JIT version mismatch... cannot load SymcJit (0x52d0003)
Anyone have any ideas? Is the game slowness due to the above java
problem, or something else? Is the supported versions of WineX ( I
extremely low on cash so I can't afford the subscription yet) any
better?
The machine I'm running it on is a P4 Dragon with 128M and a fairly
hefty HD and swap file. I'm planning on adding another 128 to 512 Memory
when I solve some money problems.
I'm posting this to both lists since I think there might be other
applications that need java under wine... and is there a way to make
wine and my game use the java implementation for linux?
Thanks,
John
June 26, 2003
PATCH - comdlg32 more win16/32
by Steven Edwards
Hello,
With this patch all of the calls to CallWindowProc16 are gone except in
the print dialogs. I am unsure about a few small parts of it so a little
rubbing and a lot of testing would be nice. I hate duplicating all this
code but I dont really see any other way to do this as I really dont
understand most of the low level stuff here.
Thanks
Steven
Changelog:
Remove calls to CallWindowProc16 when building as a 32 bit dll.
Create new internal functions CC_WMInitDialog16 CC_WMCommand16.
Share a few other internal functions with the 16 bit commdlg.
Index: colordlg.h
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/colordlg.h,v
retrieving revision 1.1
diff -u -r1.1 colordlg.h
--- colordlg.h 13 Jun 2003 18:07:45 -0000 1.1
+++ colordlg.h 26 Jun 2003 01:00:46 -0000
@@ -69,12 +69,21 @@
BOOL CC_HookCallChk( LPCHOOSECOLORW lpcc );
int CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam );
-LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam, BOOL b16 );
LRESULT CC_WMLButtonDown( HWND hDlg, WPARAM wParam, LPARAM lParam );
LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam );
LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD
notifyCode, HWND hwndCtl );
LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam );
LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam );
+int CC_RGBtoHSL(char c, int r, int g, int b);
+void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPRECT lprect );
+void CC_PaintSelectedColor( HWND hDlg, COLORREF cr );
+void CC_PaintCross( HWND hDlg, int x, int y);
+void CC_PaintTriangle( HWND hDlg, int y);
+void CC_EditSetHSL( HWND hDlg, int h, int s, int l );
+int CC_HSLtoRGB(char c, int hue, int sat, int lum);
+void CC_EditSetRGB( HWND hDlg, COLORREF cr );
+int CC_CheckDigitsInEdit( HWND hwnd, int maxval );
+void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr );
#endif /* _WINE_COLORDLG_H */
Index: colordlg.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/colordlg.c,v
retrieving revision 1.41
diff -u -r1.41 colordlg.c
--- colordlg.c 13 Jun 2003 18:07:45 -0000 1.41
+++ colordlg.c 26 Jun 2003 01:00:53 -0000
@@ -67,7 +67,7 @@
/***********************************************************************
* CC_HSLtoRGB [internal]
*/
-static int CC_HSLtoRGB(char c, int hue, int sat, int lum)
+int CC_HSLtoRGB(char c, int hue, int sat, int lum)
{
int res = 0, maxrgb;
@@ -112,7 +112,7 @@
/***********************************************************************
* CC_RGBtoHSL [internal]
*/
-static int CC_RGBtoHSL(char c, int r, int g, int b)
+int CC_RGBtoHSL(char c, int r, int g, int b)
{
WORD maxi, mini, mmsum, mmdif, result = 0;
int iresult = 0;
@@ -355,7 +355,7 @@
/***********************************************************************
* CC_CheckDigitsInEdit [internal]
*/
-static int CC_CheckDigitsInEdit( HWND hwnd, int maxval )
+int CC_CheckDigitsInEdit( HWND hwnd, int maxval )
{
int i, k, m, result, value;
long editpos;
@@ -397,7 +397,7 @@
/***********************************************************************
* CC_PaintSelectedColor [internal]
*/
-static void CC_PaintSelectedColor( HWND hDlg, COLORREF cr )
+void CC_PaintSelectedColor( HWND hDlg, COLORREF cr )
{
RECT rect;
HDC hdc;
@@ -428,7 +428,7 @@
/***********************************************************************
* CC_PaintTriangle [internal]
*/
-static void CC_PaintTriangle( HWND hDlg, int y)
+void CC_PaintTriangle( HWND hDlg, int y)
{
HDC hDC;
long temp;
@@ -471,7 +471,7 @@
/***********************************************************************
* CC_PaintCross [internal]
*/
-static void CC_PaintCross( HWND hDlg, int x, int y)
+void CC_PaintCross( HWND hDlg, int x, int y)
{
HDC hDC;
int w = GetDialogBaseUnits();
@@ -621,7 +621,7 @@
/***********************************************************************
* CC_EditSetRGB [internal]
*/
-static void CC_EditSetRGB( HWND hDlg, COLORREF cr )
+void CC_EditSetRGB( HWND hDlg, COLORREF cr )
{
char buffer[10];
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
@@ -644,7 +644,7 @@
/***********************************************************************
* CC_EditSetHSL [internal]
*/
-static void CC_EditSetHSL( HWND hDlg, int h, int s, int l )
+void CC_EditSetHSL( HWND hDlg, int h, int s, int l )
{
char buffer[10];
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
@@ -666,7 +666,7 @@
/***********************************************************************
* CC_SwitchToFullSize [internal]
*/
-static void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPRECT lprect )
+void CC_SwitchToFullSize( HWND hDlg, COLORREF result, LPRECT lprect )
{
int i;
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
@@ -740,7 +740,7 @@
* CC_PaintUserColorArray [internal]
* Paint the 16 user-selected colors
*/
-static void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr )
+void CC_PaintUserColorArray( HWND hDlg, int rows, int cols, COLORREF* lpcr )
{
HWND hwnd = GetDlgItem(hDlg, 0x2d1);
RECT rect;
@@ -799,7 +799,7 @@
/***********************************************************************
* CC_WMInitDialog [internal]
*/
-LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam, BOOL b16 )
+LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam)
{
int i, res;
int r, g, b;
@@ -810,28 +810,7 @@
TRACE("WM_INITDIALOG lParam=%08lX\n", lParam);
lpp = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct CCPRIVATE) );
- if (b16)
- {
- CHOOSECOLORW *ch32;
- CHOOSECOLOR16 *ch16 = (CHOOSECOLOR16 *) lParam;
- ch32 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CHOOSECOLORW) );
- lpp->lpcc = ch32;
- lpp->lpcc16 = ch16;
- if (lpp->lpcc16->lStructSize != sizeof(CHOOSECOLOR16) )
- {
- EndDialog (hDlg, 0) ;
- return FALSE;
- }
- ch32->lStructSize = sizeof(CHOOSECOLORW);
- ch32->hwndOwner = HWND_32(ch16->hwndOwner);
- /* Should be an HINSTANCE but MS made a typo */
- ch32->hInstance = HWND_32(ch16->hInstance);
- ch32->lpCustColors = MapSL(ch16->lpCustColors);
- ch32->lpfnHook = (LPCCHOOKPROC) ch16->lpfnHook; /* only used as flag */
- ch32->Flags = ch16->Flags;
- }
- else
- lpp->lpcc = (LPCHOOSECOLORW) lParam;
+ lpp->lpcc = (LPCHOOSECOLORW) lParam;
if (lpp->lpcc->lStructSize != sizeof(CHOOSECOLORW) )
{
@@ -895,10 +874,6 @@
SendMessageA( GetDlgItem(hDlg, i), EM_LIMITTEXT, 3, 0); /* max 3 digits: xyz */
if (CC_HookCallChk(lpp->lpcc))
{
- if (b16)
- res = CallWindowProc16( (WNDPROC16)lpp->lpcc16->lpfnHook,
- HWND_16(hDlg), WM_INITDIALOG, wParam, lParam);
- else
res = CallWindowProcA( (WNDPROC)lpp->lpcc->lpfnHook, hDlg, WM_INITDIALOG, wParam, lParam);
}
@@ -1029,16 +1004,7 @@
case 0x40e: /* Help! */ /* The Beatles, 1965 ;-) */
i = RegisterWindowMessageA(HELPMSGSTRINGA);
- if (lpp->lpcc16)
- {
- if (lpp->lpcc->hwndOwner)
- SendMessageA(lpp->lpcc->hwndOwner, i, 0, (LPARAM)lpp->lpcc16);
- if ( CC_HookCallChk(lpp->lpcc))
- CallWindowProc16( (WNDPROC16) lpp->lpcc16->lpfnHook,
- HWND_16(hDlg), WM_COMMAND, psh15,
- (LPARAM)lpp->lpcc16);
- }
- else
+ if (lpp->lpcc)
{
if (lpp->lpcc->hwndOwner)
SendMessageA(lpp->lpcc->hwndOwner, i, 0, (LPARAM)lpp->lpcc);
@@ -1050,24 +1016,12 @@
case IDOK :
cokmsg = RegisterWindowMessageA(COLOROKSTRINGA);
- if (lpp->lpcc16)
- {
- if (lpp->lpcc->hwndOwner)
- if (SendMessageA(lpp->lpcc->hwndOwner, cokmsg, 0, (LPARAM)lpp->lpcc16))
- break; /* do NOT close */
- }
- else
- {
+ if (lpp->lpcc)
+ {
if (lpp->lpcc->hwndOwner)
- if (SendMessageA(lpp->lpcc->hwndOwner, cokmsg, 0, (LPARAM)lpp->lpcc))
- break; /* do NOT close */
- }
- if (lpp->lpcc16)
- {
- BYTE *ptr = MapSL(lpp->lpcc16->lpCustColors);
- memcpy(ptr, lpp->lpcc->lpCustColors, sizeof(COLORREF)*16);
- lpp->lpcc16->rgbResult = lpp->lpcc->rgbResult;
- }
+ if (SendMessageA(lpp->lpcc->hwndOwner, cokmsg, 0, (LPARAM)lpp->lpcc))
+ break; /* do NOT close */
+ }
EndDialog(hDlg, 1) ;
return TRUE ;
@@ -1240,7 +1194,7 @@
switch (message)
{
case WM_INITDIALOG:
- return CC_WMInitDialog(hDlg, wParam, lParam, FALSE);
+ return CC_WMInitDialog(hDlg, wParam, lParam);
case WM_NCDESTROY:
DeleteDC(lpp->hdcMem);
DeleteObject(lpp->hbmMem);
Index: colordlg16.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/colordlg16.c,v
retrieving revision 1.1
diff -u -r1.1 colordlg16.c
--- colordlg16.c 13 Jun 2003 18:07:45 -0000 1.1
+++ colordlg16.c 26 Jun 2003 01:01:00 -0000
@@ -43,6 +43,267 @@
#include "colordlg.h"
/***********************************************************************
+ * CC_WMInitDialog16 [internal]
+ */
+LONG CC_WMInitDialog16( HWND hDlg, WPARAM wParam, LPARAM lParam)
+{
+ int i, res;
+ int r, g, b;
+ HWND hwnd;
+ RECT rect;
+ POINT point;
+ LCCPRIV lpp;
+
+ TRACE("WM_INITDIALOG lParam=%08lX\n", lParam);
+ lpp = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct CCPRIVATE) );
+
+ CHOOSECOLORW *ch32;
+ CHOOSECOLOR16 *ch16 = (CHOOSECOLOR16 *) lParam;
+ ch32 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CHOOSECOLORW) );
+ lpp->lpcc = ch32;
+ lpp->lpcc16 = ch16;
+ if (lpp->lpcc16->lStructSize != sizeof(CHOOSECOLOR16) )
+ {
+ EndDialog (hDlg, 0) ;
+ return FALSE;
+ }
+ ch32->lStructSize = sizeof(CHOOSECOLORW);
+ ch32->hwndOwner = HWND_32(ch16->hwndOwner);
+ /* Should be an HINSTANCE but MS made a typo */
+ ch32->hInstance = HWND_32(ch16->hInstance);
+ ch32->lpCustColors = MapSL(ch16->lpCustColors);
+ ch32->lpfnHook = (LPCCHOOKPROC) ch16->lpfnHook; /* only used as flag */
+ ch32->Flags = ch16->Flags;
+
+ if (lpp->lpcc->lStructSize != sizeof(CHOOSECOLORW) )
+ {
+ EndDialog (hDlg, 0) ;
+ return FALSE;
+ }
+ SetWindowLongA(hDlg, DWL_USER, (LONG)lpp);
+
+ if (!(lpp->lpcc->Flags & CC_SHOWHELP))
+ ShowWindow( GetDlgItem(hDlg,0x40e), SW_HIDE);
+ lpp->msetrgb = RegisterWindowMessageA(SETRGBSTRINGA);
+
+#if 0
+ cpos = MAKELONG(5,7); /* init */
+ if (lpp->lpcc->Flags & CC_RGBINIT)
+ {
+ for (i = 0; i < 6; i++)
+ for (j = 0; j < 8; j++)
+ if (predefcolors[i][j] == lpp->lpcc->rgbResult)
+ {
+ cpos = MAKELONG(i,j);
+ goto found;
+ }
+ }
+ found:
+ /* FIXME: Draw_a_focus_rect & set_init_values */
+#endif
+
+ GetWindowRect(hDlg, &lpp->fullsize);
+ if (lpp->lpcc->Flags & CC_FULLOPEN || lpp->lpcc->Flags & CC_PREVENTFULLOPEN)
+ {
+ hwnd = GetDlgItem(hDlg, 0x2cf);
+ EnableWindow(hwnd, FALSE);
+ }
+ if (!(lpp->lpcc->Flags & CC_FULLOPEN ) || lpp->lpcc->Flags & CC_PREVENTFULLOPEN)
+ {
+ rect = lpp->fullsize;
+ res = rect.bottom - rect.top;
+ hwnd = GetDlgItem(hDlg, 0x2c6); /* cut at left border */
+ point.x = point.y = 0;
+ ClientToScreen(hwnd, &point);
+ ScreenToClient(hDlg,&point);
+ GetClientRect(hDlg, &rect);
+ point.x += GetSystemMetrics(SM_CXDLGFRAME);
+ SetWindowPos(hDlg, 0, 0, 0, point.x, res, SWP_NOMOVE|SWP_NOZORDER);
+
+ for (i = 0x2bf; i < 0x2c5; i++)
+ ShowWindow( GetDlgItem(hDlg, i), SW_HIDE);
+ for (i = 0x2d3; i < 0x2d9; i++)
+ ShowWindow( GetDlgItem(hDlg, i), SW_HIDE);
+ ShowWindow( GetDlgItem(hDlg, 0x2c9), SW_HIDE);
+ ShowWindow( GetDlgItem(hDlg, 0x2c8), SW_HIDE);
+ ShowWindow( GetDlgItem(hDlg, 0x2c6), SW_HIDE);
+ ShowWindow( GetDlgItem(hDlg, 0x2c5), SW_HIDE);
+ ShowWindow( GetDlgItem(hDlg, 1090 ), SW_HIDE);
+ }
+ else
+ CC_SwitchToFullSize(hDlg, lpp->lpcc->rgbResult, NULL);
+ res = TRUE;
+ for (i = 0x2bf; i < 0x2c5; i++)
+ SendMessageA( GetDlgItem(hDlg, i), EM_LIMITTEXT, 3, 0); /* max 3 digits: xyz */
+ if (CC_HookCallChk(lpp->lpcc))
+ {
+ res = CallWindowProc16( (WNDPROC16)lpp->lpcc16->lpfnHook,
+ HWND_16(hDlg), WM_INITDIALOG, wParam, lParam);
+ }
+
+ /* Set the initial values of the color chooser dialog */
+ r = GetRValue(lpp->lpcc->rgbResult);
+ g = GetGValue(lpp->lpcc->rgbResult);
+ b = GetBValue(lpp->lpcc->rgbResult);
+
+ CC_PaintSelectedColor(hDlg, lpp->lpcc->rgbResult);
+ lpp->h = CC_RGBtoHSL('H', r, g, b);
+ lpp->s = CC_RGBtoHSL('S', r, g, b);
+ lpp->l = CC_RGBtoHSL('L', r, g, b);
+
+ /* Doing it the long way because CC_EditSetRGB/HSL doesn't seem to work */
+ SetDlgItemInt(hDlg, 703, lpp->h, TRUE);
+ SetDlgItemInt(hDlg, 704, lpp->s, TRUE);
+ SetDlgItemInt(hDlg, 705, lpp->l, TRUE);
+ SetDlgItemInt(hDlg, 706, r, TRUE);
+ SetDlgItemInt(hDlg, 707, g, TRUE);
+ SetDlgItemInt(hDlg, 708, b, TRUE);
+
+ CC_PaintCross(hDlg, lpp->h, lpp->s);
+ CC_PaintTriangle(hDlg, lpp->l);
+
+ return res;
+}
+
+/***********************************************************************
+ * CC_WMCommand16 [internal]
+ */
+LRESULT CC_WMCommand16( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notifyCode, HWND hwndCtl )
+{
+ int r, g, b, i, xx;
+ UINT cokmsg;
+ HDC hdc;
+ COLORREF *cr;
+ LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
+ TRACE("CC_WMCommand wParam=%x lParam=%lx\n", wParam, lParam);
+ switch (wParam)
+ {
+ case 0x2c2: /* edit notify RGB */
+ case 0x2c3:
+ case 0x2c4:
+ if (notifyCode == EN_UPDATE && !lpp->updating)
+ {
+ i = CC_CheckDigitsInEdit(hwndCtl, 255);
+ r = GetRValue(lpp->lpcc->rgbResult);
+ g = GetGValue(lpp->lpcc->rgbResult);
+ b= GetBValue(lpp->lpcc->rgbResult);
+ xx = 0;
+ switch (wParam)
+ {
+ case 0x2c2: if ((xx = (i != r))) r = i; break;
+ case 0x2c3: if ((xx = (i != g))) g = i; break;
+ case 0x2c4: if ((xx = (i != b))) b = i; break;
+ }
+ if (xx) /* something has changed */
+ {
+ lpp->lpcc->rgbResult = RGB(r, g, b);
+ CC_PaintSelectedColor(hDlg, lpp->lpcc->rgbResult);
+ lpp->h = CC_RGBtoHSL('H', r, g, b);
+ lpp->s = CC_RGBtoHSL('S', r, g, b);
+ lpp->l = CC_RGBtoHSL('L', r, g, b);
+ CC_EditSetHSL(hDlg, lpp->h, lpp->s, lpp->l);
+ CC_PaintCross(hDlg, lpp->h, lpp->s);
+ CC_PaintTriangle(hDlg, lpp->l);
+ }
+ }
+ break;
+
+ case 0x2bf: /* edit notify HSL */
+ case 0x2c0:
+ case 0x2c1:
+ if (notifyCode == EN_UPDATE && !lpp->updating)
+ {
+ i = CC_CheckDigitsInEdit(hwndCtl , wParam == 0x2bf ? 239:240);
+ xx = 0;
+ switch (wParam)
+ {
+ case 0x2bf: if ((xx = ( i != lpp->h))) lpp->h = i; break;
+ case 0x2c0: if ((xx = ( i != lpp->s))) lpp->s = i; break;
+ case 0x2c1: if ((xx = ( i != lpp->l))) lpp->l = i; break;
+ }
+ if (xx) /* something has changed */
+ {
+ r = CC_HSLtoRGB('R', lpp->h, lpp->s, lpp->l);
+ g = CC_HSLtoRGB('G', lpp->h, lpp->s, lpp->l);
+ b = CC_HSLtoRGB('B', lpp->h, lpp->s, lpp->l);
+ lpp->lpcc->rgbResult = RGB(r, g, b);
+ CC_PaintSelectedColor(hDlg, lpp->lpcc->rgbResult);
+ CC_EditSetRGB(hDlg, lpp->lpcc->rgbResult);
+ CC_PaintCross(hDlg, lpp->h, lpp->s);
+ CC_PaintTriangle(hDlg, lpp->l);
+ }
+ }
+ break;
+
+ case 0x2cf:
+ CC_SwitchToFullSize(hDlg, lpp->lpcc->rgbResult, &lpp->fullsize);
+ SetFocus( GetDlgItem(hDlg, 0x2bf));
+ break;
+
+ case 0x2c8: /* add colors ... column by column */
+ cr = lpp->lpcc->lpCustColors;
+ cr[(lpp->nextuserdef % 2) * 8 + lpp->nextuserdef / 2] = lpp->lpcc->rgbResult;
+ if (++lpp->nextuserdef == 16)
+ lpp->nextuserdef = 0;
+ CC_PaintUserColorArray(hDlg, 2, 8, lpp->lpcc->lpCustColors);
+ break;
+
+ case 0x2c9: /* resulting color */
+ hdc = GetDC(hDlg);
+ lpp->lpcc->rgbResult = GetNearestColor(hdc, lpp->lpcc->rgbResult);
+ ReleaseDC(hDlg, hdc);
+ CC_EditSetRGB(hDlg, lpp->lpcc->rgbResult);
+ CC_PaintSelectedColor(hDlg, lpp->lpcc->rgbResult);
+ r = GetRValue(lpp->lpcc->rgbResult);
+ g = GetGValue(lpp->lpcc->rgbResult);
+ b = GetBValue(lpp->lpcc->rgbResult);
+ lpp->h = CC_RGBtoHSL('H', r, g, b);
+ lpp->s = CC_RGBtoHSL('S', r, g, b);
+ lpp->l = CC_RGBtoHSL('L', r, g, b);
+ CC_EditSetHSL(hDlg, lpp->h, lpp->s, lpp->l);
+ CC_PaintCross(hDlg, lpp->h, lpp->s);
+ CC_PaintTriangle(hDlg, lpp->l);
+ break;
+
+ case 0x40e: /* Help! */ /* The Beatles, 1965 ;-) */
+ i = RegisterWindowMessageA(HELPMSGSTRINGA);
+ if (lpp->lpcc16)
+ {
+ if (lpp->lpcc->hwndOwner)
+ SendMessageA(lpp->lpcc->hwndOwner, i, 0, (LPARAM)lpp->lpcc16);
+ if ( CC_HookCallChk(lpp->lpcc))
+ CallWindowProc16( (WNDPROC16) lpp->lpcc16->lpfnHook,
+ HWND_16(hDlg), WM_COMMAND, psh15,
+ (LPARAM)lpp->lpcc16);
+ }
+ break;
+
+ case IDOK :
+ cokmsg = RegisterWindowMessageA(COLOROKSTRINGA);
+ if (lpp->lpcc16)
+ {
+ if (lpp->lpcc->hwndOwner)
+ if (SendMessageA(lpp->lpcc->hwndOwner, cokmsg, 0, (LPARAM)lpp->lpcc16))
+ break; /* do NOT close */
+ }
+ if (lpp->lpcc16)
+ {
+ BYTE *ptr = MapSL(lpp->lpcc16->lpCustColors);
+ memcpy(ptr, lpp->lpcc->lpCustColors, sizeof(COLORREF)*16);
+ lpp->lpcc16->rgbResult = lpp->lpcc->rgbResult;
+ }
+ EndDialog(hDlg, 1) ;
+ return TRUE ;
+
+ case IDCANCEL :
+ EndDialog(hDlg, 0) ;
+ return TRUE ;
+
+ }
+ return FALSE;
+}
+
+/***********************************************************************
* ColorDlgProc (COMMDLG.8)
*/
BOOL16 CALLBACK ColorDlgProc16( HWND16 hDlg16, UINT16 message,
@@ -71,7 +332,7 @@
switch (message)
{
case WM_INITDIALOG:
- return CC_WMInitDialog(hDlg, wParam, lParam, TRUE);
+ return CC_WMInitDialog16(hDlg, wParam, lParam);
case WM_NCDESTROY:
DeleteDC(lpp->hdcMem);
DeleteObject(lpp->hbmMem);
@@ -80,7 +341,7 @@
SetWindowLongA(hDlg, DWL_USER, 0L); /* we don't need it anymore */
break;
case WM_COMMAND:
- if (CC_WMCommand(hDlg, wParam, lParam,
+ if (CC_WMCommand16(hDlg, wParam, lParam,
HIWORD(lParam), HWND_32(LOWORD(lParam))))
return TRUE;
break;
June 26, 2003
error loading wineserver with Winex
by John Shillinglaw
After installing winex from the cvs source tree, I get the following
error whenever I try to run wine:
wine: lstat /home/ian/.wine/wineserver-Aragorn/socket : No such file or
directory
It works fine if I first run wineserver. I understand that this has
something to do with having glibc 2.3.2? I didn't get the error with the
latest build of the normal wine tree.
I am correct in that this is a known problem, and what if anything can I
do to fix the problem or help get a corrective patch?
Thanks,
John Shillinglaw
June 26, 2003