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
69c9c432
Commit
69c9c432
authored
Aug 28, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Aug 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- implement CBEN_DRAGBEGIN
- remove useless FIXMEs
parent
4973a745
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
8 deletions
+63
-8
comboex.c
dlls/comctl32/comboex.c
+63
-8
No files found.
dlls/comctl32/comboex.c
View file @
69c9c432
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
* FIXME:
* FIXME:
* 1. Implement following extended styles:
* 1. Implement following extended styles:
* CBES_EX_NOSIZELIMIT
* CBES_EX_NOSIZELIMIT
* 2. Notify CBEN_DRAGBEGIN is not implemented.
*
*/
*/
#include <string.h>
#include <string.h>
...
@@ -71,14 +69,15 @@ typedef struct
...
@@ -71,14 +69,15 @@ typedef struct
}
COMBOEX_INFO
;
}
COMBOEX_INFO
;
/* internal flags in the COMBOEX_INFO structure */
/* internal flags in the COMBOEX_INFO structure */
#define WCBE_ACTEDIT 0x00000001
/* Edit active i.e.
#define WCBE_ACTEDIT 0x00000001
/* Edit active i.e.
* CBEN_BEGINEDIT issued
* CBEN_BEGINEDIT issued
* but CBEN_ENDEDIT{A|W}
* but CBEN_ENDEDIT{A|W}
* not yet issued. */
* not yet issued. */
#define WCBE_EDITCHG 0x00000002
/* Edit issued EN_CHANGE */
#define WCBE_EDITCHG 0x00000002
/* Edit issued EN_CHANGE */
#define WCBE_EDITHASCHANGED (WCBE_ACTEDIT | WCBE_EDITCHG)
#define WCBE_EDITHASCHANGED (WCBE_ACTEDIT | WCBE_EDITCHG)
#define WCBE_EDITFOCUSED 0x00000004
/* Edit control has focus */
#define WCBE_EDITFOCUSED 0x00000004
/* Edit control has focus */
#define WCBE_MOUSECAPTURED 0x00000008
/* Combo has captured mouse */
#define WCBE_MOUSEDRAGGED 0x00000010
/* User has dragged in combo */
#define ID_CB_EDIT 1001
#define ID_CB_EDIT 1001
...
@@ -244,6 +243,26 @@ static INT COMBOEX_NotifyEndEdit (COMBOEX_INFO *infoPtr, NMCBEENDEDITW *neew, LP
...
@@ -244,6 +243,26 @@ static INT COMBOEX_NotifyEndEdit (COMBOEX_INFO *infoPtr, NMCBEENDEDITW *neew, LP
}
}
static
void
COMBOEX_NotifyDragBegin
(
COMBOEX_INFO
*
infoPtr
,
LPCWSTR
wstr
)
{
/* Change the Text item from Unicode to ANSI if necessary for NOTIFY */
if
(
infoPtr
->
NtfUnicode
)
{
NMCBEDRAGBEGINW
ndbw
;
ndbw
.
iItemid
=
-
1
;
lstrcpynW
(
ndbw
.
szText
,
wstr
,
CBEMAXSTRLEN
);
COMBOEX_Notify
(
infoPtr
,
CBEN_DRAGBEGINW
,
&
ndbw
.
hdr
);
}
else
{
NMCBEDRAGBEGINA
ndba
;
ndba
.
iItemid
=
-
1
;
WideCharToMultiByte
(
CP_ACP
,
0
,
wstr
,
-
1
,
ndba
.
szText
,
CBEMAXSTRLEN
,
0
,
0
);
COMBOEX_Notify
(
infoPtr
,
CBEN_DRAGBEGINA
,
&
ndba
.
hdr
);
}
}
static
void
COMBOEX_FreeText
(
CBE_ITEMDATA
*
item
)
static
void
COMBOEX_FreeText
(
CBE_ITEMDATA
*
item
)
{
{
if
(
is_textW
(
item
->
pszText
))
COMCTL32_Free
(
item
->
pszText
);
if
(
is_textW
(
item
->
pszText
))
COMCTL32_Free
(
item
->
pszText
);
...
@@ -1840,6 +1859,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -1840,6 +1859,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HDC
hDC
;
HDC
hDC
;
HWND
focusedhwnd
;
HWND
focusedhwnd
;
RECT
rect
;
RECT
rect
;
POINT
pt
;
WCHAR
edit_text
[
260
];
WCHAR
edit_text
[
260
];
TRACE
(
"hwnd=%x msg=%x wparam=%x lParam=%lx, info_ptr=%p
\n
"
,
TRACE
(
"hwnd=%x msg=%x wparam=%x lParam=%lx, info_ptr=%p
\n
"
,
...
@@ -1889,6 +1909,43 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -1889,6 +1909,43 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return
CallWindowProcW
(
infoPtr
->
prevComboWndProc
,
return
CallWindowProcW
(
infoPtr
->
prevComboWndProc
,
hwnd
,
uMsg
,
wParam
,
lParam
);
hwnd
,
uMsg
,
wParam
,
lParam
);
case
WM_LBUTTONDOWN
:
GetClientRect
(
hwnd
,
&
rect
);
rect
.
bottom
=
rect
.
top
+
SendMessageW
(
infoPtr
->
hwndSelf
,
CB_GETITEMHEIGHT
,
-
1
,
0
);
rect
.
left
=
rect
.
right
-
GetSystemMetrics
(
SM_CXVSCROLL
);
pt
.
x
=
LOWORD
(
lParam
);
pt
.
y
=
HIWORD
(
lParam
);
if
(
PtInRect
(
&
rect
,
pt
))
return
CallWindowProcW
(
infoPtr
->
prevComboWndProc
,
hwnd
,
uMsg
,
wParam
,
lParam
);
infoPtr
->
flags
|=
WCBE_MOUSECAPTURED
;
SetCapture
(
hwnd
);
break
;
case
WM_LBUTTONUP
:
if
(
!
(
infoPtr
->
flags
&
WCBE_MOUSECAPTURED
))
return
CallWindowProcW
(
infoPtr
->
prevComboWndProc
,
hwnd
,
uMsg
,
wParam
,
lParam
);
ReleaseCapture
();
infoPtr
->
flags
&=
~
WCBE_MOUSECAPTURED
;
if
(
infoPtr
->
flags
&
WCBE_MOUSEDRAGGED
)
{
infoPtr
->
flags
&=
~
WCBE_MOUSEDRAGGED
;
}
else
{
SendMessageW
(
hwnd
,
CB_SHOWDROPDOWN
,
TRUE
,
0
);
}
break
;
case
WM_MOUSEMOVE
:
if
(
(
infoPtr
->
flags
&
WCBE_MOUSECAPTURED
)
&&
!
(
infoPtr
->
flags
&
WCBE_MOUSEDRAGGED
))
{
GetWindowTextW
(
infoPtr
->
hwndEdit
,
edit_text
,
260
);
COMBOEX_NotifyDragBegin
(
infoPtr
,
edit_text
);
infoPtr
->
flags
|=
WCBE_MOUSEDRAGGED
;
}
return
CallWindowProcW
(
infoPtr
->
prevComboWndProc
,
hwnd
,
uMsg
,
wParam
,
lParam
);
case
WM_COMMAND
:
case
WM_COMMAND
:
switch
(
HIWORD
(
wParam
))
{
switch
(
HIWORD
(
wParam
))
{
...
@@ -2120,8 +2177,6 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -2120,8 +2177,6 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
CB_LIMITTEXT
:
case
CB_LIMITTEXT
:
case
CB_RESETCONTENT
:
case
CB_RESETCONTENT
:
case
CB_SELECTSTRING
:
case
CB_SELECTSTRING
:
FIXME
(
"(0x%x 0x%x 0x%lx): possibly missing function
\n
"
,
uMsg
,
wParam
,
lParam
);
/* Combo messages OK to just forward to the regular COMBO */
/* Combo messages OK to just forward to the regular COMBO */
case
CB_GETCOUNT
:
case
CB_GETCOUNT
:
...
...
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