Add "Shortcuts" in the Visual Studio Tools menu

xiaoxiao2021-03-06  115

VStool is a static class that can easily add or delete "shortcut" in the Tools menu of Microsoft Visual Studio 6.0 / .NET, which adds our programs to the inside, easy to program :)

How to use: Change STR_APPNAME macro definitions can be used for your application name (or menu name).

/ / Prerequisite #pragma once # include

// cvstool class class cvstool {public: // Decision tool does already exist inline static bool winApi exist () {return Operate (false, 0) || Operate (true, 0);} // Add Tool Inline Static Bool WinApi Add () {BOOL BRESULT = OPERATE (False, 1); BRESULT = OPERATE (TRUE, 1) | BRESULT; RETURN BRESULT;} // Remove Tool Inline Static Bool WinApi Remove () {Bool BRESULT = Operate (false, -1) BRESULT = OPERATE (TRUE, -1) | BRESULT; RETURN BRESULT;} private: // Enumerate version and operate Static Bool WinAPI Operate (Bool BDOTNET, IC iCommand); / / Operating Static Bool WinApi for opened tool keys Operate (HKEY hToolKey, BOOL bDotNet, INT iCommand); // get the tool number static DWORD WINAPI get (HKEY hToolKey, BOOL bDotNet, DWORD dwNumTools); // add tools static BOOL WINAPI Add (HKEY hToolKey, DWORD dwNumTools, BOOL bDotNet, INT iCommand); // update tool static BOOL WINAPI update (HKEY hToolKey, BOOL bDotNet, DWORD dwIndex); // delete tool static BOOL WINAPI Remove (HKEY hToolKey, BOOL bDotNet, DWORD dwIndex, DWORD dwNumTools);};

转载请注明原文地址:https://www.9cbs.com/read-100631.html

New Post(0)