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
0defa4e8
Commit
0defa4e8
authored
Jun 22, 2006
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleview: Added copy HTML tag functionality.
parent
749e65cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
2 deletions
+34
-2
En.rc
programs/oleview/En.rc
+1
-1
oleview.c
programs/oleview/oleview.c
+33
-1
No files found.
programs/oleview/En.rc
View file @
0defa4e8
...
...
@@ -49,7 +49,7 @@ IDM_MENU MENU
MENUITEM "Create Instance &On", IDM_CREATEINSTON, GRAYED
MENUITEM "&Release Instance", IDM_RELEASEINST, GRAYED
MENUITEM SEPARATOR
MENUITEM "Copy
&C
LSID to clipboard", IDM_COPYCLSID, GRAYED
MENUITEM "Copy
C&
LSID to clipboard", IDM_COPYCLSID, GRAYED
MENUITEM "Copy &HTML object Tag to clipboard", IDM_HTMLTAG, GRAYED
MENUITEM SEPARATOR
MENUITEM "&View...", IDM_VIEW, GRAYED
...
...
programs/oleview/oleview.c
View file @
0defa4e8
...
...
@@ -22,6 +22,9 @@
GLOBALS
globals
;
static
WCHAR
wszRegEdit
[]
=
{
'r'
,
'e'
,
'g'
,
'e'
,
'd'
,
'i'
,
't'
,
'.'
,
'e'
,
'x'
,
'e'
,
'\0'
};
static
WCHAR
wszFormat
[]
=
{
'<'
,
'o'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
'\n'
,
' '
,
' '
,
' '
,
'c'
,
'l'
,
'a'
,
's'
,
's'
,
'i'
,
'd'
,
'='
,
'\"'
,
'c'
,
'l'
,
's'
,
'i'
,
'd'
,
':'
,
'%'
,
's'
,
'\"'
,
'\n'
,
'>'
,
'\n'
,
'<'
,
'/'
,
'o'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
'>'
};
INT_PTR
CALLBACK
CreateInstOnProc
(
HWND
hDlgWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
@@ -70,6 +73,31 @@ void CopyClsid(HTREEITEM item)
}
}
void
CopyHTMLTag
(
HTREEITEM
item
)
{
TVITEM
tvi
;
memset
(
&
tvi
,
0
,
sizeof
(
TVITEM
));
tvi
.
hItem
=
item
;
tvi
.
cchTextMax
=
MAX_LOAD_STRING
;
SendMessage
(
globals
.
hTree
,
TVM_GETITEM
,
0
,
(
LPARAM
)
&
tvi
);
if
(
OpenClipboard
(
globals
.
hMainWnd
)
&&
EmptyClipboard
()
&&
tvi
.
lParam
)
{
HANDLE
hClipData
=
GlobalAlloc
(
GHND
,
sizeof
(
WCHAR
[
MAX_LOAD_STRING
]));
LPVOID
pLoc
=
GlobalLock
(
hClipData
);
int
clsidLen
=
lstrlenW
(((
ITEM_INFO
*
)
tvi
.
lParam
)
->
clsid
)
-
1
;
((
ITEM_INFO
*
)
tvi
.
lParam
)
->
clsid
[
clsidLen
]
=
'\0'
;
wsprintfW
(
pLoc
,
wszFormat
,
((
ITEM_INFO
*
)
tvi
.
lParam
)
->
clsid
+
1
);
((
ITEM_INFO
*
)
tvi
.
lParam
)
->
clsid
[
clsidLen
]
=
'}'
;
GlobalUnlock
(
hClipData
);
hClipData
=
SetClipboardData
(
CF_UNICODETEXT
,
hClipData
);
CloseClipboard
();
}
}
void
ResizeChild
(
void
)
{
RECT
client
,
stat
,
tool
;
...
...
@@ -150,7 +178,7 @@ void RefreshMenu(HTREEITEM item)
EnableMenuItem
(
hMenu
,
IDM_VIEW
,
MF_GRAYED
);
}
parent
=
TreeView_GetParent
(
globals
.
hTree
,
item
);
if
(
parent
==
tree
.
hAID
||
parent
==
tree
.
hGBCC
)
if
(
parent
==
tree
.
hAID
||
parent
==
tree
.
hGBCC
||
parent
==
tree
.
hTL
)
EnableMenuItem
(
hMenu
,
IDM_COPYCLSID
,
MF_ENABLED
);
}
...
...
@@ -174,6 +202,10 @@ int MenuCommand(WPARAM wParam, HWND hWnd)
hSelect
=
TreeView_GetSelection
(
globals
.
hTree
);
CopyClsid
(
hSelect
);
break
;
case
IDM_HTMLTAG
:
hSelect
=
TreeView_GetSelection
(
globals
.
hTree
);
CopyHTMLTag
(
hSelect
);
break
;
case
IDM_CREATEINST
:
hSelect
=
TreeView_GetSelection
(
globals
.
hTree
);
CreateInst
(
hSelect
,
NULL
);
...
...
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