/**************/ /* swhello.c */ /**************/ #include #include "simplet.h" /****************************************************************************/ LONG MyDraw(tMSGParam *msg) { TextOut(msg->hDC, 10,10, "Hello World!",12); return NULL; } /****************************************************************************/ LONG MyCreate(tMSGParam *msg) /* Aliohjelmaa kutsutaan kun ikkuna on luotu, muttei vielä näytössä. */ { SetWindowText(msg->hWnd,"Hello World for Windows"); MoveWindow(msg->hWnd,10,10,300,200,FALSE); return NULL; } /****************************************************************************/ /* Viestien käsittelytaulukko */ /****************************************************************************/ tMSGEntry MsgTbl[] = { { WM_PAINT , DoC, DoC, MyDraw , 1 }, { WM_CREATE , DoC, DoC, MyCreate , 0 }, { 0 } }; /****************************************************************************/