Restored from previous forum. Originally posted by CoderLaureate.
 
Is #PB_ProcessPureBasicEvents a constant or a function?
-Jim
---------------------------------------------
AMD Duron 950Mhz/Windows XP Pro
http://www.BlueFireStudios.com
			
			
									
									
						#PB_ProcessPureBasicEvents
- 
				BackupUser
- PureBasic Guru 
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by freak.
well it has a '#' in front, so guess what -> a constant!
If you return this Value from a WindowCallback procedure, PB will process the standart Events afterwards, if you return something else (for example 0), then this value is directly return to who sent the Windows Message.
Timo
			
			
									
									
						well it has a '#' in front, so guess what -> a constant!
If you return this Value from a WindowCallback procedure, PB will process the standart Events afterwards, if you return something else (for example 0), then this value is directly return to who sent the Windows Message.
Timo
- 
				BackupUser
- PureBasic Guru 
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by CoderLaureate.
So it's a constant.
But pure basic behaves differently based up how it's used then right?
-Jim
---------------------------------------------
AMD Duron 950Mhz/Windows XP Pro
http://www.BlueFireStudios.com
			
			
									
									
						So it's a constant.
But pure basic behaves differently based up how it's used then right?
-Jim
---------------------------------------------
AMD Duron 950Mhz/Windows XP Pro
http://www.BlueFireStudios.com
- 
				BackupUser
- PureBasic Guru 
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by freak.
 
That is the way it is to be used in a WindowCallback.
All those Windows messages, you Window gets expect a return value (well, sometimesit doesn't matter what is returned).
If you set up a WindowCallback procedure, and return #PB_ProcessPureBasicEvents from it, then PB will do its own handling for Events afterwards, and choose the Value it will return to Windows.
If you want to avoid that, you can return something different, and that will be returned to Windows then.
If you don't return #PB_ProcessPureBAsicEvents, PB will also not do its own Event handling for this specific Event, which means, it will ignore it.
Hope this made things clear...
Timo
			
			
									
									
						Code: Select all
  Procedure MyWindowCallback(WindowID, Message, wParam, lParam) 
    Result = #PB_ProcessPureBasicEvents 
    ; 
    ; you code here 
    ; 
    ProcedureReturn Result 
  EndProcedure 
All those Windows messages, you Window gets expect a return value (well, sometimesit doesn't matter what is returned).
If you set up a WindowCallback procedure, and return #PB_ProcessPureBasicEvents from it, then PB will do its own handling for Events afterwards, and choose the Value it will return to Windows.
If you want to avoid that, you can return something different, and that will be returned to Windows then.
If you don't return #PB_ProcessPureBAsicEvents, PB will also not do its own Event handling for this specific Event, which means, it will ignore it.
Hope this made things clear...
Timo
- 
				BackupUser
- PureBasic Guru 
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by CoderLaureate.
Crystal Clear.
Thanks.
-Jim
---------------------------------------------
AMD Duron 950Mhz/Windows XP Pro
http://www.BlueFireStudios.com
			
			
									
									
						Crystal Clear.
Thanks.
-Jim
---------------------------------------------
AMD Duron 950Mhz/Windows XP Pro
http://www.BlueFireStudios.com