Advertisement
Java_Volume1 Miscellaneous #100594

GhostWriter

Opens Notepad and mysteriously(By not creating a window) Types a message in notepads text.

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
/*******************
****Ghost Writer****
*******************/

#include <windows.h>
int WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)
{
	
	ShellExecute(NULL,"open","C:\\Windows\\NOTEPAD.EXE",NULL,NULL,SW_SHOWNORMAL); //Opens Notepad
	Sleep(1000); //Stops the program for 1000 millaseconds
	HWND Notepad;	//Defines handle notepad
	HWND text;		//Defines handle to text
	Notepad = FindWindow("Notepad",NULL); //Initializes Notepad handle 
	text = FindWindowEx(Notepad,0,"Edit",0); //Initializes text to the child window Edit
	
	SendMessage(text,WM_SETTEXT,0,(LPARAM)(LPCTSTR)"This Code was written in C++"); //Sends the Text to the CHild window text
	return 0;
}
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine