Click here to Skip to main content
6,629,377 members and growing! (22,040 online)
Email Password   helpLost your password?
Announcements
BullFrog Power
 
Search    
Add to IE Search

Articles by Joseph M. Newcomer (54 articles found)

Average article rating: 4.06

Button Controls

A Better Bitmap Button Class
Last Updated: 14 Oct 2001   Page Views: 281,340   Rating: 3.48/5    Votes: 31   Popularity: 5.18   Bookmark Count: 61
An improvement on the CBitmapButton class.
An AutoRepeat Button Class
Last Updated: 14 Apr 2002   Page Views: 104,637   Rating: 4.06/5    Votes: 11   Popularity: 4.23   Bookmark Count: 40
A button control that autorepeats after a set period of time

Combo & List Boxes

Combo Box Initialization
Last Updated: 16 May 2000   Page Views: 121,226   Rating: 4.23/5    Votes: 25   Popularity: 5.91   Bookmark Count: 26
Learn how to programmatically initialize a combo box.
A Logging Listbox Control
Last Updated: 16 May 2000   Page Views: 124,216   Rating: 4.76/5    Votes: 20   Popularity: 6.19   Bookmark Count: 54
Learn how to use printf-like functionality to debug your GUI applications.
A CListBox with automatic HSCROLL maintenance
Last Updated: 27 Jun 2001   Page Views: 97,085   Rating: 4.07/5    Votes: 25   Popularity: 5.69   Bookmark Count: 31
Taking the pain out of adding a horizontal scrollbar to a listbox.

Dialogs and Windows

Threads and Pipes in Console Apps
Last Updated: 10 Jul 2008   Page Views: 21,218   Rating: 4.25/5    Votes: 22   Popularity: 5.71   Bookmark Count: 37
Licence: The Code Project Open License (CPOL)   
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
Last Updated: 5 Apr 2001   Page Views: 83,342   Rating: 3.71/5    Votes: 14   Popularity: 4.26   Bookmark Count: 20
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
Last Updated: 15 Oct 2001   Page Views: 162,007   Rating: 3.80/5    Votes: 25   Popularity: 5.31   Bookmark Count: 37
This is my method of creating dialog-based apps, and in addition, illustrates how to handle the Enter key in an edit control.
Dialog Box Control Management
Last Updated: 16 May 2000   Page Views: 87,278   Rating: 4.03/5    Votes: 30   Popularity: 5.96   Bookmark Count: 38
Learn how to effectively control your dialogs.
Message Management
Last Updated: 16 May 2000   Page Views: 230,124   Rating: 4.76/5    Votes: 95   Popularity: 9.41   Bookmark Count: 187
Learn effective methods for managing your user-defined messages.
Using dialogs in console apps
Last Updated: 23 May 2000   Page Views: 79,743   Rating: 3.94/5    Votes: 15   Popularity: 4.64   Bookmark Count: 24
Learn how to display a message box from a console application.
Using PreSubclassWindow
Last Updated: 24 Oct 2001   Page Views: 55,225   Rating: 4.61/5    Votes: 15   Popularity: 5.42   Bookmark Count: 25
PreSubclassWindow is a very nice handler to use for certain effects in dialogs.
Self-Registering Windows Classes
Last Updated: 24 Oct 2001   Page Views: 60,310   Rating: 3.46/5    Votes: 13   Popularity: 3.86   Bookmark Count: 28
A class that automatically registers its own Window class.

Document / View

Getting Timer Events in a CDocument-derived class
Last Updated: 14 Apr 2002   Page Views: 51,913   Rating: 4.25/5    Votes: 5   Popularity: 2.97   Bookmark Count: 15
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
Last Updated: 30 Jun 2008   Page Views: 10,269   Rating: 3.61/5    Votes: 10   Popularity: 3.61   Bookmark Count: 10
Licence: The Code Project Open License (CPOL)   
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
Last Updated: 3 Nov 2000   Page Views: 85,193   Rating: 3.48/5    Votes: 21   Popularity: 4.61   Bookmark Count: 29
A very informative, user-oriented validation edit control.

Files and Folders

A Handy Guide To Handling Handles
Last Updated: 24 Oct 2001   Page Views: 123,638   Rating: 4.29/5    Votes: 31   Popularity: 6.40   Bookmark Count: 32
The secrets of File Handles and their relationship to File *, CFile, CStdioFile, etc.

Miscellaneous

Owner-Draw Control Example: A Color Table Generator
Last Updated: 4 Feb 2002   Page Views: 103,916   Rating: 3.76/5    Votes: 21   Popularity: 4.97   Bookmark Count: 16
A control for generating colour gradients

