Category: ATL

Active Template Library related

CHyperStatic: a hypertext static control in ATL and WTL

As well known, WTL provides CHyperLinkImpl custom control implementation to use clickable hyperlink controls. Also control uses a few styles (underlining, tags, command vs. notify notifications), the main implementation is limited: control frequently requires static text, tooltip text and location for ShellExecute; you cannot embed all three strings into dialog template control’s window text so…

Read the full article

CAPTCHA for ASP

CAPTCHA stands for “Completely Automated Public Turing test to tell Computers and Humans Apart” which is more known to public as a verification code one needs to enter in order to proceed with certain action. The challenge is aimed to prevent from automated operation, such as, for instance, user registration, spam or data mining. Alax.Info…

Read the full article

How to add features to standard message boxes in ATL and WTL

MessageBox function is easy to use but it sometimes lacks features. They can be added through a hook, however. This sample demonstrates three features for message boxes: AtlMessageBoxEx shows message box centered by parent window AtlTimedMessageBoxEx shows message box with countdown timer to close AtlOptionalMessageBoxEx shows message box with checkbox to suppress the box in…

Read the full article

How to use native window classes (controls) in resource dialog templates in ATL and WTL

Having custom controls implemented as window classes, it is convenient to use them directly in resource dialog templates. Visual Studio resource editor allow to add custom control item to dialog. This custom control has a Class property which defines window class name of the control. Should native C++ implementation of window class be registered, it…

Read the full article

Replace in Clipboard: a regular expression based text replacement utility

Replace in Clipboard is an application which monitors clipboard usage and test strings copied into clipboard against predefined patterns. In case the clipboard string matches the pattern, a replacement is offered via system tray icon tool tip. User may accept replacement by clicking the tip, or reject it by ignoring the tip. For example, “C:\Inetpub\wwwroot\MyDirectory\Sample.jpg”…

Read the full article