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
75eae135
Commit
75eae135
authored
Mar 21, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Mar 21, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always display path in status bar.
parent
77da3d2d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
23 deletions
+39
-23
childwnd.c
programs/regedit/childwnd.c
+32
-17
framewnd.c
programs/regedit/framewnd.c
+6
-6
main.h
programs/regedit/main.h
+1
-0
No files found.
programs/regedit/childwnd.c
View file @
75eae135
...
@@ -83,6 +83,35 @@ static void OnPaint(HWND hWnd)
...
@@ -83,6 +83,35 @@ static void OnPaint(HWND hWnd)
EndPaint
(
hWnd
,
&
ps
);
EndPaint
(
hWnd
,
&
ps
);
}
}
void
OnTreeSelectionChanged
(
HWND
hwndTV
,
HWND
hwndLV
,
HTREEITEM
hItem
,
BOOL
bRefreshLV
)
{
LPCTSTR
keyPath
,
rootName
;
LPTSTR
fullPath
;
HKEY
hRootKey
;
keyPath
=
GetItemPath
(
hwndTV
,
hItem
,
&
hRootKey
);
if
(
keyPath
)
{
if
(
bRefreshLV
)
RefreshListView
(
hwndLV
,
hRootKey
,
keyPath
,
NULL
);
rootName
=
get_root_key_name
(
hRootKey
);
fullPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlen
(
rootName
)
+
1
+
lstrlen
(
keyPath
)
+
1
)
*
sizeof
(
TCHAR
));
if
(
fullPath
)
{
_stprintf
(
fullPath
,
"%s
\\
%s"
,
rootName
,
keyPath
);
SendMessage
(
hStatusBar
,
SB_SETTEXT
,
0
,
(
LPARAM
)
fullPath
);
HeapFree
(
GetProcessHeap
(),
0
,
fullPath
);
}
}
else
{
/* else the computer icon is being selected, so display computer name */
TCHAR
text
[
260
];
DWORD
size
;
size
=
sizeof
(
text
)
/
sizeof
(
TCHAR
);
GetComputerName
(
text
,
&
size
);
SendMessage
(
hStatusBar
,
SB_SETTEXT
,
0
,
(
LPARAM
)
text
);
}
}
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG)
* FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG)
...
@@ -238,23 +267,9 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
...
@@ -238,23 +267,9 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
switch
(((
LPNMHDR
)
lParam
)
->
code
)
{
switch
(((
LPNMHDR
)
lParam
)
->
code
)
{
case
TVN_ITEMEXPANDING
:
case
TVN_ITEMEXPANDING
:
return
!
OnTreeExpanding
(
pChildWnd
->
hTreeWnd
,
(
NMTREEVIEW
*
)
lParam
);
return
!
OnTreeExpanding
(
pChildWnd
->
hTreeWnd
,
(
NMTREEVIEW
*
)
lParam
);
case
TVN_SELCHANGED
:
{
case
TVN_SELCHANGED
:
LPCTSTR
keyPath
,
rootName
;
OnTreeSelectionChanged
(
pChildWnd
->
hTreeWnd
,
pChildWnd
->
hListWnd
,
LPTSTR
fullPath
;
((
NMTREEVIEW
*
)
lParam
)
->
itemNew
.
hItem
,
TRUE
);
HKEY
hRootKey
;
keyPath
=
GetItemPath
(
pChildWnd
->
hTreeWnd
,
((
NMTREEVIEW
*
)
lParam
)
->
itemNew
.
hItem
,
&
hRootKey
);
if
(
keyPath
)
{
RefreshListView
(
pChildWnd
->
hListWnd
,
hRootKey
,
keyPath
,
NULL
);
rootName
=
get_root_key_name
(
hRootKey
);
fullPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlen
(
rootName
)
+
1
+
lstrlen
(
keyPath
)
+
1
)
*
sizeof
(
TCHAR
));
if
(
fullPath
)
{
_stprintf
(
fullPath
,
"%s
\\
%s"
,
rootName
,
keyPath
);
SendMessage
(
hStatusBar
,
SB_SETTEXT
,
0
,
(
LPARAM
)
fullPath
);
HeapFree
(
GetProcessHeap
(),
0
,
fullPath
);
}
}
}
break
;
break
;
case
NM_SETFOCUS
:
case
NM_SETFOCUS
:
pChildWnd
->
nFocusPanel
=
0
;
pChildWnd
->
nFocusPanel
=
0
;
...
...
programs/regedit/framewnd.c
View file @
75eae135
...
@@ -121,16 +121,16 @@ void SetupStatusBar(HWND hWnd, BOOL bResize)
...
@@ -121,16 +121,16 @@ void SetupStatusBar(HWND hWnd, BOOL bResize)
if
(
bResize
)
if
(
bResize
)
SendMessage
(
hStatusBar
,
WM_SIZE
,
0
,
0
);
SendMessage
(
hStatusBar
,
WM_SIZE
,
0
,
0
);
SendMessage
(
hStatusBar
,
SB_SETPARTS
,
1
,
(
LPARAM
)
&
nParts
);
SendMessage
(
hStatusBar
,
SB_SETPARTS
,
1
,
(
LPARAM
)
&
nParts
);
UpdateStatusBar
();
}
}
void
UpdateStatusBar
(
void
)
void
UpdateStatusBar
(
void
)
{
{
TCHAR
text
[
260
];
/* real updating of status bar happens in the treeview selection
DWORD
size
;
* change handler, so fake a selection change to it, but don't
* refresh the listview or the current selection will change */
size
=
sizeof
(
text
)
/
sizeof
(
TCHAR
);
OnTreeSelectionChanged
(
g_pChildWnd
->
hTreeWnd
,
g_pChildWnd
->
hListWnd
,
GetComputerName
(
text
,
&
size
);
TreeView_GetSelection
(
g_pChildWnd
->
hTreeWnd
),
FALSE
);
SendMessage
(
hStatusBar
,
SB_SETTEXT
,
0
,
(
LPARAM
)
text
);
}
}
static
void
toggle_child
(
HWND
hWnd
,
UINT
cmd
,
HWND
hchild
)
static
void
toggle_child
(
HWND
hWnd
,
UINT
cmd
,
HWND
hchild
)
...
...
programs/regedit/main.h
View file @
75eae135
...
@@ -103,6 +103,7 @@ extern BOOL IsDefaultValue(HWND hwndLV, int i);
...
@@ -103,6 +103,7 @@ extern BOOL IsDefaultValue(HWND hwndLV, int i);
extern
HWND
CreateTreeView
(
HWND
hwndParent
,
LPTSTR
pHostName
,
int
id
);
extern
HWND
CreateTreeView
(
HWND
hwndParent
,
LPTSTR
pHostName
,
int
id
);
extern
BOOL
RefreshTreeView
(
HWND
hWndTV
);
extern
BOOL
RefreshTreeView
(
HWND
hWndTV
);
extern
BOOL
OnTreeExpanding
(
HWND
hWnd
,
NMTREEVIEW
*
pnmtv
);
extern
BOOL
OnTreeExpanding
(
HWND
hWnd
,
NMTREEVIEW
*
pnmtv
);
extern
void
OnTreeSelectionChanged
(
HWND
hwndTV
,
HWND
hwndLV
,
HTREEITEM
hItem
,
BOOL
bRefreshLV
);
extern
LPCTSTR
GetItemPath
(
HWND
hwndTV
,
HTREEITEM
hItem
,
HKEY
*
phRootKey
);
extern
LPCTSTR
GetItemPath
(
HWND
hwndTV
,
HTREEITEM
hItem
,
HKEY
*
phRootKey
);
extern
BOOL
DeleteNode
(
HWND
hwndTV
,
HTREEITEM
hItem
);
extern
BOOL
DeleteNode
(
HWND
hwndTV
,
HTREEITEM
hItem
);
extern
HTREEITEM
InsertNode
(
HWND
hwndTV
,
HTREEITEM
hItem
,
LPTSTR
name
);
extern
HTREEITEM
InsertNode
(
HWND
hwndTV
,
HTREEITEM
hItem
,
LPTSTR
name
);
...
...
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