Kornalius,
Im using the onboard editor, running on an IPAQ 1940.
1. When I compile from the menu, it seems to compile the last saved version of the file rather than the contents of the editing window. Maybe it should prompt you to save again so that you are always compiling your newest work regardless of whether you have saved it or not.
2. If I compile and then run, the program does not run. I get a blank window and which I have to close to return to the editor. If I choose run again, it does run. This happens also if I start with run instead of compile, I have to run it twice to get it to run.
3. I have some code that draws pixels on an image object. (Thanks for the tips on that btw
) Before the routine runs I use showmessage to say hello. You click OK to close the message window and then the pixels are drawn. When the loop finishes, a blank rectangle appears where the showmessage was. Maybe it's my lack of understanding of the windows event system, but I thought that after Ok was pressed on the message, it no longer existed. So how come it still has an effect on the pixel area? It's like something is out of synch... Is it the image object redrawing the part of itself that had the message over it? If so, why didn't this occur immediatley before the pixels were drawn?
Code below...
Im using the onboard editor, running on an IPAQ 1940.
1. When I compile from the menu, it seems to compile the last saved version of the file rather than the contents of the editing window. Maybe it should prompt you to save again so that you are always compiling your newest work regardless of whether you have saved it or not.
2. If I compile and then run, the program does not run. I get a blank window and which I have to close to return to the editor. If I choose run again, it does run. This happens also if I start with run instead of compile, I have to run it twice to get it to run.
3. I have some code that draws pixels on an image object. (Thanks for the tips on that btw
Code below...
- Code:
#include "windows.ppl"
proc paint
local(x$,y$,dc$,a$);
global(c$);
showmessage("paint");
dc$=GetDC(BITMAP101$);
x$=50;
y$=50;
Repeat
Repeat
a$=SetPixel(dc$, x$, y$, c$);
x$++;
c$++;
Until(x$==200);
x$=0;
y$++;
Until(y$==200);
end;
#code {Main.frm#FORM100}
func FORM100Proc (hWnd$, Msg$, wParam$, lParam$)
ok$ = true;
case(Msg$)
WM_COMMAND:
wmId$ = LOWORD(wParam$);
wmEvent$ = HIWORD(wParam$);
case(wmId$)
1001: // Exit
PostMessage(hWnd$, WM_CLOSE, 0, 0);
return(false);
102:
paint;
end;
end;
return (ok$);
end;
#code {Main.frm}
func WinMain
Global(FORM100$, BITMAP101$, BUTTON102$, BUTTON103$, m1000$);
FORM100$ = NewForm("FORM100", "PPLForm", &FORM100Proc;);
BITMAP101$ = NewControl(101, "STATIC", NULL, "BITMAP101", WS_VISIBLE|SS_BITMAP, FORM100$, 8, 8, 224, 216);
BUTTON102$ = NewControl(102, "BUTTON", NULL, "Generate", WS_TABSTOP|WS_VISIBLE, FORM100$, 8, 232, 64, 24);
BUTTON103$ = NewControl(103, "BUTTON", NULL, "Save...", WS_TABSTOP|WS_VISIBLE, FORM100$, 168, 232, 64, 24);
m1000$ = NewMenu(FORM100$, "File", 1000);
NewMenuItem(m1000$, -1, "Exit", 1001);
ShowWindow(FORM100$, SW_SHOW);
#code {Main.frm#WinMain}
return (true);
end;