DLL, Clipboard
Version B
Text statistics (histogram)
-
Demonstration
-
DLL:
-
implements a function:
void textstat( char array[], int size, HWND hwnd, BOOL
(CALLBACK *stepFunction)(int, int));
-
functionality:
-
takes the text buffer and its size as arguments
-
creates a bitmap, which shows the histogram for the number of occurences of
each of the characters from between #32 and #126 (decimal ASCII codes).
-
while evaluating the stats, calls the
stepFunction after
each character
-
saves the bitmap into the clipboard
-
Main application:
-
menu with options:
-
Load DLL / Close DLL / Process Clipboard
-
Close DLL and Process Clipboard options are grayed if no DLL is loaded
-
Process Clipboard takes the text data from the clipboard, and executes
the function containted in the DLL passing the text data as an argument
-
implements the
stepFunction:
-
updates the progress shown on the Window Bar (see the demonstration)
-
Requirements:
-
correct use of bitmaps, GDI objects and DCs (if any are needed)
-
each library opening should be paired with library closing, the same applies to
clipboard
-
Approximate points:
-
DLL: 3.5
-
using clipboard: 3.5
-
functionality: 3.0