Printing

A Simple Printing Mechanism
Last Updated: 16 May 2000   Page Views: 145,554   Rating: 4.00/5    Votes: 31   Popularity: 5.97   Bookmark Count: 38
Learn how to implement print support in your applications.

Applications & Tools

Auto-Increment of the Build Count
Last Updated: 16 May 2000   Page Views: 84,014   Rating: 3.90/5    Votes: 18   Popularity: 4.90   Bookmark Count: 47
Learn how to implement an auto-incrementing build number for your projects.
Dialog Shortcut Consistency Checker
Last Updated: 16 May 2000   Page Views: 31,774   Rating: 3.33/5    Votes: 3   Popularity: 1.59   Bookmark Count: 8
A tool to check the consistency of your dialog shortcuts.
A better Zoomin utility
Last Updated: 17 Jun 2005   Page Views: 41,774   Rating: 4.55/5    Votes: 30   Popularity: 6.73   Bookmark Count: 44
A better Zoomin utility.
The ViewPort Explorer
Last Updated: 11 Jul 2005   Page Views: 26,187   Rating: 4.78/5    Votes: 22   Popularity: 6.42   Bookmark Count: 47
A viewport explorer utility.

GDI

Saving Drawing Contexts
Last Updated: 27 Mar 2001   Page Views: 60,689   Rating: 4.72/5    Votes: 27   Popularity: 6.75   Bookmark Count: 20
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?
Last Updated: 16 May 2000   Page Views: 47,752   Rating: 3.77/5    Votes: 30   Popularity: 5.57   Bookmark Count: 14
Learn about who owns the GUI definition and pitfalls of GUI programming.
Drawing Techniques
Last Updated: 31 Mar 2001   Page Views: 74,125   Rating: 4.26/5    Votes: 31   Popularity: 6.36   Bookmark Count: 45
Learn how to effectively draw your dialogs.

General Graphics

Screen Capture to the Clipboard
Last Updated: 5 Apr 2001   Page Views: 189,465   Rating: 4.48/5    Votes: 36   Popularity: 6.97   Bookmark Count: 64
How do you capture the bitmap of a window? This little download shows how, and places the bitmap on the clipboard.

Libraries

Dr. Joseph M. Newcomer's MVP Tips, Techniques, and Goodies
Last Updated: 17 May 2000   Page Views: 44,820   Rating: 3.25/5    Votes: 39   Popularity: 5.17   Bookmark Count: 43
Licence: The Code Project Open License (CPOL)   
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
Last Updated: 30 Jun 2008   Page Views: 9,165   Rating: 3.49/5    Votes: 11   Popularity: 3.63   Bookmark Count: 13
Licence: The Code Project Open License (CPOL)   
This essay shows an interface that allows the ::FormatMessage API to be easily accessed from MFC.

C / C++ Language

Attaching and Detaching Objects
Last Updated: 16 May 2000   Page Views: 76,142   Rating: 4.75/5    Votes: 38   Popularity: 7.50   Bookmark Count: 49
Attaching and detaching MFC objects to and from Windows objects.
Avoiding GetDlgItem
Last Updated: 16 May 2000   Page Views: 218,807   Rating: 2.56/5    Votes: 111   Popularity: 5.23   Bookmark Count: 44
Learn how to refrain from using GetDlgItem.
Avoiding Multiple Instances of an Application
Last Updated: 16 May 2000   Page Views: 242,370   Rating: 4.71/5    Votes: 110   Popularity: 9.61   Bookmark Count: 154
Learn the right way to limit your application to run only one instance.
Callbacks, Threads, and MFC
Last Updated: 16 May 2000   Page Views: 113,949   Rating: 4.40/5    Votes: 49   Popularity: 7.44   Bookmark Count: 75
Learn how to use callbacks and threads with MFC.
A Simple Vector Editor
Last Updated: 5 Jun 2002   Page Views: 79,900   Rating: 3.58/5    Votes: 20   Popularity: 4.65   Bookmark Count: 19
A simeple editor to make my polygon class a bit more usable.
Avoiding UpdateData
Last Updated: 23 Apr 2007   Page Views: 175,016   Rating: 2.45/5    Votes: 103   Popularity: 4.92   Bookmark Count: 37
Learn how to avoid using UpdateData in your modal dialogs.

Algorithms & Recipes

A Checksum Algorithm
Last Updated: 27 Mar 2001   Page Views: 127,715   Rating: 4.18/5    Votes: 31   Popularity: 6.24   Bookmark Count: 56
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
Last Updated: 24 Oct 2001   Page Views: 61,549   Rating: 3.59/5    Votes: 18   Popularity: 4.51   Bookmark Count: 28
A class to make handling polygons easier.

