AutoHotkey Community

It is currently May 26th, 2012, 5:14 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1000 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 67  Next
Author Message
 Post subject:
PostPosted: February 8th, 2009, 10:20 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7502
Location: Australia
If I knew, I would've posted already.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 9th, 2009, 2:35 pm 
I appreciate your courtesy anyhow. :D


@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! :idea: :idea: [color]Thanks![/color]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 12th, 2009, 4:44 am 
Offline

Joined: December 13th, 2006, 7:10 am
Posts: 118
Does anybody know how to get a copy of the desktop window, without all the opened windows; in fact, just the wallpaper ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 18th, 2009, 5:39 pm 
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?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2009, 7:44 pm 
Online

Joined: April 22nd, 2007, 6:33 pm
Posts: 1833
Sorry all......I will get round to doing everything shortly.....busy with life/work :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2009, 6:15 am 
Offline

Joined: April 18th, 2008, 7:57 am
Posts: 1390
Location: The Interwebs
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2009, 8:25 pm 
Offline

Joined: December 13th, 2006, 7:10 am
Posts: 118
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+ :(


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2009, 5:59 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7502
Location: Australia
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Gdip and ie4AHK
PostPosted: March 9th, 2009, 8:30 pm 
Offline

Joined: February 20th, 2009, 1:19 am
Posts: 12
Location: France
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 11th, 2009, 4:24 pm 
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. :) :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2009, 12:12 am 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2009, 5:39 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2009, 11:40 pm 
Offline

Joined: December 13th, 2006, 7:10 am
Posts: 118
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2009, 5:54 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2009, 6:57 pm 
Offline

Joined: December 13th, 2006, 7:10 am
Posts: 118
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)

}


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1000 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 67  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group