Purebasic Exes on PCs with installed Windowblinds3

Share your advanced PureBasic knowledge/code with the community.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by FAKEFACTORY.

Some of you surely know the Skinning program Windowblinds3. One can argue about whether this type of Desktop-Skinning is ingenious or not, but every PB-programmers should be able to create programs, that are completly usable on PCs with installed Windowblinds3.

You will encounter some errors with handling events on PB-Exes with installed Windowblinds3 - mouse-clicks on CLOSE Button are not detected and sometimes the #WM_PAINT event is dropped.

Well, there is a small workaround to handle the Close-Buttons of windows: You must handle the #WM_CLOSE event in your callback-procedure and send a global variable to your mainloop.

Example (only the necessary parts - not fully functional):

Code: Select all

Global Terminateflag


Procedure WndProc(WindowID, Message, wParam, lParam)
   if Message = #WM_CLOSE
      Terminateflag = #TRUE  ; WM_CLOSE detected - Set Flag to TRUE
   Endif
EndProcedure


mainloop:
Repeat
   Event.l = WaitWindowEvent()
   ...blablabla...

Until Terminateflag = #TRUE


Result.l = MessageRequester("Exit", "Are you shure?,#PB_MessageRequester_YesNo)



If Result.l = #IDYES
   Gosub Cleanup           ; Last one has to close the doors
   END                     ; End the program
Else
   Terminateflag = #FLASE  ; Reset Terminateflag ...
Endif
Goto mainloop              ; ... and jump back to the mainloop

Registered PureBasic Coder

Edited by - FAKEFACTORY on 20 February 2002 01:05:12
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by MrVainSCL.
FAKEFACTORY wrote:
Some of you surely know the Skinning program Windowblinds3. One can argue about whether this type of Desktop-Skinning is ingenious or not, but every PB-programmers should be able to create programs, that are completly usable on PCs with installed Windowblinds3.
Hi FAKEFACTORY
Mhhhh... i follow your Windowblinds3 problems with PB since some time... I dont know nor use Windowblinds3 on my system and as i understand Fred correctly in one of his last posts... Its not a problem of PB... Because Windowblins is bad coded or should i say a just hacked? Also i dont think that many people have installed Windowblinds on there systems and why should Fred fix (using tricks and maybe hacks) on PureBasic to get all PB created executebales runable without any problems when running Windowblinds in background? Fred and PB are using only system commands and this is the savest way to code (no hacking like on c64 or old amiga times or maybe Windowblinds)... Just send your not working program to the author of Windowblinds and he should have a look to fix his program on his tool...

Btw. if your PB created executeable will run without probs when disable Windowblinds, its sure which program make trouble and is not systemfriendly coded


PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...

greetz
MrVainSCL! aka Thorsten
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by FAKEFACTORY.

Hi, MrVainSCL

Don't underestimate the Windowblinds-Scene. It has the largest skinning-communinity on the Windows platform.
But shure you are right. Fred DON'T need to fix anything, because the problems seems Windowblinds - related, but this wasn't my intention. I want to give some help for workaround the bugs, so we PB-programmers can't be blamed for programs, that "seems" not to function correct.
Btw.: My PB-Exes are the only applications that show this incompatibility to Windowblinds, so i guess, most Windowblinds-Users will blame my PB-Exe not Windowblinds itself.




Registered PureBasic Coder
Post Reply