Forum | | | |  Alfred Wagner | Hello people
first time the code CompileMarkSeparation $P+
SET(ERRORLEVEL,0)
DEF GETSYSCOLOR(1) !USER32,GetSysColor
DECLARE ENDE%,BUTTON1&,CB1&,CB2&,CB3&
WINDOWSTYLE 63
WINDOWTITLE Neues Fenster
WINDOW 22,20-550,250
SET(TRUECOLOR,1)
CLS GETSYSCOLOR(1)
USEFONT MS Sans Serif,13,0,0,0,0
SETDIALOGFONT 1
BUTTON1& = CREATE(BUTTON,%HWND,Ende,400,190,70,22)
CB1& = CREATE(CHECKBOX,%HWND,Test Checkbox_1,20,60,200,15)
CB2& = CREATE(CHECKBOX,%HWND,Test Checkbox_2,50,80,300,15)
CB3& = CREATE(CHECKBOX,%HWND,Test Checkbox_3,230,60,200,15)
Hauptschleife
SETFOCUS(%HWND)
WHILENOT ENDE%
WAITINPUT
Erster Wert ( hier 20 ) + länge der Checkbox = dritter Wert
aber woher kommt der vierte Wert ? ( hier 70 )
If mouse(20,60,220,70)
If @IsKey(2)
Sleep 100
@MessageBox(Checkbox_1 Meldung,Meldung,16)
EndIf
Endif
Erster Wert ( hier 50 ) + länge der Checkbox = dritter Wert
aber woher kommt der vierte Wert ? ( hier 90 )
If mouse(50,80,350,90)
If @IsKey(2)
Sleep 100
@MessageBox(Checkbox_2 Meldung,Meldung,16)
EndIf
Endif
Erster Wert ( hier 230 ) + länge der Checkbox = dritter Wert
aber woher kommt der vierte Wert ? ( hier wiederum 70 )
If mouse(230,60,430,70)
If @IsKey(2)
Sleep 100
@MessageBox(Checkbox_3 Meldung,Meldung,16)
EndIf
Endif
If %KEY=2
ENDE%= 1
ELSEIF %KEY=4
ELSEIF GETFOCUS(BUTTON1&)
Ende%=1
ELSEIF GETFOCUS(CB1&)
ELSEIF GETFOCUS(CB2&)
ELSEIF GETFOCUS(CB3&)
ENDIF class=s4 href='./../../funcion-referencias/XProfan/endwhile/'>ENDWHILE
now my question moreover ? where comes with whom 3 Check boxes each the fourth worth since ? The code functions of course correct ,but with the the fourth worth can me no silence .i want zugerne know where this who herkommt.If I what other einsetze functions the whole not any more,as it should.
Übrigen the example can itself wonderful as Kontexthilfe rebuild.
white someone of you How itself the fourth worth ergiebt ? or is about one Error for may part in the game.
Regards Alfred with family |
| | | | |
| |  | well the fourth worth ought to always the second worth plus (with you 15) the level the Controls his. I find your Source but very - very UnXProfan10nisch.  |
| | | | |
| |  Jörg Sellmeyer | The fourth values is z. B. in the first drop not 70 separate 75. namely Oberkante the Checkbox + Höhe = Unterkante (60 + 15 = 75) can You slight testing, because You before You what änderst your Program walk can and times in the downstairs Pixelbereich of/ one Checkbox click. there happens nothing, because 5 Pixel are missing. Greeting Jörg
[offtopic]well, there was the iF again faster...[/offtopic] |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 05/31/07 ▲ |
| |
| |  Alfred Wagner | I see now Have ichs thanks you both
incidentally IF what Dou you mean with - very UnXProfan10nisch. |
| | | | |
| |  | | | | | |
| |  Alfred Wagner | I see thanks for resolution only with the whom
mouse instead of usermessages , if-Verschachtelung instead of select , declare instead of var ,
bekäme I so on attempt not baked
question moreover : had the too advantages for the Program,whom Yes which ? |
| | | | |
| |  | faster, stabiler, übersichtlicher. 
look time so should your code looks: CompileMarkSeparationdef getsyscolor(1) !user32,GetSysColor
set(errorlevel,0)
set(truecolor,1)
windowstyle 63
windowtitle neues fenster
window 22,20-550,250
cls getsyscolor(1) warum syscolor 1? msdn2.microsoft.com/en-us/library/ms724371.aspx
var myfont&=create(font,MS Sans Serif,10,0,0,0,0)
var button1& = create(button,%hwnd,ende,400,190,70,22)
var cb1& = create(checkbox,%hwnd,test checkbox_1,20,60,200,15)
var cb2& = create(checkbox,%hwnd,test checkbox_2,50,80,300,15)
var cb3& = create(checkbox,%hwnd,test checkbox_3,230,60,200,15)
setfont button1&,myfont&
setfont cb1&,myfont&
setfont cb2&,myfont&
setfont cb3&,myfont&
setfocus(%hwnd)
usermessages 123 WM_CONTEXTMENU = { $7B | 123 }
while 1
waitinput
select %key
caseof 2
break
caseof 4
nix?
endselect
select %umessage
caseof 123
select &uwparam
caseof cb1&
messagebox checkbox1,,0
caseof cb2&
messagebox checkbox2,,0
caseof cb3&
messagebox checkbox3,,0
endselect
endselect
case clicked(button1&) : break
endwhile
deleteobject myfont&
href='./../../funcion-referencias/XProfan/end/'>end
And if You XPSE benefit would would have You too yet following advantages because your code could so looks: CompileMarkSeparation {$cleq}
set(errorlevel,0)
set(truecolor,1)
windowstyle 63
windowtitle new window
window 22,20-550,250
cls getsyscolor(1)
long myfont=create(font,MS Sans Serif,10,0,0,0,0)
long button1 = create(button,hwnd,end,400,190,70,22)
long cb1 = create(checkbox,hwnd,Test checkbox_1,20,60,200,15)
long cb2 = create(checkbox,hwnd,Test checkbox_2,50,80,300,15)
long cb3 = create(checkbox,hwnd,Test checkbox_3,230,60,200,15)
setfont button1,myfont
setfont cb1,myfont
setfont cb2,myfont
setfont cb3,myfont
setfocus(hwnd)
usermessages WM_CONTEXTMENU
while 1
waitinput
select key
caseof 2
break
caseof 4
nothing?
endselect
select umessage
caseof WM_CONTEXTMENU
select uwparam
caseof cb1
messagebox checkbox1,,0
caseof cb2
messagebox checkbox2,,0
caseof cb3
messagebox checkbox3,,0
endselect
endselect
case clicked(button1) : break
endwhile
deleteobject myfont
end
 |
| | | | |
| |  | @Alfred: Page Site is down. [...] look you time the Free Communityangebot on [...] I find this is me very been successful.  |
| | | | |
| |  Alfred Wagner | oh thanks If
with the the Page Have I none known ,must time look what there go is
Nachtrag
cls getsyscolor(1) Why syscolor 1?
so I rather understand could ex where The Meldefenster reacted |
| | | | |
|
AnswerThemeninformationenthis Topic has 3 subscriber: |