QuickSnap : Released Oct 12, 2006

Developed or developing a new product in PureBasic? Tell the world about it.
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

Go figure? I can see the camera icon is generated in the data of the source, but I couldn't get it to run.
So I used a program to extract the icon from the exe file in the zip and saved as camera.ico. Now it runs.
I'm confused as to why the source part won't work for me.
PS, using PB4.3
User avatar
idle
Always Here
Always Here
Posts: 5903
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Post by idle »

un check use icon in the compiler options.
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

Thanks idle, your right.
I forgot all about that check, :oops: and was looking for it in the code at the end.
Thanks for taking the time to help me out.
User avatar
Michael Vogel
Addict
Addict
Posts: 2807
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Post by Michael Vogel »

Hmm,
interesting, that the quick help of the PB4.3 shows wrong parameters for PtInRect_() and WindowFromPoint_() in the status line.
Took some seconds for me, to recognize, that a the coordinates have to be used as a point structure...

Code: Select all

	xy.point
	With xy
		\x=DesktopMouseX()
		\y=DesktopMouseY()
		If \x<=Width-216
			winx=\x+16
		Else
			winx=\x-216
		EndIf
		If \y<=Height-48
			winy=\y+16
		Else
			winy=\y-32
		EndIf
		ResizeWindow(#wWindowMode,winx,winy,#PB_Ignore,#PB_Ignore)
		w=WindowFromPoint_(@xy)
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Fred recommends:

Code: Select all

GetCursorPos_(@cp.POINT)
w = WindowFromPoint_(cp\x|(cp\y<<32))
I have a set of macros that I compile and keep in PureBasic\Residents, this is one of them:

Code: Select all

Macro MAKEPT(x,y)
  x | (y<<32)
EndMacro
So I've been using

Code: Select all

WindowFromPoint_( MAKEPT(cp\x, cp\y) ) 
in my work.
BERESHEIT
Post Reply