jumpstyle
Newcomer

- Joined
- Feb 3, 2010
- Sythe Gold
- 0
- Messages
- 13
Sup Guys,
I just need help breaking down and help me understand this code.
Code:
#include <iostream>
#include <windows.h>
char g_szWindowTitle[MAX_PATH];
BOOL CALLBACK EnumWindowsProc(HWND hWindow, LPARAM lParam)
{
if(hWindow != NULL)
{
if(lParam != NULL)
{
char szLocalTitle[MAX_PATH];
GetWindowTextA( hWindow, szLocalTitle, MAX_PATH );
if(strstr(szLocalTitle, (const char*)lParam ) != NULL )
{
if(GetWindowLong(hWindow, GWL_STYLE) & WS_VISIBLE)
ShowWindow( hWindow, SW_HIDE );
else
ShowWindow( hWindow, SW_SHOW );
}
I just need help breaking down and help me understand this code.
Code:
#include <iostream>
#include <windows.h>
char g_szWindowTitle[MAX_PATH];
BOOL CALLBACK EnumWindowsProc(HWND hWindow, LPARAM lParam)
{
if(hWindow != NULL)
{
if(lParam != NULL)
{
char szLocalTitle[MAX_PATH];
GetWindowTextA( hWindow, szLocalTitle, MAX_PATH );
if(strstr(szLocalTitle, (const char*)lParam ) != NULL )
{
if(GetWindowLong(hWindow, GWL_STYLE) & WS_VISIBLE)
ShowWindow( hWindow, SW_HIDE );
else
ShowWindow( hWindow, SW_SHOW );
}