DLLs & Assemblies

The Ultimate (DLL) Header File
Last Updated: 7 Nov 2000   Page Views: 111,124   Rating: 4.14/5    Votes: 32   Popularity: 6.24   Bookmark Count: 69
Here is the ultimate header file that makes multiple declaration compiler errors a thing of the past.
Hooks and DLLs
Last Updated: 31 Mar 2001   Page Views: 333,803   Rating: 4.40/5    Votes: 96   Popularity: 8.72   Bookmark Count: 229
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
Last Updated: 16 May 2000   Page Views: 51,021   Rating: 4.24/5    Votes: 31   Popularity: 6.32   Bookmark Count: 49
Learn effective methods for logging and debugging your Windows apps.
Optimization: Your Worst Enemy
Last Updated: 12 Aug 2000   Page Views: 173,746   Rating: 4.68/5    Votes: 144   Popularity: 10.11   Bookmark Count: 102
Learn about the potential pitfalls of code optimization.
Creating your own GUIDs
Last Updated: 17 Jul 2001   Page Views: 79,436   Rating: 2.80/5    Votes: 18   Popularity: 3.51   Bookmark Count: 19
A simple method of creating a unique name or identifier.
Using FormatMessage
Last Updated: 4 Feb 2002   Page Views: 80,854   Rating: 2.79/5    Votes: 12   Popularity: 3.01   Bookmark Count: 26
An example of one of the most effective uses of the the call to FormatMessage

String handling

CString Management
Last Updated: 17 May 2000   Page Views: 330,603   Rating: 4.62/5    Votes: 127   Popularity: 9.73   Bookmark Count: 228
Licence: The Code Project Open License (CPOL)   
Learn how to effectively use CStrings.

Threads, Processes & IPC

An MFC Process Class
Last Updated: 25 Oct 2001   Page Views: 131,625   Rating: 3.86/5    Votes: 35   Popularity: 5.96   Bookmark Count: 51
This class allows you to create a child process and receive notification of its output.
An Introduction to Processes: Asynchronous Process Notification
Last Updated: 16 May 2000   Page Views: 117,716   Rating: 4.59/5    Votes: 31   Popularity: 6.85   Bookmark Count: 70
Learn how to create new processes and how to efficiently manage them.
A Fiber Class (and Friends)
Last Updated: 1 Jul 2008   Page Views: 8,859   Rating: 4.46/5    Votes: 19   Popularity: 5.71   Bookmark Count: 26
Licence: The Code Project Open License (CPOL)   
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
Last Updated: 16 May 2000   Page Views: 236,548   Rating: 4.08/5    Votes: 42   Popularity: 6.62   Bookmark Count: 96
Learn tricks on how to create and use a User-Interface thread.
Using Worker Threads
Last Updated: 5 Apr 2001   Page Views: 468,860   Rating: 4.69/5    Votes: 201   Popularity: 10.79   Bookmark Count: 328
Learn how to create and use worker threads in your applications.
Using Semaphores: Multithreaded Producer/Consumer
Last Updated: 14 Jun 2001   Page Views: 160,194   Rating: 4.80/5    Votes: 32   Popularity: 7.23   Bookmark Count: 59
An introduction to using Semaphores.

Debug Tips

Surviving the Release Version
Last Updated: 16 Jul 2001   Page Views: 248,738   Rating: 4.70/5    Votes: 162   Popularity: 10.39   Bookmark Count: 203
Learn about the issues and differences between Debug and Release builds.

Hardware & System

Time is the Simplest Thing...
Last Updated: 2 Jun 2000   Page Views: 121,899   Rating: 4.34/5    Votes: 75   Popularity: 8.13   Bookmark Count: 59
Explains misconceptions about timing in Windows.
How Big Is My Program
Last Updated: 4 Apr 2001   Page Views: 55,546   Rating: 4.48/5    Votes: 34   Popularity: 6.86   Bookmark Count: 27
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
Last Updated: 27 Mar 2001   Page Views: 56,760   Rating: 4.00/5    Votes: 19   Popularity: 5.12   Bookmark Count: 39
This represents a handy set of classes I built to ease the pain of dealing with the Registry.

Joseph M. Newcomer


Member

Location: United States United States


Last Updated 21 Nov 2009
Web21 | 2.2.0175 | Advertise | Privacy
Copyright © CodeProject, 1999-2009
All Rights Reserved. Terms of Use