Professional Documents
Culture Documents
h>
#include <iostream>
#include <conio.h>
class _Notepad
{
public:
_Notepad()
{
ZeroMemory( &Buffer, sizeof( Buffer ) );
pt.x = 1;
pt.y = 1;
}
void GetUserString();
void SendToChild();
private:
HWND nphWnd;
POINT pt;
char Buffer[ 1024 ];
};
void _Notepad::GetUserString()
{
while( 1 )
{
ClearScreen();
if ( strlen( Buffer ) )
break;
cout << "\nYou have entered a empty reply, please try again..." << endl;
Sleep( 3000 );
}
SendToChild();
}
void _Notepad::SendToChild()
{
ShowWindow( nphWnd, SW_HIDE );
ShowWindow( nphWnd, SW_RESTORE );
ShowWindow( nphWnd, SW_HIDE );
void main()
{
_Notepad np;
np.GetUserString();
printf( "Complete..." );
getch();
}