1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#include <windows.h>
#include <richedit.h>
HWND main, re;
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPInst, char* line, int show)
{
WNDCLASS wc = {CS_VREDRAW|CS_HREDRAW,(WNDPROC)DefWindowProc,0,0,hInstance,LoadIcon(hInstance,MAKEINTRESOURCE(IDI_APPLICATION)),
LoadCursor(hInstance,MAKEINTRESOURCE(IDC_ARROW)),GetSysColorBrush(COLOR_WINDOW),0,"wndclass"};
RegisterClass(&wc);
main=CreateWindowA("wndclass","title",WS_OVERLAPPEDWINDOW,64,64,640,480,0,0,hInstance,0);
re=CreateWindow("RICHEDIT50W","text",WS_CHILD,10,10,300,300,main,0,hInstance,0);
ShowWindow(re,show);
ShowWindow(main,show);
MSG Msg={0};
while (GetMessageA(&Msg,0,0,0))
{
TranslateMessage(&Msg);
DispatchMessageA(&Msg);
}
return 0;
}
|