Click here to Skip to main content

Articles by Joseph M. Newcomer (Articles: 54)

Articles: 54

RSS Feed

Average article rating: 4.26

Button Controls

A Better Bitmap Button Class
Posted: 16 May 2000   Updated: 14 Oct 2001   Views: 322,179   Rating: 3.51/5    Votes: 32   Popularity: 5.23
Licence: Not specified      Bookmarked: 76   Downloaded: 6,684
An improvement on the CBitmapButton class.
An AutoRepeat Button Class
Posted: 14 Apr 2002   Updated: 14 Apr 2002   Views: 120,285   Rating: 4.06/5    Votes: 11   Popularity: 4.23
Licence: Not specified      Bookmarked: 49   Downloaded: 1,366
A button control that autorepeats after a set period of time

Combo & List Boxes

Combo Box Initialization
Posted: 16 May 2000   Updated: 16 May 2000   Views: 141,400   Rating: 4.23/5    Votes: 25   Popularity: 5.91
Licence: Not specified      Bookmarked: 29   Downloaded: 1,274
Learn how to programmatically initialize a combo box.
A Logging Listbox Control
Posted: 16 May 2000   Updated: 16 May 2000   Views: 143,198   Rating: 4.76/5    Votes: 20   Popularity: 6.19
Licence: Not specified      Bookmarked: 69   Downloaded: 2,355
Learn how to use printf-like functionality to debug your GUI applications.
A CListBox with automatic HSCROLL maintenance
Posted: 27 Mar 2001   Updated: 27 Jun 2001   Views: 123,067   Rating: 4.07/5    Votes: 25   Popularity: 5.69
Licence: Not specified      Bookmarked: 37   Downloaded: 1,333
Taking the pain out of adding a horizontal scrollbar to a listbox.

Dialogs and Windows

Threads and Pipes in Console Apps
Posted: 30 Jun 2008   Updated: 10 Jul 2008   Views: 43,756   Rating: 4.91/5    Votes: 23   Popularity: 6.69
Licence: The Code Project Open License (CPOL)      Bookmarked: 53   Downloaded: 520
When a dynamically-resizable dialog is created, you may find it desirable to have controls resize or rearrange themselves dynamically in response to these changes. This project shows some simple techniques to use when the arrangements are not too complex. It also incorporates two other projects, the
Subclassing Dialogs and Property Pages
Posted: 5 Apr 2001   Updated: 5 Apr 2001   Views: 98,889   Rating: 3.71/5    Votes: 14   Popularity: 4.26
Licence: Not specified      Bookmarked: 23   Downloaded: 0
You have a lot of dialogs that have a lot of properties in common. You'd like to derive the specialized ones from the general ones. Here's how.
Creating a Dialog-based App
Posted: 15 Oct 2001   Updated: 15 Oct 2001   Views: 187,140   Rating: 3.80/5    Votes: 25   Popularity: 5.31
Licence: Not specified      Bookmarked: 42   Downloaded: 1,121
This is my method of creating dialog-based apps, and in addition, illustrates how to handle the Enter key in an edit control.
Message Management
Posted: 16 May 2000   Updated: 16 May 2000   Views: 290,992   Rating: 4.96/5    Votes: 97   Popularity: 9.86
Licence: Not specified      Bookmarked: 216   Downloaded: 0
Learn effective methods for managing your user-defined messages.
Dialog Box Control Management
Posted: 16 May 2000   Updated: 16 May 2000   Views: 99,630   Rating: 4.06/5    Votes: 31   Popularity: 6.02
Licence: Not specified      Bookmarked: 44   Downloaded: 0
Learn how to effectively control your dialogs.
Using dialogs in console apps
Posted: 23 May 2000   Updated: 23 May 2000   Views: 94,265   Rating: 3.94/5    Votes: 15   Popularity: 4.64
Licence: Not specified      Bookmarked: 29   Downloaded: 0
Learn how to display a message box from a console application.
Using PreSubclassWindow
Posted: 24 Oct 2000   Updated: 24 Oct 2001   Views: 69,553   Rating: 4.61/5    Votes: 15   Popularity: 5.42
Licence: Not specified      Bookmarked: 33   Downloaded: 0
PreSubclassWindow is a very nice handler to use for certain effects in dialogs.
Self-Registering Windows Classes
Posted: 24 Oct 2001   Updated: 24 Oct 2001   Views: 71,176   Rating: 3.46/5    Votes: 13   Popularity: 3.86
Licence: Not specified      Bookmarked: 33   Downloaded: 963
A class that automatically registers its own Window class.

Document / View

Getting Timer Events in a CDocument-derived class
Posted: 14 Apr 2002   Updated: 14 Apr 2002   Views: 65,179   Rating: 4.11/5    Votes: 6   Popularity: 3.31
Licence: Not specified      Bookmarked: 16   Downloaded: 664
But WM_TIMER messages are not routable via the standard MFC "command routing" mechanism. This article shows you how to work around this.

Edit Controls

Avoiding EN_CHANGE notifications
Posted: 30 Jun 2008   Updated: 30 Jun 2008   Views: 27,298   Rating: 3.61/5    Votes: 10   Popularity: 3.61
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 0
Handling complex control interactions when edit controls are involved can lead to problems when EN_CHANGE notifications are generated by the application actually changing the control values. To avoid having to handle EN_CHANGE notifications from CEdit and CRichEdit, this article shows how to derive
A Validating Edit Control
Posted: 3 Nov 2000   Updated: 3 Nov 2000   Views: 98,564   Rating: 3.53/5    Votes: 22   Popularity: 4.74
Licence: Not specified      Bookmarked: 35   Downloaded: 1,182
A very informative, user-oriented validation edit control.

Files and Folders

A Handy Guide To Handling Handles
Posted: 4 Apr 2001   Updated: 24 Oct 2001   Views: 193,354   Rating: 4.66/5    Votes: 38   Popularity: 7.35
Licence: Not specified      Bookmarked: 55   Downloaded: 0
The secrets of File Handles and their relationship to File *, CFile, CStdioFile, etc.

Miscellaneous

Owner-Draw Control Example: A Color Table Generator
Posted: 4 Feb 2002   Updated: 4 Feb 2002   Views: 125,722   Rating: 3.76/5    Votes: 21   Popularity: 4.97
Licence: Not specified      Bookmarked: 22   Downloaded: 960
A control for generating colour gradients

Printing

A Simple Printing Mechanism
Posted: 16 May 2000   Updated: 16 May 2000   Views: 180,549   Rating: 4.05/5    Votes: 33   Popularity: 6.11
Licence: Not specified      Bookmarked: 46   Downloaded: 2,226
Learn how to implement print support in your applications.

Applications & Tools

Auto-Increment of the Build Count
Posted: 16 May 2000   Updated: 16 May 2000   Views: 104,906   Rating: 3.90/5    Votes: 18   Popularity: 4.90
Licence: Not specified      Bookmarked: 53   Downloaded: 806
Learn how to implement an auto-incrementing build number for your projects.
Dialog Shortcut Consistency Checker
Posted: 16 May 2000   Updated: 16 May 2000   Views: 36,777   Rating: 3.33/5    Votes: 3   Popularity: 1.59
Licence: Not specified      Bookmarked: 12   Downloaded: 335
A tool to check the consistency of your dialog shortcuts.
A better Zoomin utility
Posted: 17 Jun 2005   Updated: 17 Jun 2005   Views: 57,576   Rating: 4.93/5    Votes: 30   Popularity: 7.28
Licence: Not specified      Bookmarked: 53   Downloaded: 943
A better Zoomin utility.
The ViewPort Explorer
Posted: 11 Jul 2005   Updated: 11 Jul 2005   Views: 36,741   Rating: 4.89/5    Votes: 21   Popularity: 6.47
Licence: Not specified      Bookmarked: 54   Downloaded: 1,019
A viewport explorer utility.

GDI

Saving Drawing Contexts
Posted: 27 Mar 2001   Updated: 27 Mar 2001   Views: 81,602   Rating: 5.00/5    Votes: 27   Popularity: 7.16
Licence: Not specified      Bookmarked: 27   Downloaded: 0
GDI objects selected in a DC can't be deleted - even when you call DeleteObject. This handy class makes these potential leaks a thing of the past.
Who Owns the GUI?
Posted: 16 May 2000   Updated: 16 May 2000   Views: 56,743   Rating: 3.84/5    Votes: 32   Popularity: 5.73
Licence: Not specified      Bookmarked: 19   Downloaded: 0
Learn about who owns the GUI definition and pitfalls of GUI programming.
Drawing Techniques
Posted: 16 May 2000   Updated: 31 Mar 2001   Views: 88,484   Rating: 4.28/5    Votes: 32   Popularity: 6.42
Licence: Not specified      Bookmarked: 52   Downloaded: 0
Learn how to effectively draw your dialogs.

General Graphics

Screen Capture to the Clipboard
Posted: 5 Apr 2001   Updated: 5 Apr 2001   Views: 278,339   Rating: 5.00/5    Votes: 36   Popularity: 7.78
Licence: Not specified      Bookmarked: 83   Downloaded: 0
How do you capture the bitmap of a window? This little download shows how, and places the bitmap on the clipboard.

C / C++ Language

