Page 1 of 3

Drawing on another window or above them all

Posted: Wed Nov 23, 2005 8:22 pm
by roachofdeath
Hello,

I was trying to figure out how to draw a shape above all windows, or at least just on one.

StartDrawing with DesktopOutput worked at first, but then I brought up the other windows, the shape flickered, and it needs to be solid.

This is what I had:

Code: Select all

#wMem=0
Global Mem.l
Mem = AllocateMemory(1024)
Procedure.l DesktopOutput()
  PokeL(Mem, 1)
  ProcedureReturn Mem
EndProcedure
repeat
StartDrawing(DesktopOutput())
Circle(55,55,32,RGB(255,10,5))
StopDrawing()
forever
Any ideas on how to accomplish this?[/code]

Re: Drawing on another window or above them all

Posted: Wed Nov 23, 2005 8:37 pm
by va!n
hi!
what version of PB you are using? btw, DesktopOutput() is a PB command so you cant use the same name for your procedure!

Posted: Fri Nov 25, 2005 3:46 am
by roachofdeath
Hm, lemme check....


it's 3.92

Posted: Fri Nov 25, 2005 4:22 am
by Joakim Christiansen
Why would he be using 3.92?
Maybe because that's the only pirated full version he found? (just wild guessing here, don't take it personal)
But I remember a guy in this forum also using 3.92 because he "didn't know how to update"...
Sorry if I sound very negative now, but I was only thinking out loud...

Posted: Sat Nov 26, 2005 2:19 am
by roachofdeath
No, but I think I figured it out, thanks ;) I threw in some API and it seemed to work good enough.

Posted: Sat Nov 26, 2005 3:07 am
by dagcrack
Joakim Christiansen wrote:Why would he be using 3.92?
Maybe because that's the only pirated full version he found? (just wild guessing here, don't take it personal)
But I remember a guy in this forum also using 3.92 because he "didn't know how to update"...
Sorry if I sound very negative now, but I was only thinking out loud...
Heh, you're getting closer and closer to be the most negative guy on the forum (I'm still the god on there) :wink: :lol: Keep it up! :P One day you'll be like me! (Don't you dare commit suicide) :? :D

Posted: Sat Nov 26, 2005 3:50 am
by localmotion34
Joakim Christiansen wrote:Why would he be using 3.92?
Maybe because that's the only pirated full version he found? (just wild guessing here, don't take it personal)
But I remember a guy in this forum also using 3.92 because he "didn't know how to update"...
Sorry if I sound very negative now, but I was only thinking out loud...
hey. i have 4 SEPARATE folders of PB. 3.80, 3.90, 3.93, and 3.94. i ALWAYS do a clean install of PB when updating. and i remember when maybe 3.90 came out, i was using 3.8x for a long long time because of compatibility with a very large project i was working on.

dont jump to conclusions so fast. while you guys were using 3.92, i was still using 3.8x, and a full paying customer.

Posted: Sat Nov 26, 2005 4:24 am
by roachofdeath
Hold on, it didnt work after all :( I'm still looking for a solution.

Posted: Sat Nov 26, 2005 6:33 am
by dagcrack
localmotion34 wrote:
Joakim Christiansen wrote:Why would he be using 3.92?
Maybe because that's the only pirated full version he found? (just wild guessing here, don't take it personal)
But I remember a guy in this forum also using 3.92 because he "didn't know how to update"...
Sorry if I sound very negative now, but I was only thinking out loud...
hey. i have 4 SEPARATE folders of PB. 3.80, 3.90, 3.93, and 3.94. i ALWAYS do a clean install of PB when updating. and i remember when maybe 3.90 came out, i was using 3.8x for a long long time because of compatibility with a very large project i was working on.

dont jump to conclusions so fast. while you guys were using 3.92, i was still using 3.8x, and a full paying customer.
Yup, and even sometimes you might rollback to see if one of your older projects still compiles on the version it was meant to compile on (I usually comment on my headers "pb version X.XX) so I know which I used while I was working on that project. then I check if it compiles fine on there, and do the needed changes so it compiles in the newer version (of course, having a backup of the sources previously made).

I remember.. was it on 3.8x (or close to) that exes were a little smaller? and then got a little biggie because of some aditions to the libs?

Posted: Sun Nov 27, 2005 4:48 am
by roachofdeath
Is there a way to simply draw on the window from a givin HWND?

(i'm trying to get the topic back on topic from PB versions and who's the biggest a-hole ;))

