Commit 749e65cb authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

oleview: Added copy CLSID functionality.

parent b2d91368
...@@ -49,6 +49,27 @@ INT_PTR CALLBACK CreateInstOnProc(HWND hDlgWnd, UINT uMsg, WPARAM wParam, LPARAM ...@@ -49,6 +49,27 @@ INT_PTR CALLBACK CreateInstOnProc(HWND hDlgWnd, UINT uMsg, WPARAM wParam, LPARAM
return FALSE; return FALSE;
} }
void CopyClsid(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);
lstrcpyW(pLoc, ((ITEM_INFO *)tvi.lParam)->clsid);
GlobalUnlock(hClipData);
hClipData = SetClipboardData(CF_UNICODETEXT, hClipData);
CloseClipboard();
}
}
void ResizeChild(void) void ResizeChild(void)
{ {
RECT client, stat, tool; RECT client, stat, tool;
...@@ -149,6 +170,10 @@ int MenuCommand(WPARAM wParam, HWND hWnd) ...@@ -149,6 +170,10 @@ int MenuCommand(WPARAM wParam, HWND hWnd)
sizeof(WCHAR[MAX_LOAD_STRING])); sizeof(WCHAR[MAX_LOAD_STRING]));
ShellAbout(hWnd, wszAbout, wszAboutVer, NULL); ShellAbout(hWnd, wszAbout, wszAboutVer, NULL);
break; break;
case IDM_COPYCLSID:
hSelect = TreeView_GetSelection(globals.hTree);
CopyClsid(hSelect);
break;
case IDM_CREATEINST: case IDM_CREATEINST:
hSelect = TreeView_GetSelection(globals.hTree); hSelect = TreeView_GetSelection(globals.hTree);
CreateInst(hSelect, NULL); CreateInst(hSelect, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment