comparison os2/dw.c @ 1024:814e4767277f

Set initial range of spin buttons to -65536 to 65536 on OS/2. Also allow initial value to be set from the text field.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 18 May 2011 08:29:26 +0000
parents c63abcab5312
children 60d6d2c87116
comparison
equal deleted inserted replaced
1023:8188f818eb9f 1024:814e4767277f
5333 HWND_TOP, 5333 HWND_TOP,
5334 id, 5334 id,
5335 NULL, 5335 NULL,
5336 NULL); 5336 NULL);
5337 HWND entry = _find_entryfield(tmp); 5337 HWND entry = _find_entryfield(tmp);
5338 WinSendMsg(tmp, SPBM_SETLIMITS, MPFROMLONG(65536), MPFROMLONG(-65536));
5339 WinSendMsg(tmp, SPBM_SETCURRENTVALUE, MPFROMLONG(atoi(text)), 0L);
5338 blah->oldproc = WinSubclassWindow(tmp, _entryproc); 5340 blah->oldproc = WinSubclassWindow(tmp, _entryproc);
5339 WinSetWindowPtr(tmp, QWP_USER, blah); 5341 WinSetWindowPtr(tmp, QWP_USER, blah);
5340 blah = calloc(sizeof(WindowData), 1); 5342 blah = calloc(sizeof(WindowData), 1);
5341 blah->oldproc = WinSubclassWindow(entry, _spinentryproc); 5343 blah->oldproc = WinSubclassWindow(entry, _spinentryproc);
5342 WinSetWindowPtr(entry, QWP_USER, blah); 5344 WinSetWindowPtr(entry, QWP_USER, blah);
6707 long API dw_spinbutton_get_pos(HWND handle) 6709 long API dw_spinbutton_get_pos(HWND handle)
6708 { 6710 {
6709 long tmpval = 0L; 6711 long tmpval = 0L;
6710 6712
6711 WinSendMsg(handle, SPBM_QUERYVALUE, (MPARAM)&tmpval,0L); 6713 WinSendMsg(handle, SPBM_QUERYVALUE, (MPARAM)&tmpval,0L);
6712 return tmpval; 6714 return tmpval;
6713 } 6715 }
6714 6716
6715 /* 6717 /*
6716 * Returns the state of the checkbox. 6718 * Returns the state of the checkbox.
6717 * Parameters: 6719 * Parameters: