zlatkoAB
30-03-2009, 16:09
Hi guys... :)
Sorry if i'm post on wrong place.
My question is:
How change back color of textbox.
I search trough help and don't find any command which can do that.
or I miss something?
here is my example:
DECLARE FUNCTION AnimateWindow LIB "USER32.DLL" ALIAS "AnimateWindow" (BYVAL hWnd AS DWORD, BYVAL dwTime AS DWORD, BYVAL dwFlags AS DWORD) AS LONG
uses "UI"
'---Global variables declaration-------------------------------------------------------------------
DIM Msg AS LONG
DIM wParam AS LONG
DIM lParam AS LONG
DIM hwnd AS LONG
DIM text$ AS STRING
'----------------------------------------------------------------------------------------------------
DIALOG NEW 0, "Color Edit", -1, -1, 195, 180, _
%WS_DLGFRAME OR %DS_CENTER OR %WS_CAPTION OR %WS_SYSMENU,0 TO hwnd
%ID_SLIDE = 10
%ID_ACTIVATE = 20
%ID_BUTTON1 = 30
%ID_HIDE = 40
%ID_CENTER = 50
%ID_HOR_POSITIVE = 60
%ID_HOR_NEGATIVE = 70
%ID_VER_POSITIVE = 80
%ID_VER_NEGATIVE = 90
%ID_EDIT = 100
' add controls-------------------------------------------------------------------------------------
CONTROL ADD BUTTON , hwnd, %ID_BUTTON1,"SetEditBackColor", 10, 10, 80,18
CONTROL ADD TEXTBOX , hwnd, %ID_EDIT,"BackColor Green", 100, 10, 80, 13,%ES_LEFT
'show dialog
DIALOG SHOW MODELESS hwnd
'---Start the main message loop/////////////////////////
WHILE IsWindow(hwnd)
'///////////////////////////////////////////////////////
'---Get the message and fill wParam and lParam-----
Msg = GetMessage(hwnd, wParam, lParam)
'--------------------------------------------------
SELECT CASE Msg
CASE %WM_KEYUP
CASE %WM_COMMAND
'========================================
SELECT CASE wParam
CASE %ID_BUTTON1
text$ = CONTROL_GetText(hwnd,%ID_EDIT)
MSGBOX 0, text$,32, "Edit.Text"
'What command or block of code or API
'I must use here to change edit control
'background color?
END SELECT
'===========================================
CASE %WM_SYSCOMMAND
SELECT CASE wParam
CASE %SC_CLOSE
EXIT WHILE
END SELECT
END SELECT ' Endselect Msg
WEND
'..............................................
DIALOG END hwnd
Thanks advance
Zlatko
Sorry if i'm post on wrong place.
My question is:
How change back color of textbox.
I search trough help and don't find any command which can do that.
or I miss something?
here is my example:
DECLARE FUNCTION AnimateWindow LIB "USER32.DLL" ALIAS "AnimateWindow" (BYVAL hWnd AS DWORD, BYVAL dwTime AS DWORD, BYVAL dwFlags AS DWORD) AS LONG
uses "UI"
'---Global variables declaration-------------------------------------------------------------------
DIM Msg AS LONG
DIM wParam AS LONG
DIM lParam AS LONG
DIM hwnd AS LONG
DIM text$ AS STRING
'----------------------------------------------------------------------------------------------------
DIALOG NEW 0, "Color Edit", -1, -1, 195, 180, _
%WS_DLGFRAME OR %DS_CENTER OR %WS_CAPTION OR %WS_SYSMENU,0 TO hwnd
%ID_SLIDE = 10
%ID_ACTIVATE = 20
%ID_BUTTON1 = 30
%ID_HIDE = 40
%ID_CENTER = 50
%ID_HOR_POSITIVE = 60
%ID_HOR_NEGATIVE = 70
%ID_VER_POSITIVE = 80
%ID_VER_NEGATIVE = 90
%ID_EDIT = 100
' add controls-------------------------------------------------------------------------------------
CONTROL ADD BUTTON , hwnd, %ID_BUTTON1,"SetEditBackColor", 10, 10, 80,18
CONTROL ADD TEXTBOX , hwnd, %ID_EDIT,"BackColor Green", 100, 10, 80, 13,%ES_LEFT
'show dialog
DIALOG SHOW MODELESS hwnd
'---Start the main message loop/////////////////////////
WHILE IsWindow(hwnd)
'///////////////////////////////////////////////////////
'---Get the message and fill wParam and lParam-----
Msg = GetMessage(hwnd, wParam, lParam)
'--------------------------------------------------
SELECT CASE Msg
CASE %WM_KEYUP
CASE %WM_COMMAND
'========================================
SELECT CASE wParam
CASE %ID_BUTTON1
text$ = CONTROL_GetText(hwnd,%ID_EDIT)
MSGBOX 0, text$,32, "Edit.Text"
'What command or block of code or API
'I must use here to change edit control
'background color?
END SELECT
'===========================================
CASE %WM_SYSCOMMAND
SELECT CASE wParam
CASE %SC_CLOSE
EXIT WHILE
END SELECT
END SELECT ' Endselect Msg
WEND
'..............................................
DIALOG END hwnd
Thanks advance
Zlatko