The GetClassName function retrieves the name of the class to which the specified window belongs. int GetClassName( HWND hWnd, // handle of window LPTSTR lpClassName, // address of buffer for class name int nMaxCount // size of buffer, in characters );
GetClassName(hWnd, szEdit);
if (stricmp(szEdit, "EDIT") == 0)
char szEdit[MAX_PATH];
GetClassName(hWnd, szEdit, MAX_PATH);
if (stricmp(szEdit, "EDIT") == 0)
HWND hWnd, // handle of window
LPTSTR lpClassName, // address of buffer for class name
int nMaxCount // size of buffer, in characters
);
{
AfxMessageBox("error"!);
return;
}if( strcmp(szType, "Edit") == 0 )
{
....
}