Jump to content

Recommended Posts

Posted

Requests:
1) When you click a button, if you slide the cursor away from the control, don't execute.
2) The toggles, to act as the buttons do, that act on the release of the mouse.
3) if, because this is a GDI GUI, tab around the controls.

This is a very nice looking thing 🤩
Thanks for sharing :) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting  image.gif.922e3a93535f431de08b31ee669cc446.gif
autoit_scripter_blue_userbar.png

Posted
11 hours ago, argumentum said:

Requests:
1) When you click a button, if you slide the cursor away from the control, don't execute.  ✔️ 
2) The toggles, to act as the buttons do, that act on the release of the mouse.   ✔️ 
3) if, because this is a GDI GUI, tab around the controls.  ✔️ 

This is a very nice looking thing 🤩

Thank you very much 😍


I updated the first post  Version (0.0.6)  :)  

I know that I know nothing

Posted

This is really special. I can envision a lot of potential for this framework. Especially for the fact that you have designed it in such a way that it can be extended upon with more controls and customization. And we have some real GDI+ geniuses in this forum should they decide to partake in this. :)

The controls really are lightweight, fast and responsive.

I have only one minor concern: I feel like the rounded corners and edges in general are a bit fuzzy. If they can be sharpened, I think that it would be an important improvement.

Posted

If someone designs a new control (for example, ListView or TreeView) for the framework, would that control work with the existing standard UDF (eg. _GUICtrlListView_*) functions?

Posted

if you take the GUI and press alt-space then arrow down, will go to move, then press enter, and that's the idea when tabbing around.
Should adding the accelerator ( for when you press enter on a highlighted control ) be left to the UDF or the user? ( in regards of having the control execute. ) 🤔

and !, thanks for the update :) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting  image.gif.922e3a93535f431de08b31ee669cc446.gif
autoit_scripter_blue_userbar.png

Posted (edited)
12 hours ago, WildByDesign said:

I feel like the rounded corners and edges in general are a bit fuzzy. If they can be sharpened, I think that it would be an important improvement.

I added the properties to all the controls, I hope this improve the situation

; Settings for Sharpening
_GDIPlus_GraphicsSetSmoothingMode($hBack, 4)     ; HighQuality Antialiasing
_GDIPlus_GraphicsSetPixelOffsetMode($hBack, 4)   ; HighQuality (Half-pixel offset)
_GDIPlus_GraphicsSetTextRenderingHint($hBack, 5) ; AntiAliasGridFit (Crisp Text)

 

12 hours ago, WildByDesign said:

If someone designs a new control (for example, ListView or TreeView) for the framework, would that control work with the existing standard UDF (eg. _GUICtrlListView_*) functions?

That’s a very insightful question.
Initially, the short answer is no, standard UDFs (like _GUICtrlListView_*) won't work directly because when you design a new control from scratch,
you are primarily working with its structural elements (e.g., a ListView would consist of a data array and a GDI+ rendered area).

To achieve full compatibility, a wrapper would be needed, but that often means losing the full creative freedom of GDI+ design.

However, there is a more advanced way I’m handling this in the UC_Framework:
Since every control in this framework is hosted in its own dedicated child window ($hChild = GUICreate(...)), it acts as a container.

This allows for a Hybrid Design:

  1. GDI+ Controls: Purely custom-drawn for maximum flexibility and "sharpened" aesthetics (using the modes we discussed).

  2. Native Composition: You can actually 'nest' a native Windows control inside a UC_Control container.

For a complex control like a ListView, we can use GDI+ to draw a beautiful, modern frame and then host a native ListView inside it.
This way, you get the best of both worlds: the visual superiority of the framework and the functional compatibility with standard UDFs.

So, while a pure GDI+ control won't 'speak' the native UDF language, the framework's architecture is open enough to allow 'Hybrid Controls' that do!

 

10 hours ago, argumentum said:

Should adding the accelerator ( for when you press enter on a highlighted control )

Regarding the accelerators,
I’ve decided that the UDF should handle this logic to keep things simple for the user.

For now, I have implemented the Spacebar as the primary keyboard trigger.
I chose Space over Enter because, in the Windows API, the Enter key requires extra message handling (like $WM_GETDLGCODE) and window separation to prevent it from being 'stolen' by the system—which is a lot of extra overhead for the core framework at this stage.

However, implementing even the Spacebar was tricky due to the 'Mouse Safety' feature I recently added (where sliding the cursor away cancels the click).
To make keyboard triggers work without a mouse present, I introduced a special coordinate exception:

; Logic to allow Keyboard Triggers while maintaining Mouse Safety
; If coordinates are -1, -1, we bypass the 'MouseOver' check
If _UC_IsMouseOver($hWnd) Or ($iX = -1 And $iY = -1) Then
    ; ... execution logic ...
EndIf

; How the Spacebar trigger is handled internally:
Case $UC_TYPE_BUTTON
    _UC_Button_WM_LBUTTONDOWN($idDummy, $hWnd, $iX, $iY)
    Sleep(50)
    _UC_Button_WM_LBUTTONUP($idDummy, $hWnd, -1, -1) ; Using -1, -1 to force execution


I updated the first post  Version (0.0.6.2)  :)  
 

Edited by ioa747

I know that I know nothing

Posted (edited)
12 hours ago, ioa747 said:

I added the properties to all the controls, I hope this improve the situation

Yes, absolutely. Especially once I added DPI scaling to my testing example. The difference between the previous release and this updated release is fantastic. Much sharper. Thank you for the quick update and also your very well detailed reply. I appreciate it.

12 hours ago, ioa747 said:

Initially, the short answer is no, standard UDFs (like _GUICtrlListView_*) won't work directly because when you design a new control from scratch,
you are primarily working with its structural elements (e.g., a ListView would consist of a data array and a GDI+ rendered area).

To achieve full compatibility, a wrapper would be needed, but that often means losing the full creative freedom of GDI+ design.

Thank you for clarifying.

Also, I would think that if a developer does come along and adds a beautiful ListView control entirely custom in GDI+, they could also potentially create functions that are similar to UDF _GUICtrlListView_* functions but that are more specific to their custom GDI+ ListView. The sky is the limit.

By the way, you are so incredibly well organized with the way that you respond with details, the way that you document everything and so much more. You are clear and concise with everything (all aspects) and that it is very helpful to learn from and understand. :)

12 hours ago, ioa747 said:

For a complex control like a ListView, we can use GDI+ to draw a beautiful, modern frame and then host a native ListView inside it.
This way, you get the best of both worlds: the visual superiority of the framework and the functional compatibility with standard UDFs.

This is a very interesting possibility as well. So there are many different possibilities with this UC Framework which makes it very flexible.

Edited by WildByDesign
Posted (edited)

:thumbsup:  Wow, this is amazing!
Thank you for this contribution.
Seeing a new component like the ProgressBar being built using the UC_Framework standards is exactly what I hoped for when I posted  this project.

You’ve captured the logic perfectly, the way you used the properties map and the GDI+ drawing routine is spot on. It’s a great addition to the set!

I’ve taken the liberty of reviewing the code, and I love how you handled the horizontal/vertical switch.
For the next official update, I will integrate this API into the main framework.

The updated Example1.au3 you provided shows exactly how versatile these controls can be when they all work together under the same theme logic.

Thank you for being part of this! You're definitely more than 'good enough', this is top-tier work

Edited by ioa747

I know that I know nothing

Posted

 Version: 0.0.7.0

    New: ProgressBars (Smooth, customizable).  (🏆Thanks to Polar  )

    New: Image controls (PNG with Alpha transparency & Scaling).

    Improved: Unified Drawing engine for sharper borders and faster performance.


I updated the first post  Version (0.0.7.0)  :)  

I know that I know nothing

Posted

@ioa747 this is a very cool project! :D

I am experiencing that button clicks only registers a click every second, even if i click more in that time. I took a quick look at the code, but cannot seem to find out why?
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...