Hi
Building my kinda first real windows desktop application an need some help.
I have been creating a window with a label which I want to blink simply by using a timer and alter the label's Visible property each timer tick.
Most things works as expected but I do not find any methode of altering the Visible property of the label. I have searched MSDN and googlefor help but with all the flavours of developement tools available I do not find any tip that solves this for me.
I am old fashion and uses C and what is called Auto C to create my applications. You may google that up if you like but I think the source created is the same as for all tools creating c - based code for creating windows apps.
Nevertheless, even though the code below is not working it shows my intentions pretty well I think.
Code:
case WM_TIMER:
switch (wParam)
{
case IDT_TIMER1: // 1000ms timer
// Update Statuslabel
hWndChild = GetDlgItem(hWndParent, StatusLabel);
if (ToggleStatusLabel)
StatusLabel.Visible = !StatusLabel.Visible;
else
StatusLabel.Visible = TRUE;
break;
}
break;
The timer is set to one sec intervall and works as expected.
My label is named StatusLabel, but since this is not C# or C++ I can not use the item as shown in my code since the entity "StatusLabel" is not a struct nor an object, just a simple define.
As you see I make a call to GetDlgItem(). This is a hint to what I think is what I need to do, i.e. get a handle and use this to set the wanted property, "Visible" in this case, through some nifty function calls. Question is which??
Breg
Vidar