Visual Studio Add-RGB Macro Creator

Environment: VC6 SP5, W2K SP3

This addin supports one command: ColorSelectorCommand. The addin shows a standard ColorSelect dialog and forms text that looks like an RGB-macro string (RGB(100, 120, 130)). Before the dialog is shown, the addin checks the current selection. If the selection starts with "RGB," the current color in the dialog will be set to those RGB values.

Gert-Jan de Vos has decided to add some features:

  • The selector now provides a choice for RGB(), hex, or HTML format color output—(RGB(255, 128, 64), 0x4080FF, #FF8040)
  • It recognises any of the supported formats in the source.
  • It recognises input if the cursor is anywhere in the color text.
  • It adds a toolbar button.

The addin became much better after its additions. I only have changed a little RGB-processing and have added a check on hex-values. Now the addin also can processes strings of the RGB(0xFF, 0x80, 0x40) kind.

Also, I have added a function "pipette" to define the color of a point in any place on the screen.

Note: For definition of color outside Windows' Visual Studio, it is necessary to hold down the left mouse button.

Downloads

Download addin - 19 Kb
Download source - 28 Kb


Comments

  • addauto.h' isn't in the project

    Posted by alost on 01/23/2008 04:49am

    Loading snd building the project give the message: Compiling... StdAfx.cpp WINVER not defined. Defaulting to 0x0600 (Windows Vista) c:\avo\colorselector_src\stdafx.h(21) : fatal error C1083: Cannot open include file: 'ObjModel\addauto.h': No such file or directory Build log was saved at "file://C:\avo\ColorSelector_src\Debug\BuildLog.htm" ColorSelector - 1 error(s), 0 warning(s)

    Reply
  • Crashes VS if no document open.

    Posted by Legacy on 08/28/2003 12:00am

    Originally posted by: Erich W. Einfalt

    If no source code document is open, the toolbar icon still shows to be enabled. If the icon is clicked when no source code document is open, an access violation dialog appears:

    "...instruction at address 0x100041de tried to access memory at 0x00000000. Memory could not be 'read'"

    If no document is open, the toolbar icon should be disabled.

    Reply
  • Woooooooow!! Amazing!!!

    Posted by Legacy on 08/26/2003 12:00am

    Originally posted by: EF

    This the most usfull addin I ever seen!!!

    Goooooooooood Work!!

    Reply
  • Grreat Work

    Posted by Legacy on 08/06/2003 12:00am

    Originally posted by: Nice Life

    Great Idea!!

    Reply
  • Any links to guidelines

    Posted by Legacy on 08/05/2003 12:00am

    Originally posted by: Kiran

    Any links to guidelines to develop an add-in ?

    Thanks,
    Kiran

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • "Security" is the number one issue holding business leaders back from the cloud. But does the reality match the perception? Keeping data close to home, on premises, makes business and IT leaders feel inherently more secure. But the truth is, cloud solutions can offer companies real, tangible security advantages. Before you assume that on-site is the only way to keep data safe, it's worth taking a comprehensive approach to evaluating risks. Doing so can lead to big benefits.

  • Corporate e-Learning technology has a long and diverse pedigree. As far back as the 1980s, companies were adopting computer-based training to supplement traditional classroom activities. More recently, rich web-based applications have added streaming audio and video, real-time collaboration and other new tools to the e-Learning mix. At the same time, the growing availability of informal learning tools--a category that includes everything from web searches to social media posts--are having a major impact on …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds