Fixed compiler warnings: Removed unused variables. Using %p for converting HWND to hex. Implemented SETSTATE1.