How to set Window Class Styles back to Default?

  c++, win32gui, winapi

I changed the Window Class Style by removing the backdrop shadow of my child window by adding "CS_DROPSHADOW" style and calling SystemParametersInfoA method.

It worked. However the problem now is I don’t know how to set it back to default. The code implementation is as shown below:

child.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_DROPSHADOW;
child.lpfnWndProc = WndProcChild;
child.cbClsExtra = 0;
child.cbWndExtra = 0;
child.hInstance = hInstance;
child.hIcon = NULL;
child.hCursor = LoadCursor(NULL, IDC_ARROW);
child.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
child.lpszMenuName = NULL;
child.lpszClassName = _T("ChildWindow");
child.hIconSm = NULL;

SystemParametersInfoA(SPI_SETDROPSHADOW, 0, (PVOID)FALSE, 0);

Source: Windows Questions C++

LEAVE A COMMENT