Dear All
I want to make parent window as non transparent with RGB value as (99,99,99)? Previously my window was transparent but now i have requirement to make window as non transparent.
Mentioned below are the function related to my parent window:
ATOM MyRegisterClass(HINSTANCE hInstance)
{
LogEntry(L"Entered in myRegisterClass Function");
WNDCLASS CLASS_NAME_ONE_SEG_APP;
CLASS_NAME_ONE_SEG_APP.cbClsExtra = 0;
CLASS_NAME_ONE_SEG_APP.cbWndExtra = 0;
CLASS_NAME_ONE_SEG_APP.hbrBackground = 0;
CLASS_NAME_ONE_SEG_APP.hCursor = 0;
CLASS_NAME_ONE_SEG_APP.hIcon = 0;
CLASS_NAME_ONE_SEG_APP.hInstance = hInstance;
CLASS_NAME_ONE_SEG_APP.lpfnWndProc = (WNDPROC) WndProc;
CLASS_NAME_ONE_SEG_APP.lpszClassName = className;
CLASS_NAME_ONE_SEG_APP.lpszMenuName = 0;
CLASS_NAME_ONE_SEG_APP.style = 0;
LogEntry(L"Exiting from myRegisterClass Function");
return RegisterClass(&CLASS_NAME_ONE_SEG_APP);
}
Mentioned below is an InitInstance function in which i am creating the parent window.
handles.parent is my parent window.
bool WINAPI InitInstance(HINSTANCE hInstance, int nCmdShow)
{
LogEntry(L"Entered in InitInstance Function");
handles.parent = CreateWindowEx(0,
className,
windowName,
WS_VISIBLE | WS_POPUP,
0, 0,
coordinates.width, coordinates.height,
NULL,
NULL,
hInstance,
NULL);
if(handles.parent == NULL)
{
LogValue(L"Cannot Create Parent Window"
L"\nInitInstance Function terminated abnormally");
return false;
}
else
{
UpdateWindow(handles.parent);
ShowWindow(handles.parent, nCmdShow);
LogEntry(L"Exiting from InitInstance Function");
return true;
}
}
The below mentioned is a function for WM_PAINT:
case WM_PAINT:
LogEntry(L"Entred in WM_PAINT");
PaintWindow();
SetFocus(handles.parent);
LogEntry(L"Exited from WM_PAINT");
break;
This PaintWindow does the following.....
void PaintWindow()
{
LogEntry(L"Entered in PaintWindow Function");
HWND *handle = &handles.volUp;
//Paint Buttons on the window
for(register char i = MIN_BUTTON; i <= MAX_BUTTON; i++)
{
PaintButton( (INITIAL_BUTTON + i) , *handle, btns, i);
handle++;
}
//Paint the AXIS_VOL_ON_OFF Button According to its Status
if(volumeStatus.status == VOLUME_ON)
PaintButton(IDB_BTN_VOL_OFF, handles.volOnOff, btns, AXIS_VOL_ON_OFF);
else if(volumeStatus.status = VOLUME_MUTE)
PaintButton(IDB_BTN_VOL_ON, handles.volOnOff, btns, AXIS_VOL_ON_OFF);
//Paint Images on the window
if(handles.screenMode == SCREEN_MODE_OPERATION)
InsertImages();
LogEntry(L"Exited from PaintWindow Function");
}
Thanks in advance......