A remote monitoring application
Hi everyone :)
I'm developing a client-server application in Win32 C. The application is intended to monitor client machines remotely.
The application has a preview screen where we can see other desktop's screnshots (refreshed periodically, in some 500 milliseconds)
How can I implement it? I've added a button control and thought of changing its background to set the screenshot.
Then I removed the button and added a picture control. But it doesn't work.
The button is contained in a dialog box.
Its Dialog Procedure is as shown.
switch(msg)
{
case WM_INITDIALOG:
hBmp = LoadImageA(
NULL,
"screen.bmp",
IMAGE_BITMAP,
0, 0,
LR_LOADFROMFILE);
hPic = GetDlgItem(hDlg, IDC_BITMAP);
SendMessage(
hPic,
STM_SETIMAGE,
IMAGE_BITMAP,
LPARAM(hBmp));
return true;
}
return 0;
}
But it's not working. I use VS2010 Ultimate.
Please anyone help :)
Thanks
Re: A remote monitoring application
You probably want to check out the RDP services (terminal server) instead. Or even use that technology as is.
Capturing a full screen, then sending it over the network periodically is going to slow down the client machine considerably. ANd it'll put a strain on the network.
RDP otoh is quite optimal in that it transfers GDI commands rather than screenshots, and it's optimized to handle icon and bitmap blitting.
Re: A remote monitoring application
Afraid the bitmap never gets loaded. You have to check your LoadImage results.