Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
311d329c
Commit
311d329c
authored
Jan 01, 1999
by
Alex Korobka
Committed by
Alexandre Julliard
Jan 01, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better CB_SETCURSEL message handling.
parent
dbf2bf00
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
combo.c
controls/combo.c
+11
-2
listbox.c
controls/listbox.c
+11
-2
combo.h
include/combo.h
+1
-0
No files found.
controls/combo.c
View file @
311d329c
...
...
@@ -8,7 +8,8 @@
#include <string.h>
#include "windows.h"
#include "winuser.h"
#include "wine/winuser16.h"
#include "sysmetrics.h"
#include "win.h"
#include "spy.h"
...
...
@@ -1545,7 +1546,15 @@ LRESULT WINAPI ComboWndProc( HWND32 hwnd, UINT32 message,
case
CB_SETCURSEL16
:
wParam
=
(
INT32
)(
INT16
)
wParam
;
case
CB_SETCURSEL32
:
return
SendMessage32A
(
lphc
->
hWndLBox
,
LB_SETCURSEL32
,
wParam
,
0
);
lParam
=
SendMessage32A
(
lphc
->
hWndLBox
,
LB_SETCURSEL32
,
wParam
,
0
);
if
(
lphc
->
wState
&
CBF_SELCHANGE
)
{
/* no LBN_SELCHANGE in this case, update manually */
CBPaintText
(
lphc
,
0
);
lphc
->
wState
&=
~
CBF_SELCHANGE
;
}
return
lParam
;
case
CB_GETLBTEXT16
:
wParam
=
(
INT32
)(
INT16
)
wParam
;
...
...
controls/listbox.c
View file @
311d329c
...
...
@@ -5,7 +5,8 @@
*/
#include <string.h>
#include "windows.h"
#include "wine/winuser16.h"
#include "winuser.h"
#include "winerror.h"
#include "drive.h"
#include "heap.h"
...
...
@@ -1231,6 +1232,9 @@ static LRESULT LISTBOX_SetSelection( WND *wnd, LB_DESCR *descr, INT32 index,
if
(
index
!=
-
1
)
LISTBOX_RepaintItem
(
wnd
,
descr
,
index
,
ODA_SELECT
);
if
(
send_notify
)
SEND_NOTIFICATION
(
wnd
,
descr
,
(
index
!=
-
1
)
?
LBN_SELCHANGE
:
LBN_SELCANCEL
);
else
if
(
descr
->
lphc
)
/* set selection change flag for parent combo */
descr
->
lphc
->
wState
|=
CBF_SELCHANGE
;
}
return
LB_OKAY
;
}
...
...
@@ -2281,7 +2285,7 @@ LRESULT WINAPI ListBoxWndProc( HWND32 hwnd, UINT32 msg,
/* fall through */
case
LB_SETCURSEL32
:
if
(
wParam
!=
-
1
)
LISTBOX_MakeItemVisible
(
wnd
,
descr
,
wParam
,
TRUE
);
return
LISTBOX_SetSelection
(
wnd
,
descr
,
wParam
,
TRUE
,
(
descr
->
lphc
!=
NULL
)
);
return
LISTBOX_SetSelection
(
wnd
,
descr
,
wParam
,
TRUE
,
FALSE
);
case
LB_GETSELCOUNT16
:
case
LB_GETSELCOUNT32
:
...
...
@@ -2584,6 +2588,11 @@ LRESULT WINAPI ComboLBWndProc( HWND32 hwnd, UINT32 msg,
}
return
LISTBOX_HandleKeyDown
(
wnd
,
descr
,
wParam
);
case
LB_SETCURSEL16
:
case
LB_SETCURSEL32
:
lRet
=
ListBoxWndProc
(
hwnd
,
msg
,
wParam
,
lParam
);
return
(
lRet
==
LB_ERR
)
?
lRet
:
descr
->
selected_item
;
case
WM_NCDESTROY
:
if
(
CB_GETTYPE
(
lphc
)
!=
CBS_SIMPLE
)
lphc
->
hWndLBox
=
0
;
...
...
include/combo.h
View file @
311d329c
...
...
@@ -20,6 +20,7 @@
#define CBF_NORESIZE 0x0080
#define CBF_NOTIFY 0x0100
#define CBF_NOREDRAW 0x0200
#define CBF_SELCHANGE 0x0400
#define CBF_EUI 0x8000
/* Combo state struct */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment