Looking for a way to change text colour of a label for instance via winapi.
This does not seem to work.
Not sure why.
Appreciate any suggestions, bearing in mind I know I can do it with native functions but that is not what I'm after.
I cannot even make it work c++, and ideas about that would be just as sufficient.
Thanks for reading.
This does not seem to work.
[ autoit ]
#include <WinAPI.au3> #include <WindowsConstants.au3> _Main() Func _Main() Local $hwnd, $hDC $hwnd = GUICreate("test") $hlabel = GUICtrlCreateLabel("label", 10,10,50,25) $hlabel2 = GUICtrlGetHandle($hlabel) $hDC = _WinAPI_GetDC($hlabel2) If @error Then Exit MsgBox(0,"_WinAPI_GetDC", @error); no error _WinAPI_SetTextColor($hDC, 0x0000FF) If @error Then Exit MsgBox(0,"_WinAPI_SetTextColor", @error); no error GUISetState() While 1 If GUIGetMsg() = -3 Then ExitLoop WEnd _WinAPI_ReleaseDC($hlabel2, $hDC) EndFunc ;==>_Main
Appreciate any suggestions, bearing in mind I know I can do it with native functions but that is not what I'm after.
I cannot even make it work c++, and ideas about that would be just as sufficient.
Thanks for reading.