Posted: Sun Nov 27, 2005 5:07 am
by netmaestro
Why would he be using 3.92?
Maybe because that's the only pirated full version he found? (just wild guessing here, don't take it personal)
But I remember a guy in this forum also using 3.92 because he "didn't know how to update"...
Sorry if I sound very negative now, but I was only thinking out loud...
Sounds familiar. This particular user seems to mostly make dlls for gamemaker...

Posted: Sun Nov 27, 2005 5:18 am
by roachofdeath
how about no dude, i'm actually making an aimer for my friend for a FPS game, and you know very well I stopped that shinanigan, heres the source:

Code: Select all

#wMem=0
Global Mem.l
Mem = AllocateMemory(1024)

Procedure.l DesktopOutput()
  PokeL(Mem, 1)
  ProcedureReturn Mem
EndProcedure

Maus.Point

ExamineDesktops() 

tx.l = DesktopWidth(0) / 2
ty.l = DesktopHeight(0) / 2
go.l = 0
ra.l = 5
colr.l = 255
colb.l = 0
colg.l = 0

OpenWindow(0,10,10,225,120,0,"Aimer")
  CreateGadgetList(WindowID(0))
    Frame3DGadget(1, 10, 10, 100, 100, "Preview",#PB_Frame3D_Double)
    TextGadget(2,145,10,100,12,"Aimer Size")
    TrackBarGadget(3, 120, 23, 100, 16, 1, 20) : SetGadgetState(3,10)
    ButtonGadget(4,120,70,100,20,"Start")
    ButtonGadget(5,120,90,100,20,"Exit")
    ButtonGadget(6,120,50,100,20,"Color")

Repeat

  If go.l = 0
   StartDrawing(WindowOutput()) 
   Circle(60,60,ra.l,RGB(colr.l,colg.l,colb.l))
   StopDrawing()
  EndIf
  
  If go.l = 1
    ValidateRect_(WindowID(0), 0)
    StartDrawing(DesktopOutput())
    Circle(tx.l,ty.l,ra.l,RGB(colr.l,colg.l,colb.l))
    StopDrawing()
    InvalidateRect_(WindowID(0), 0, 0)
  EndIf
  
  Select WaitWindowEvent()
  Case #PB_EventCloseWindow : InvalidateRect_(WindowID(0), 0, 0) : End
  Case #PB_EventGadget
    Select EventGadgetID()
      Case 3
        If go.l = 0
        ra.l = GetGadgetState(3)
        InvalidateRect_(WindowID(0), 0, 0)
        EndIf
      Case 5
        End
      Case 4
        go.l = 1
      Case 6
        Color = ColorRequester()
          colr.l = Red(Color)
          colb.l = Blue(Color)
          colg.l = Green(Color)
        InvalidateRect_(WindowID(0), 0, 1)
    EndSelect
  EndSelect
ForEver

so ha, stick that up your ass

Posted: Sun Nov 27, 2005 3:32 pm
by netmaestro
so ha, stick that up your ass
Well, that's going a bit far. I would have left it there but this level of rudeness isn't tolerated on this forum. As I said, I didn't hear you assert that you are a registered user of PB, so I'm sending an email to Fred quoting what you just said and identifying you as a possible user of a pirated version of PureBasic. If you're indeed paid up, all you have to worry about is getting banned for rudeness, if not...[/quote]

Posted: Sun Nov 27, 2005 5:10 pm
by Trond
netmaestro wrote:
so ha, stick that up your ass
Well, that's going a bit far. I would have left it there but this level of rudeness isn't tolerated on this forum. As I said, I didn't hear you assert that you are a registered user of PB, so I'm sending an email to Fred quoting what you just said and identifying you as a possible user of a pirated version of PureBasic. If you're indeed paid up, all you have to worry about is getting banned for rudeness, if not...
Follow his advice. For your information: I have never heard that you asserted that you are a registred user either, does that mean that you aren't? And I don't like that you are, without the faintest slice of proof, accusing someone of stealing values for 69 dollars. I'll email Fred about that.

Posted: Sun Nov 27, 2005 6:16 pm
by roachofdeath
Well, i'm not getting an answer, but i'm also leaving this forum anyways -- all i do is get harrassed. Anyways, i'm going to be gone for like 8 months because I got my computer and internet privilages taken away.

Bye