no offense tic, but can we remove your download link and only keep _All ?

Yes, I shall do so until Gdip2 is done. I've been so busy that I haven't had a chance to look at it

dd900 wrote:Hey tic just got around to trying out Gdip2. I'm having a bit of trouble with example 3 (create-gui-from-image). If I try to set the x and y coords to anything but 0 the right and bottom sides of the image get cut off.

Currently it has no overloads, so you have to provide the x and y parameters in a single object (See example 8)

Hey guys,
I cant figure out how to make my cross hairs work after initial initiation of the application i am developing.
At start its loads fine, but when i click to pause the area of zoom and then start it again the cross hairs don't appear. Also the issue is flicker cross hairs, but i am not sure if that can be avoidable.

My script should operate like this:
When you launch it ask for source window, works on game windows best(calculator seams to not work with my app), then once you give the proper window name it opens 3 guis. One a copy of the whole window, 2nd is the panel for my app. Inside the panel there is a frame to hold the maximized refreshing image of where the mouse is/should be of the chosen window. It uses the same bitmap that's a copy of the real chosen window just used differently in a different gui. And is meant to have cross hairs while the frame is active. There is a button OK to initiate that frame if it is stopped. When you click left mouse button on the full window copy gui the zoom frame freezes till you click OK button.

How it actually works:
gets name of the window(no validation yet), when name is correct if fills the full copy gui and initiates the zoom frame with cross hair like it should. reacts to left click appropriately. But when its initiated again it fails to draw the cross hairs in the zoom frame.

Also please help me understand more about the mechanics behind building, Device Contexts, Bitmaps, Graphics, Pens and such. Because do to specific functions and refreshing loops that I have. I am not sure if I should create any object once or and delete them at the end, or should I create and delete those objects for every refresh.

Yes, using BitBlt with a layered window isn't intended. Just use win1.Update() for that. For an example of using Bitblt with a standard window here is an example.
Remember there could be breaking changes in future versions of Gdip2

Which will build my final Gdip2.ahk from all the separate files in my project, and watch for changes, then running unit tests in this way is no extra effort and also watches for changes and re-runs tests on change - Which I don't think Yunit does

- @guest3456: In AHK v2, I recently discovered that the proper output value for SendMessage is now the output variable for the function and not ErrorLevel. (A separate issue, I also discovered that if you try to create a string key '123', obj["123"] := value, it is forced as an integer key.
- @nnnik and guest3456: Perhaps you could make it so that Gdip v2 could work in AHK v1.1, if you also include this library. This is why I wrote the library(/updated the work by Coco), I believe it's the only realistic way (without creating something horrendous,) to have scripts that are two-way compatible. Hmm, but loops are currently a problem, so maybe not.
commands as functions (AHK v2 functions for AHK v1) - AutoHotkey Communityhttps://autohotkey.com/boards/viewtopic ... 37&t=29689

yes, the readme was changed a few commits prior removing the mention of backwards compatibility. feel free to re-instate it if you can, and create a pull request. i thought it was no longer possible to be backwards compatible. in v2 "command" syntax now requires expressions as parameters, whereas in v1 its literal text. so how do you get around that?

jeeswg wrote:- @guest3456: In AHK v2, I recently discovered that the proper output value for SendMessage is now the output variable for the function and not ErrorLevel.

If SendMessage no longer uses ErrorLevel, then how could that be made backward compatible? v2 would require the function syntax to get the return value

jeeswg wrote:
- @nnnik and guest3456: Perhaps you could make it so that Gdip v2 could work in AHK v1.1, if you also include this library. This is why I wrote the library(/updated the work by Coco), I believe it's the only realistic way (without creating something horrendous,) to have scripts that are two-way compatible.
commands as functions (AHK v2 functions for AHK v1) - AutoHotkey Communityhttps://autohotkey.com/boards/viewtopic ... 37&t=29689

i really don't want to include an external library. v2 was meant to break compatibility anyway, and lexikos doesn't seem to really care to try to compensate for it. so if its not easy, it might be a worthless cause

Well this library was advised and people still tend to advise it as the standard for AHK v1.
However with backwards compatability removed this is no longer feasonable.
It might be better to break forwards compatability.

nnnik wrote:Well this library was advised and people still tend to advise it as the standard for AHK v1.
However with backwards compatability removed this is no longer feasonable.
It might be better to break forwards compatability.

the repo name clearly states AHKv2-Gdip. the latest readme clearly says that this library is for AHK v2 and mentions NO support for AHK v1. whoever is advising this library as the 'standard' for v1 is obviously incorrect, and giving bad advice, and probably shouldn't be listened to, since RTFM is such a basic thing. if you are using v1 then just use the Gdip_All linked in the very first post in this thread. why would a v1 user ever use a version clearly labelled v2? yes there are some bugfixes but thats not the responsibility of this repo to work with unsupported versions

the original version DID have support for both AHK v1 and AHK v2, because at that time, the v2 changes were not so radical, and backwards compatible support was easily possible.

regardless, as said, it may still be possible to make it backwards compatible, as discussed in the Issue here. someone would just need to do it and test it with the Example files and submit a pull request. i dont know when ill have time.https://github.com/mmikeww/AHKv2-Gdip/issues/11

I have removed the references towards Gdip_all.ahk from the beginning of this topic and only left references towards the old library.
If you wish to publish this library further please create a new topic. ( I will split all posts about this new library into that topic then )

the library can clearly be recommended for AHK v2, as was its sole initial intent.

nnnik wrote:I have removed the references towards Gdip_all.ahk from the beginning of this topic and only left references towards the old library.

what are you doing?

are you even thinking before acting? what kind of moderator are you?

the link in the first post of this thread was tic's link to a WORKING v1 VERSION Gdip_All. tic added the link per the request here. it was NOT a link to the v2 library. you've now made it impossible for anyone to get a v1 version of Gdip_All. good work.

the library can clearly be recommended for AHK v2, as was its sole initial intent.

nnnik wrote:I have removed the references towards Gdip_all.ahk from the beginning of this topic and only left references towards the old library.

what are you doing?

are you even thinking before acting? what kind of moderator are you?

the link in the first post of this thread was tic's link to a WORKING v1 VERSION Gdip_All. tic added the link per the request here. it was NOT a link to the v2 library. you've now made it impossible for anyone to get a v1 version of Gdip_All. good work.

It also seems that I have been under the impression that your repository on GitHub was also the main repository of the Gdip_All.ahk, due to the old ReadMe that kind of only states the goal of implementing AHK v2 compatability.
I think instead of waiting for them it would be faster to implement AHK v1.1 backwards compatability.
This is the last Version that worked properly on v1.1 https://github.com/mmikeww/AHKv2-Gdip/b ... ip_All.ahk
I still think that you should create your own topic though in order to more clearly show the differences between Gdip_All and your script.