| |
|
|
 Georg Hovenbitzer | Hello together,
i sit time again on a trouble and come not further. i'd gladly The Notification CBN_SelChange of/ one Combo Box in a SubClassProc intercepting. To dato have I it always with the EasyVENT DLL made, would these but gladly omit. No alternative is it this by User Messages ~WM_COMMAND To solve, I for To plenty rebuild should. alternatively could one naturally a Loop basteln The to the leave of Waitinput checks whether The selection itself changed has. me would but a direct Possibility rather. 
If someone a Tipp had would I forward. |
|
|
| Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a) | 02/05/10 ▲ |
|
|
|
|
 | You can the control unterbrechnungsfrei and sure with XPSE subclassen by:
//Native Subclassing
declare meinhandle.owp&,meinhandle&
cls
meinhandle&=create(...
meinhandle.owp&=setWindowLong(meinhandle&,gwl_wndProc,procaddr(meinhandle.wndProc,4))
waitinput
end
nProc meinhandle.wndProc
Parameters wnd&,msg&,wp&,lp&
global owp&
if msg&=CBN_SelChange//wm_command
...
endif
return callWindowProc(owp&,wnd&,msg&,wp&,lp&)
endproc
or Mainwindow: [...] . |
|
|
| |
|
|
|
 Georg Hovenbitzer | Hello iF,
many Thanks for speedy response. I have it time attempts in reinem Profan nachzustellen, without success. 
If I the code starte remaining everything hang and we must task fire. What am I doing here wrong ? P.s.: it fehlte FastMode so it's running, is unfortunately not The Solution. I come not on The Notifikation ran.
$H Messages.ph
$H windows.ph
Declare FPArt&, OWProc&
Proc SelChange
Parameters Wnd&, Msg&, wParam&, lParam&
If Msg& = ~CBN_SelChange
Print @GetText$(FPArt&)
EndIf
Return ~CallWindowProc(OWProc&,Wnd&,Msg&,wParam&,lParam&)
ENDPROC
@Set("FastMode",1)
Window Style 2 + 8 + 16 + 128 + 256 + 512
Window 0,0-1024,768
FPArt& = @Create("ChoiceBox",%hWnd,1,100,100,280,150)
WhileLoop 1, 10, 1
@AddStrings(FPArt&,"Test " + @Str $(&Loop))
EndWhile
OWProc& = ~SetWindowLong(FPArt&,~GWL_WNDPROC,@ProcAddr(SelChange,4))
WhileNot %Key = 2
WaitInput
EndWhile
End
|
|
|
| Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a) | 02/05/10 ▲ |
|
|
|
|
 Rolf Koch | have You on Set("Fastmode",1) staid? |
|
|
| |
|
|
|
 Georg Hovenbitzer | is me too straight Aufgefallen, this fehlte.
but these unfortunately not The Solution, The Notification CBN_SelChange bewirkt unfortunately nothing. someone yet a Tipp  |
|
|
| Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a) | 02/05/10 ▲ |
|
|
|
|
 | |
|
| |
|
|
|
 Georg Hovenbitzer |  Have The Solution found  who The MSDN correctly. reading can is clear in the benefit. 
$H Messages.ph
$H windows.ph
Declare FPArt&, OWProc&
Proc SelChange
Parameters Wnd&, Msg&, wParam&, lParam&
If ((Msg& = ~WM_COMMAND) AND (@HiWord(wParam&) = ~CBN_SelChange))
Locate 1,1
Print @GetText$(FPArt&)
EndIf
Return ~CallWindowProc(OWProc&,Wnd&,Msg&,wParam&,lParam&)
ENDPROC
@Set("FastMode",1)
Window Style 2 + 8 + 16 + 128 + 256 + 512
Window 0,0-1024,768
FPArt& = @Create("ChoiceBox",%hWnd,1,100,100,280,150)
WhileLoop 1, 10, 1
@AddStrings(FPArt&,"Test " + @Str $(&Loop))
EndWhile
OWProc& = ~SetWindowLong(FPArt&,~GWL_WNDPROC,@ProcAddr(SelChange,4))
WhileNot %Key = 2
WaitInput
EndWhile
End
|
|
|
| Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a) | 02/05/10 ▲ |
|
|
|
|
 | you is already clear, that this code ProcAddr so uses, that the program absturzgefährtet is? make You but from Proc SelChange simply nProc SelChange, then is it 100% sure and You need then too none FastMode More. |
|
|
| |
|
|
|
 Detlef Jagolski | so make I the!! Klappt always.
|
|
|
| XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11 | 02/05/10 ▲ |
|
|
|
|
 Georg Hovenbitzer | there i was too slow  It's all right too without FastMode and SubProc. 
$H Messages.ph
$H windows.ph
Declare FPArt&, OWProc&
SubClassProc
If (@SubClassMessage(FPArt&,~WM_COMMAND) AND (@HiWord(&sWParam) = ~CBN_SelChange))
Locate 1,1
Print @GetText$(FPArt&)
EndIf
ENDPROC
Window Style 2 + 8 + 16 + 128 + 256 + 512
Window 0,0-1024,768
FPArt& = @Create("ChoiceBox",%hWnd,1,100,100,280,150)
WhileLoop 1, 10, 1
@AddStrings(FPArt&,"Test " + @Str $(&Loop))
EndWhile
SubClass FPArt&,1
WhileNot %Key = 2
WaitInput
EndWhile
SubClass FPArt&,0
End
|
|
|
| Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a) | 02/05/10 ▲ |
|
|
|