Attaching and Detaching Objects
Posted: 16 May 2000   Updated: 16 May 2000   Views: 91,498   Rating: 4.97/5    Votes: 40   Popularity: 7.97
Licence: Not specified      Bookmarked: 59   Downloaded: 0
Attaching and detaching MFC objects to and from Windows objects.
Callbacks, Threads, and MFC
Posted: 16 May 2000   Updated: 16 May 2000   Views: 142,140   Rating: 4.94/5    Votes: 49   Popularity: 8.35
Licence: Not specified      Bookmarked: 85   Downloaded: 0
Learn how to use callbacks and threads with MFC.
Avoiding GetDlgItem
Posted: 16 May 2000   Updated: 16 May 2000   Views: 291,521   Rating: 4.32/5    Votes: 114   Popularity: 8.91
Licence: Not specified      Bookmarked: 50   Downloaded: 0
Learn how to refrain from using GetDlgItem.
Avoiding Multiple Instances of an Application
Posted: 16 May 2000   Updated: 16 May 2000   Views: 329,945   Rating: 4.92/5    Votes: 117   Popularity: 10.17
Licence: Not specified      Bookmarked: 188   Downloaded: 0
Learn the right way to limit your application to run only one instance.
A Simple Vector Editor
Posted: 5 Jun 2002   Updated: 5 Jun 2002   Views: 94,143   Rating: 3.58/5    Votes: 20   Popularity: 4.65
Licence: Not specified      Bookmarked: 25   Downloaded: 946
A simeple editor to make my polygon class a bit more usable.
Avoiding UpdateData
Posted: 16 May 2000   Updated: 23 Apr 2007   Views: 201,886   Rating: 3.37/5    Votes: 105   Popularity: 6.82
Licence: Not specified      Bookmarked: 42   Downloaded: 0
Learn how to avoid using UpdateData in your modal dialogs.

Libraries

Dr. Joseph M. Newcomer's MVP Tips, Techniques, and Goodies
Posted: 17 May 2000   Updated: 17 May 2000   Views: 51,523   Rating: 3.25/5    Votes: 39   Popularity: 5.17
Licence: The Code Project Open License (CPOL)      Bookmarked: 52   Downloaded: 0
A collection of code examples and essays that I've often posted to the microsoft.public.vc.mfc newsgroup and other places

MFC

An MFC Interface to ::FormatMessage
Posted: 30 Jun 2008   Updated: 30 Jun 2008   Views: 20,105   Rating: 3.49/5    Votes: 12   Popularity: 3.76
Licence: The Code Project Open License (CPOL)      Bookmarked: 16   Downloaded: 0
This essay shows an interface that allows the ::FormatMessage API to be easily accessed from MFC.

Algorithms & Recipes

A Checksum Algorithm
Posted: 27 Mar 2001   Updated: 27 Mar 2001   Views: 171,459   Rating: 4.38/5    Votes: 32   Popularity: 6.59
Licence: Not specified      Bookmarked: 62   Downloaded: 0
A checksum is a value which is computed which allows you to check the validity of something. Typically, checksums are used in data transmission contexts to detect if the data has been transmitted successfully.
A General Polygon Management Routine
Posted: 24 Oct 2001   Updated: 24 Oct 2001   Views: 71,075   Rating: 3.59/5    Votes: 18   Popularity: 4.51
Licence: Not specified      Bookmarked: 30   Downloaded: 1,196
A class to make handling polygons easier.

DLLs & Assemblies

The Ultimate (DLL) Header File
Posted: 7 Nov 2000   Updated: 7 Nov 2000   Views: 135,156   Rating: 4.14/5    Votes: 32   Popularity: 6.24
Licence: Not specified      Bookmarked: 77   Downloaded: 0
Here is the ultimate header file that makes multiple declaration compiler errors a thing of the past.
Hooks and DLLs
Posted: 31 Mar 2001   Updated: 31 Mar 2001   Views: 1,056,558   Rating: 4.84/5    Votes: 106   Popularity: 9.82
Licence: Not specified      Bookmarked: 284   Downloaded: 8,282
There is a lot of confusion about how to set up and use global hook functions. This essay attempts to clear up some of these issues.

Programming Tips

