CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2012
    Location
    Cochin, India
    Posts
    8

    Post 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

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    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.

  3. #3
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: A remote monitoring application

    Afraid the bitmap never gets loaded. You have to check your LoadImage results.
    Best regards,
    Igor

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured