Author: Bruce Arnold
The program was barely more than a command box program. It simply created a data file and then called the notepad application to present the data on the screen.
This month's program will be more sophisticated in that we will use the Microsoft Foundation Classes (MFC) Document View Architecture. This allows the presentation of the startup information on the screen without having to call any external program.
The Visual C++ application generator will create a Single Document Interface (SDI) which includes a document, frame, and view elements. We will discuss how to modify these elements at meeting this Tuesday. (3rd Tuesday of the month as usual.)
SAMPLE CODE =========== for (dwIndex=0; ; ++dwIndex) { cbName = BUFFSIZE; cbData = BUFFSIZE; code2 = RegEnumValue( hKey, // handle of key to query dwIndex, // index of subkey to enumerate Name, // address of buffer for value string &cbName, // address for size of value buffer NULL, // reserved &Type, // address of buffer for type code Data, // address of buffer for value data &cbData // address for size of data buffer ); if (code2 != ERROR_SUCCESS) { if (code2 == ERROR_NO_MORE_ITEMS) // This is expected. break; else if (code2 == ERROR_ACCESS_DENIED) MessageBox( NULL, Name, "WStart ERROR_ACCESS_DENIED", MB_OK | MB_ICONINFORMATION ); else PostError(code2); break; }