Mercurial > dwindows
comparison win/dw.c @ 1624:c5aab296fba3
Implemented value changed event for spinbuttons on Windows.
This code exists on GTK and Mac... but not Windows and OS/2 for
some reason. OS/2 code coming shortly.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 27 Mar 2012 23:07:09 +0000 |
parents | 33d7cf373938 |
children | b41ecd439b47 |
comparison
equal
deleted
inserted
replaced
1623:33d7cf373938 | 1624:c5aab296fba3 |
---|---|
2115 NMLISTVIEW FAR *tem=(NMLISTVIEW FAR *)mp2; | 2115 NMLISTVIEW FAR *tem=(NMLISTVIEW FAR *)mp2; |
2116 if(tmp->window == tem->hdr.hwndFrom && tem->hdr.code == tmp->message) | 2116 if(tmp->window == tem->hdr.hwndFrom && tem->hdr.code == tmp->message) |
2117 { | 2117 { |
2118 int (*columnclickfunc)(HWND, int, void *) = tmp->signalfunction; | 2118 int (*columnclickfunc)(HWND, int, void *) = tmp->signalfunction; |
2119 result = columnclickfunc(tem->hdr.hwndFrom, tem->iSubItem, tmp->data); | 2119 result = columnclickfunc(tem->hdr.hwndFrom, tem->iSubItem, tmp->data); |
2120 tmp = NULL; | |
2121 } | |
2122 } | |
2123 else if(tmp->message == WM_VSCROLL) | |
2124 { | |
2125 NMUPDOWN FAR *tem=(NMUPDOWN FAR *)mp2; | |
2126 if(tmp->window == tem->hdr.hwndFrom && tem->hdr.code == UDN_DELTAPOS) | |
2127 { | |
2128 int (*valuechangefunc)(HWND, int, void *) = tmp->signalfunction; | |
2129 result = valuechangefunc(tmp->window, tem->iPos + tem->iDelta, tmp->data); | |
2120 tmp = NULL; | 2130 tmp = NULL; |
2121 } | 2131 } |
2122 } | 2132 } |
2123 } | 2133 } |
2124 break; | 2134 break; |
2692 LRESULT ret = -1; | 2702 LRESULT ret = -1; |
2693 | 2703 |
2694 cinfo = (ColorInfo *)GetWindowLongPtr(hWnd, GWLP_USERDATA); | 2704 cinfo = (ColorInfo *)GetWindowLongPtr(hWnd, GWLP_USERDATA); |
2695 | 2705 |
2696 GetClassName(hWnd, tmpbuf, 99); | 2706 GetClassName(hWnd, tmpbuf, 99); |
2697 if(_tcsnicmp(tmpbuf, FRAMECLASSNAME, _tcslen(FRAMECLASSNAME)+1) == 0) | 2707 if(_tcsncmp(tmpbuf, FRAMECLASSNAME, _tcslen(FRAMECLASSNAME)+1) == 0) |
2698 cinfo = &(((Box *)cinfo)->cinfo); | 2708 cinfo = &(((Box *)cinfo)->cinfo); |
2699 | 2709 |
2700 if ( msg == WM_MOUSEMOVE || msg == WM_USER+2 ) | 2710 if ( msg == WM_MOUSEMOVE || msg == WM_USER+2 ) |
2701 ret = _wndproc(hWnd, msg, mp1, mp2); | 2711 ret = _wndproc(hWnd, msg, mp1, mp2); |
2702 | 2712 |