Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tray
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
Vladislav
tray
Commits
8708a930
Commit
8708a930
authored
Jan 09, 2017
by
Serge A. Zaitsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented checked/disabled items with winapi, fixed menu callback crashes
parent
6ecca1fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
tray.h
tray.h
+7
-1
No files found.
tray.h
View file @
8708a930
...
...
@@ -193,7 +193,7 @@ static LRESULT CALLBACK _tray_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam,
};
if
(
GetMenuItemInfo
(
hmenu
,
wparam
,
FALSE
,
&
item
))
{
struct
tray_menu
*
menu
=
(
struct
tray_menu
*
)
item
.
dwItemData
;
menu
->
cb
(
menu
->
context
);
menu
->
cb
(
menu
);
}
return
0
;
}
...
...
@@ -252,6 +252,12 @@ static void tray_update(struct tray *tray) {
item
->
fMask
=
MIIM_ID
|
MIIM_TYPE
|
MIIM_STATE
|
MIIM_DATA
;
item
->
fType
=
0
;
item
->
fState
=
0
;
if
(
m
->
disabled
)
{
item
->
fState
|=
MFS_DISABLED
;
}
if
(
m
->
checked
)
{
item
->
fState
|=
MFS_CHECKED
;
}
item
->
wID
=
i
+
ID_TRAY_FIRST
;
item
->
dwTypeData
=
m
->
text
;
item
->
dwItemData
=
(
ULONG_PTR
)
m
;
...
...
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