changeset 500:fe12a72bfddf

Added a GlobalID which should allow code written on GTK or Windows to work on OS/2 better. For controls that require the window ID be set, if one isn't set it uses the GlobalID and increments this value. Currently, controls that require this are: tree, container, listbox and scrollbar.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 12 Dec 2003 07:37:37 +0000
parents b658d9628f41
children 8267a3066476
files os2/dw.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/os2/dw.c	Fri Dec 12 07:24:39 2003 +0000
+++ b/os2/dw.c	Fri Dec 12 07:37:37 2003 +0000
@@ -50,7 +50,7 @@
 
 HWND hwndApp = NULLHANDLE, hwndBubble = NULLHANDLE, hwndBubbleLast = NULLHANDLE, hwndEmph = NULLHANDLE;
 PRECORDCORE pCoreEmph = NULL;
-ULONG aulBuffer[4];
+ULONG aulBuffer[4], GlobalID = 10000;
 HWND lasthcnr = 0, lastitem = 0, popup = 0, desktop;
 
 unsigned long _colors[] = {
@@ -4234,7 +4234,7 @@
 							   0,0,2000,1000,
 							   NULLHANDLE,
 							   HWND_TOP,
-							   id,
+							   id ? id : (GlobalID++),
 							   NULL,
 							   NULL);
 	blah->oldproc = WinSubclassWindow(tmp, _TreeProc);
@@ -4262,7 +4262,7 @@
 							   0,0,2000,1000,
 							   NULLHANDLE,
 							   HWND_TOP,
-							   id,
+							   id ? id : (GlobalID++),
 							   NULL,
 							   NULL);
 
@@ -4749,7 +4749,7 @@
 						   0,0,2000,1000,
 						   NULLHANDLE,
 						   HWND_TOP,
-						   id,
+						   id ? id : (GlobalID++),
 						   NULL,
 						   NULL);
 }
@@ -4824,7 +4824,7 @@
 							   0,0,2000,1000,
 							   NULLHANDLE,
 							   HWND_TOP,
-							   id,
+							   id ? id : (GlobalID++),
 							   NULL,
 							   NULL);
 	blah->oldproc = WinSubclassWindow(tmp, _entryproc);