I continue to learn and have managed to answer/resolve my previous questions PLUS I figured out how to use the Windows clipboard (easier than I thought it would be, actually).
Right now I'm wrestling with figuring out a way to change the background color on my dialog box and am going nowhere rapidly. I'll continue searching in my 'spare' time but was wondering if a guru here could point out what I'm doing wrong in the code fragment below ...
/****************************************************************************
* *
* Function: WinMain *
* *
* Purpose : Initialize the application. Register a window class, *
* create and display the main window and enter the *
* message loop. *
* *
* History : Date Reason *
* 00/00/00 Created *
* *
****************************************************************************/
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
INITCOMMONCONTROLSEX icc;
WNDCLASSEX wcx;
ghInstance = hInstance;
HBRUSH mybrush = CreateSolidBrush((COLORREF) RGB (255,255,255) );
/* Initialize common controls. Also needed for MANIFEST's */
icc.dwSize = sizeof(icc);
icc.dwICC = ICC_WIN95_CLASSES /*|ICC_COOL_CLASSES|ICC_DATE_CLASSES|ICC_PAGESCROLLER_CLASS|ICC_USEREX_CLASSES|... */;
InitCommonControlsEx(&icc);
/* Get system dialog information */
wcx.cbSize = sizeof(wcx);
if (!GetClassInfoEx(NULL, MAKEINTRESOURCE(32770), &wcx))
return 0;
/* Add our own stuff */
wcx.hInstance = hInstance;
wcx.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDR_ICO_MAIN));
wcx.lpszClassName = _T("win1Class");
wcx.hbrBackground = mybrush;
if (!RegisterClassEx(&wcx))
return 0;
/* The user interface is a modal dialog box */
return DialogBox(hInstance, MAKEINTRESOURCE(DLG_MAIN), NULL, (DLGPROC)MainDlgProc);
}
Any hints appreciated - again I learn best by being pointed toward the answer and then left to figure it out on my own.
Tnx in advance.
Tom