 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Lexikos
Joined: 17 Oct 2006 Posts: 4469 Location: Qld, Australia
|
Posted: Sun Feb 08, 2009 10:20 pm Post subject: |
|
|
| If I knew, I would've posted already. |
|
| Back to top |
|
 |
Nicklea Guest
|
Posted: Mon Feb 09, 2009 2:35 pm Post subject: |
|
|
I appreciate your courtesy anyhow.
@Everyone
So far, I have been looking into Colour Matrix to meet my goals, however that may or may not be right. Hopefully it is. Hopefully there is a solution. I am dreading having to re-purpose thousands of color object shapes, and trying to come up with a automated 'colour overlay'. ... so I can make a Red/Green/Blue become totally Blue, or a Rainbow become just Green, by transforming pixels
I'd be looking forward to seeing what Tic comes up with in his magic labs! [color]Thanks![/color] |
|
| Back to top |
|
 |
Smurth
Joined: 13 Dec 2006 Posts: 104
|
Posted: Thu Feb 12, 2009 4:44 am Post subject: |
|
|
| Does anybody know how to get a copy of the desktop window, without all the opened windows; in fact, just the wallpaper ? |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Feb 18, 2009 5:39 pm Post subject: |
|
|
| Smurth wrote: | | Does anybody know how to get a copy of the desktop window, without all the opened windows; in fact, just the wallpaper ? | and the icons? |
|
| Back to top |
|
 |
tic
Joined: 22 Apr 2007 Posts: 1458
|
Posted: Mon Feb 23, 2009 7:44 pm Post subject: |
|
|
Sorry all......I will get round to doing everything shortly.....busy with life/work  |
|
| Back to top |
|
 |
Krogdor
Joined: 18 Apr 2008 Posts: 1381 Location: The Interwebs
|
Posted: Sun Mar 01, 2009 6:15 am Post subject: |
|
|
I was wondering how it would be possible to load a specific icon from a .ico file using Gdip, instead of loading the first image in the file? It's a bit inconvenient to be only able to see the first (and generally smallest) image!
I tried searching MSDN, but the Gdip API seems very limited...
| Smurth wrote: | | Does anybody know how to get a copy of the desktop window, without all the opened windows; in fact, just the wallpaper ? |
Look in the registry; I believe the current wallpaper is located in the HKCU root key, Subkey Control Panel\Desktop, either the OriginalWallpaper or the Wallpaper value... |
|
| Back to top |
|
 |
Smurth
Joined: 13 Dec 2006 Posts: 104
|
Posted: Sun Mar 01, 2009 8:25 pm Post subject: |
|
|
| Krogdor wrote: | | I believe the current wallpaper is located in the HKCU root key, Subkey Control Panel\Desktop, either the OriginalWallpaper or the Wallpaper value... |
Yes, I know that
I'd prefer take the wallpaper directly from memory. I can do this with gdi but I'm not able to reproduce it with gdi+  |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 4469 Location: Qld, Australia
|
Posted: Sun Mar 08, 2009 5:59 am Post subject: |
|
|
tic, I've found another flat API function which may be useful enough to add to gdip.ahk:
| Code: | GpStatus WINGDIPAPI
GdipImageRotateFlip(GpImage *image, RotateFlipType rfType);
| Corresponds to Image::RotateFlip. |
|
| Back to top |
|
 |
dominique dutoit
Joined: 20 Feb 2009 Posts: 12 Location: France
|
Posted: Mon Mar 09, 2009 8:30 pm Post subject: Gdip and ie4AHK |
|
|
Hello,
I think about include the main window of IE4AHK (not the menu, not the tool bar, not the status, only the included content: a web page with its viewer) into Gdip.ahk form , for instance the form#10 of the tutorial.
Is it possible? Is somebody tried to do it in order to design a personal nice browser, without standard window. Something more "graphic".
Elsewhere, is it possible to program the resizing of the window example #10?
I will be very very happy if somebody has these two programs.
Thank for your reply.
Dominique _________________ dominique
www.sensagent.com |
|
| Back to top |
|
 |
Nicklea Guest
|
Posted: Wed Mar 11, 2009 4:24 pm Post subject: |
|
|
Hi! Has anyone been able to figure out how to do the colour overlay thing? It seems logical the colour matrix described by Tic is the way to go (maybe not)...but I have tried many combinations of the function. I think I am doing it wrong! I can't get the function to do anything. I don't know why...
Just to re-cap the vision I am hoping for: Re-draw bitmaps into one solid color I specify, while preserving transparency levels. Meaning, basically the complexity of a image is irrelevant. I just want to turn each pixel in a image into a flat single color.  |
|
| Back to top |
|
 |
TheGood
Joined: 30 Jul 2007 Posts: 399
|
Posted: Tue Mar 24, 2009 12:12 am Post subject: |
|
|
tic, I'm currently developing a little app that will use your functions.
I just wanted to say thanks for wrapping it up so nicely (one might even say "in AHK spirit"). And also thanks for the very detailed examples (I know next to nothing about GDI+).
Also, your idea of PostMessaging WM_NCLBUTTONDOWN to the title bar to move the GUI is ingenious! |
|
| Back to top |
|
 |
TheGood
Joined: 30 Jul 2007 Posts: 399
|
Posted: Tue Mar 24, 2009 5:39 pm Post subject: |
|
|
I have a question. When you want to update the GUI, do you have to redraw everything, or is there a way to only redraw and refresh a portion of the GUI?
Is it efficient to redraw the whole GUI every time when only a small part of it is changing? |
|
| Back to top |
|
 |
Smurth
Joined: 13 Dec 2006 Posts: 104
|
Posted: Tue Mar 24, 2009 11:40 pm Post subject: |
|
|
I guess you should redraw all the gui
But you can build the basic layout and store it into a bitmap, then use that bitmap, change what needs to be, and update the gui. It's eating some memory but save cpu time.
It's up to you to choose what you want to sacrifice... |
|
| Back to top |
|
 |
TheGood
Joined: 30 Jul 2007 Posts: 399
|
Posted: Wed Mar 25, 2009 5:54 pm Post subject: |
|
|
| Smurth wrote: | | But you can build the basic layout and store it into a bitmap, then use that bitmap, change what needs to be, and update the gui. |
I see. How would I do that?
It would mean that I would have to copy the original bitmap before using it in SelectObject(), right? So, how do I copy a bitmap?
Sorry for the noobness, lol.
Edit: OK, so the value returned by CreateDIBSection is a pointer to the bitmap. But how do I know the size of the bitmap if I want to copy it to another variable? |
|
| Back to top |
|
 |
Smurth
Joined: 13 Dec 2006 Posts: 104
|
Posted: Wed Mar 25, 2009 6:57 pm Post subject: |
|
|
I've done this like that:
| Code: | BGUpdate()
{
; hBG need to be save between redraws to save cpu time
Static hBG
; create the needed stuff as usual
hbm := CreateDIBSection(w, h)
hdc := CreateCompatibleDC()
obm := SelectObject(hdc, hbm)
G := Gdip_GraphicsFromHDC(hdc)
if not hBG {
hBG := Gdip_CreateBitmap(w,h)
pBG := Gdip_GraphicsFromImage(hBG)
; draw the initial stuff onto pBG
; ...
; then delete pBG (as we don't need it anymore)
Gdip_DeleteGraphics(pBG)
}
; draw the previously stored hBG onto G)
Gdip_DrawImage(G, hBG, 0, 0, w, h, 0, 0, w, h)
; draw what need to be added
; ...
UpdateLayeredWindow(hWnd, hdc, x, y, w, h)
; delete the stuff as usual
SelectObject(hdc, obm)
DeleteObject(hbm)
DeleteDC(hdc)
Gdip_DeleteGraphics(G)
}
|
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|