jimfred


Member since 11/12/2008

Name: Jim Frederick

Location: Temecula, CA

19 snippets

3204 profile views

7 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

jimfred's Recent Snippets



« Prev 1 Next »
1 787 posted 13 years ago by jimfred
Example code to exercise a Crystalfontz 533 display from a 8051 using Keil C51.
0 983 posted 14 years ago by jimfred
From Keil C51 examples, TEST.C: ISD51 Demo for TI MSC 1210. Polled (non-interrupt) mode. Work-around for dropped-characters related to stop-bit problem: Clear SCON1.5 (or SM2_1).
0 944 posted 14 years ago by jimfred
This approach allows an application to be embedded in a DLL. This is handy for diagnostic/maintenance utilities that are used with the DLL. Steps to create: * Create a MFC DLL project * Add a dialog * Add an entry point function such as void CA...
0 1430 posted 15 years ago by jimfred
Displaying values as hex in a PropertyGrid by using a TypeConverter class. The TypeConverter class is assigned as a property to the PropertyGrid's data element. Consider improving by making the UInt32HexTypeConverter a generic/template as in HexTy...
0 1565 posted 15 years ago by jimfred
I occasionally need a WinExec function the synchronously executes a command. cwdArg may be null. This example, upon error, pops-up a dialog and exits the app. This is useful for small installation utilities. non-dot.net, with or without MFC.
0 781 posted 15 years ago by jimfred
Determine directory where the .exe is running from. Usually it's CWD - but not always, such as MsiExec Custom Actions. Windows. non-dot.net, with or without MFC.
0 804 posted 15 years ago by jimfred
Simple non-dot.net function to determine if a file exists. Uses the WinBase API. Can be used with or without mfc. Windows, non-dot.net, with or without MFC.
0 1033 posted 15 years ago by jimfred
This OnSize function resizes one large control in a dialog. The one control grows horizontally and vertically to fill the dialog. It's position remains unchanged. Other controls (buttons etc) would typically be above the one resizable control.
0 2786 posted 15 years ago by jimfred
This example demonstrates interpolation using Excel's =TREND function by converting 70 degrees F to 21 Celcius. =TREND({0,100},{32,212},70) The {..} arrays can of course be replaced with a cell range specifier.
0 921 posted 15 years ago by jimfred
Sometimes I want a complete path to a file in the current working directory to make error messages clearer. The URL has alternate approaches.
0 942 posted 15 years ago by jimfred
0 924 posted 15 years ago by jimfred
This uses the concatenation operator "##" to insert a comment "//"
0 4424 posted 15 years ago by jimfred
This function provides C# with functionality similar to the apparently deprecated my.Computer.FileSystem.FindInFiles under the Microsoft.VisualBasic namespace. Example usage: IEnumerable<string> oemFiles = FindInFiles(...
1 1283 posted 15 years ago by jimfred
wiki files accumulate google-navclient-hilite junk created by the search highlighter in the google toolbar. Search the internet for "SPAN id google-navclient-hilite" and expect to see wiki entries with markup junk generated by the google toolbar....
0 922 posted 16 years ago by jimfred
0 684 posted 16 years ago by jimfred
Article explains why STRINGIFY and TOSTRING are both needed. This technique is useful for embedded apps to print debug strings to a debug console. ASSERT or TRACE statements can incorporate these macros. The line numbers are converted to strings a...
0 945 posted 16 years ago by jimfred
The Visual Studio output window will display "Detected memory leaks!" with a memory allocation number, for example, {145}. See Memory Leak Detection Enabling. Using the debugger (without changing code) see: http://msdn.microsoft.com/en-us/library/...
1 1464 posted 16 years ago by jimfred
« Prev 1 Next »