Hi,
in WinMain:
c = GetCommandLine();
while(*c != ' ') //move to space before switch
c++;
if(*(c + 2) == 'p' || *(c + 2) == 'P'){
preview = true;
hwnd = (HWND)atoi(c + 4);
RECT rect;
GetWindowRect(hwnd, &rect);
winwidth = rect.right - rect.left;
winheight = rect.bottom - rect.top;
...
for the preview window:
dwStyle = WS_CHILD | WS_VISIBLE; //window style
hwnd = CreateWindowEx(dwExStyle, ...
for the saver itself:
dwStyle = WS_POPUP | WS_VISIBLE; //window style
hwnd = CreateWindowEx(dwExStyle, ...
Hope this helps.
Bailsoft