The Graphical Developer Interface
Posted: 16 May 2000   Updated: 16 May 2000   Views: 60,115   Rating: 4.68/5    Votes: 32   Popularity: 7.05
Licence: Not specified      Bookmarked: 59   Downloaded: 0
Learn effective methods for logging and debugging your Windows apps.
Optimization: Your Worst Enemy
Posted: 16 May 2000   Updated: 12 Aug 2000   Views: 248,039   Rating: 4.92/5    Votes: 156   Popularity: 10.78
Licence: Not specified      Bookmarked: 126   Downloaded: 0
Learn about the potential pitfalls of code optimization.
Creating your own GUIDs
Posted: 17 Jul 2001   Updated: 17 Jul 2001   Views: 108,912   Rating: 2.80/5    Votes: 18   Popularity: 3.51
Licence: Not specified      Bookmarked: 24   Downloaded: 0
A simple method of creating a unique name or identifier.
Using FormatMessage
Posted: 4 Feb 2002   Updated: 4 Feb 2002   Views: 118,340   Rating: 2.95/5    Votes: 14   Popularity: 3.33
Licence: Not specified      Bookmarked: 30   Downloaded: 499
An example of one of the most effective uses of the the call to FormatMessage

String handling

CString Management
Posted: 16 May 2000   Updated: 17 May 2000   Views: 510,566   Rating: 4.94/5    Votes: 129   Popularity: 10.42
Licence: The Code Project Open License (CPOL)      Bookmarked: 278   Downloaded: 0
Learn how to effectively use CStrings.

Threads, Processes & IPC

An MFC Process Class
Posted: 15 Oct 2001   Updated: 25 Oct 2001   Views: 180,379   Rating: 4.86/5    Votes: 35   Popularity: 7.51
Licence: Not specified      Bookmarked: 63   Downloaded: 1,809
This class allows you to create a child process and receive notification of its output.
An Introduction to Processes: Asynchronous Process Notification
Posted: 16 May 2000   Updated: 16 May 2000   Views: 142,890   Rating: 4.60/5    Votes: 34   Popularity: 7.03
Licence: Not specified      Bookmarked: 93   Downloaded: 1,655
Learn how to create new processes and how to efficiently manage them.
A Fiber Class (and Friends)
Posted: 1 Jul 2008   Updated: 1 Jul 2008   Views: 19,195   Rating: 4.88/5    Votes: 20   Popularity: 6.34
Licence: The Code Project Open License (CPOL)      Bookmarked: 32   Downloaded: 161
Fibers are a lightweigtht cooperative threading mechanism, or a coroutine mechanism, depending on how you look at them. Besides providing a very efficient thread-like implementation, fibers allow you to provide "continuations", that is, computations which perform some function, suspend themselves, a
Using User-Interface Threads
Posted: 16 May 2000   Updated: 16 May 2000   Views: 296,438   Rating: 4.25/5    Votes: 42   Popularity: 6.90
Licence: Not specified      Bookmarked: 117   Downloaded: 0
Learn tricks on how to create and use a User-Interface thread.
Using Worker Threads
Posted: 16 May 2000   Updated: 5 Apr 2001   Views: 699,162   Rating: 4.93/5    Votes: 211   Popularity: 11.47
Licence: Not specified      Bookmarked: 390   Downloaded: 0
Learn how to create and use worker threads in your applications.
Using Semaphores: Multithreaded Producer/Consumer
Posted: 14 Jun 2001   Updated: 14 Jun 2001   Views: 229,878   Rating: 4.97/5    Votes: 34   Popularity: 7.62
Licence: Not specified      Bookmarked: 85   Downloaded: 2,381
An introduction to using Semaphores.

Debug Tips

Surviving the Release Version
Posted: 16 May 2000   Updated: 16 Jul 2001   Views: 357,975   Rating: 4.98/5    Votes: 175   Popularity: 11.17
Licence: Not specified      Bookmarked: 240   Downloaded: 0
Learn about the issues and differences between Debug and Release builds.

Hardware & System

Time is the Simplest Thing...
Posted: 2 Jun 2000   Updated: 2 Jun 2000   Views: 152,640   Rating: 4.65/5    Votes: 79   Popularity: 8.82
Licence: The Code Project Open License (CPOL)      Bookmarked: 70   Downloaded: 0
Explains misconceptions about timing in Windows.
How Big Is My Program
Posted: 4 Apr 2001   Updated: 4 Apr 2001   Views: 65,224   Rating: 4.69/5    Votes: 35   Popularity: 7.24
Licence: Not specified      Bookmarked: 32   Downloaded: 0
A discussion on the working size of your executable, and why you shouldn't believe those numbers PView or task manager tell you.
A Registry Class
Posted: 27 Mar 2001   Updated: 27 Mar 2001   Views: 67,596   Rating: 4.10/5    Votes: 20   Popularity: 5.33
Licence: Not specified      Bookmarked: 42   Downloaded: 1,179
This represents a handy set of classes I built to ease the pain of dealing with the Registry.
No blogs have been submitted.
No tips have been posted.

Joseph M. Newcomer
United States United States
Member
No Biography provided


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 19 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid