| |
|
|
| |
|
|
|
| |
|
|
|
RGH | While 1 : wend is always a Endlosschleife!
but i think, You want know, How You it anstellst, that one Draw wm_Paint-cut offed not same a new wm_Paint-Message auslöst and therefore a Endlosschleife arise. For this there in the windows-API the Funktionspaar BeginPaint/EndPaint: CompileMarkSeparation $H windows.ph
declare i&,PS#
dim PS#,28
cls
subClass %hWnd,1
while 1
waitInput
wend
subClassProc
if SubClassMessage(%hWnd,15)wm_paint
~BeginPaint(%hWnd,PS#)
drawtext 20,20,Hugo was here
drawtext 50,50,str$(i&)
inc i&
~EndPaint(%hWnd,PS#)
endIf
endProc
The counter i& is there, so one sees, when neugezeichnet becomes. If you ~BeginPaint and ~EndPaint drin have, as it almost each Windowsprogramm it has, then becomes z.B. only at change the Size the Mainwindow neugezeichnet. Kommentierst You these Lines from, becomes to the first draw constantly neugezeichnet. (No fear: discontinue by the Closing-Button goes naturally nevertheless.)
BTW: If you one Program write, that WaitInput really never leave should, because You everything over The Messages regelst (sozusagen Windowsprogrammierung To foot), then can You instead of your Endlosschleife circa WaitInput simply whom yet unkommentierten new commands WAITEND using. How the name andeutet, becomes WAITEND first at End of program leave: CompileMarkSeparation $H windows.ph
declare i&,PS#
dim PS#,28
cls
subClass %hWnd,1
waitEnd
subClassProc
if SubClassMessage(%hWnd,15)wm_paint
~BeginPaint(%hWnd,PS#)
drawtext 20,20,Hugo what hier
drawtext 50,50,st$(i&)
inc i&
~EndPaint(%hWnd,PS#)
endIf
endProc
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 03/05/08 ▲ |
|
|
|
|
| The Statement is really super,
I wished but sooner hereon allude the even very not possible is. (without WS_CLIPCHILDREN)
likewise was unfortunately to ascertain the one wm_paint-by-subClassProc-intercepting not really meaningfully is there between Waitinput To Waitinput naturally (but too unfortunately) not gesubclasst becomes.
wm_paint as userMessage end in eternal Loop.
my obiges While 1 is therefore in XProfan no tatsächliche Endlosschleife because the WaitInput with not gesetztem Window Style 512 the program exits. (These Endlosschleife meant I means not, sooner The observation in the Taskmanager at testing of first obigen example with Fensterskalierung.) |
|
|
| |
|
|
|
| |
|
| |
|
|
|
RGH | |
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 03/05/08 ▲ |
|
|
|
|
RGH | RGH
... though for the time being only Interpreter. |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 03/05/08 ▲ |
|
|
|
|
| Jaja, treib me quiet into deliriousness... |
|
|
| |
|
|