Page 2 of 2

Posted: Sat Apr 06, 2002 2:40 am
by BackupUser
Restored from previous forum. Originally posted by Franco.
I used the same order before and it worked fine.
Dont think this has changed with 3.0 !?

Hi Danilo,

the PureBasic Help says under History for Version 3:

Code: Select all

  
- Changed: Internally, procedures parameters are now pushed in the right order. 
 Warning, all the callback must be changed to reflect this. 
  
And in this way worked the callback procedure on the 28. of February (the date that I posted the original code)


So if your similar code worked 'normal' on February 28. than you HAD ALREADY Version 3 a month ago and told us nothing!!!


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Edited by - franco on 06 April 2002 03:44:17

Posted: Sat Apr 06, 2002 12:13 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.

I think it was v2.90 which i used to test
some Toolbar stuff (its been a while).
I used SetWindowCallback() and the order
of arguments in my Callback procedure
is the same you use now - and it worked fine.

Anyway, lets forget this.
It works, thats the important thing...

cya,
...Danilo

(registered PureBasic user)

Posted: Sat Apr 06, 2002 5:02 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.

YES


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Posted: Thu Apr 11, 2002 5:48 am
by BackupUser
Restored from previous forum. Originally posted by Steve.


A couple of points on the above code.

Iam pretty sure that if you use your own win proc
you have to reply to the WM_DESTROY message, if
the user exits, then windows cleans up properly.

eg.
elseif Msg = #WM_CLOSE

reply = MessageBox_(hWnd, "Please confirm exit", "Exit", #MB_YESNO | #MB_ICONQUESTION)

if reply = #IDNO
ProcedureReturn 0
endif

elseif Msg = #WM_DESTROY

PostQuitMessage_(0)
ProcedureReturn 0

endif

Also something a bit odd, if you use windows defines
in CreateWindowEx instead of pb's, your exe is about
1.5 kb shorter.

eg. #WC_OVERLAPPEDWINDOW instead of

#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget etc.

And much thanks Fred for the new statements Declare
and Elseif

Steve