Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

AHK Window Info 1.7


  • Please log in to reply
82 replies to this topic
guest3456
  • Members
  • 1704 posts
  • Last active: Nov 19 2015 11:58 AM
  • Joined: 10 Mar 2011

altho the OS probably won't let you delete the DC internally since i highly doubt you can delete DC's from other processes

Why not? You can delete bitmaps and icons from other processes, and those are also GDI objects.


huh i wouldve never thought they would let you do that. but how come when i do DeleteDC after GetDC, i can still see all the gfx of the window?


also,
ive made a quick change to the script. i added a window client rect size edit box since i use that sometimes

for 120dpi, it seems all that Uberi changed was to use fontsize 6 for the gui. so i did that also for the advanced options.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

but how come when i do DeleteDC after GetDC, i can still see all the gfx of the window?

A rough analogy:

You use a DC to paint onto a window like you use a brush to paint onto a canvas.

When you want to begin painting, you ask for a brush - the OS gives you one. Depending on the class style of the canvas, the brush might be:

[*:3atretyr]A common brush: one that anyone can pick up and use to paint on any canvas. When you're done with it, give it back to the OS (ReleaseDC) so that it can be cleaned and prepared for the next artist. Destroying (DeleteDC) a common brush is wasteful, and might get you in trouble. It doesn't belong to you. However, even if you do it, the OS is forgiving enough to give you another brush next time.


[*:3atretyr]A private brush: only for use with that canvas. In fact, it's tethered to the canvas so you don't even need to give it back to the OS (ReleaseDC) when you're done. However, since the brush won't be cleaned, the next time someone picks it up it might still have your paint on it.


[*:3atretyr]A class brush: these are deprecated, but I think they're like private brushes.
I think in practice, you'll generally get a common brush.

Even if you destroy the brush (DeleteDC), the canvas and paint are still there.

Btw, when MSDN says that you must not do something, don't do it.

An application must not delete a DC whose handle was obtained by calling the GetDC function.



acewp
  • Members
  • 13 posts
  • Last active: Oct 17 2014 06:23 AM
  • Joined: 28 Aug 2012

Excellent program. Thanks



davidsushi
  • Members
  • 10 posts
  • Last active: Oct 25 2014 08:07 PM
  • Joined: 02 Jun 2014

I am having trouble accessing the script, when I click the link i'm just brought to a blank page and the dropbox link is down too, anyone know where to access it?

 

Thanks,

David



Skrell
  • Members
  • 384 posts
  • Last active: Jul 07 2016 05:03 PM
  • Joined: 23 Aug 2011

@davidshushi, i am too.  Also i can't see any of the screenshots??  Can someone please fix this bc this looks like a very cool script!



Ripture
  • Members
  • 17 posts
  • Last active: Jun 07 2014 07:23 AM
  • Joined: 19 Aug 2013

Agree.  Would really like a mirror or something for the script.  I used to have it but lost it. :(



lblb
  • Members
  • 120 posts
  • Last active: Dec 02 2015 08:05 AM
  • Joined: 22 May 2012
Spoiler


hunter99
  • Members
  • 26 posts
  • Last active: Apr 24 2016 01:26 PM
  • Joined: 17 Sep 2013

Hi lblb:
   Still pulling rabbits out of the hat? Is there anything you are not on top of?
Hope all is well with you, good seeing you are still around.

        hunter