Thread: any way to get or find a window client are handle and capture it?

  1. #1
    Registered User
    Join Date
    Dec 2005

    any way to get or find a window client are handle and capture it?

    im trying to capture a full client are of one window, but my problem is when i use the api GetWindowDC it get the full window capture (frames,sittle bar,exit buttons...) so i wonder if there is a way to get
    a window client are handle. is there any way?

    int widthW ;
    int heightW;

    int widthC ;
    int heightC;

    HDC hdc = GetWindowDC(hwnd);

    GetWindowRect(hwnd,&rcwindow); // find the dimensions needed

    widthW=rcwindow.right-rcwindow.left ;;

    GetClientRect(hwnd,&rcclient); // find the dimensions needed

    widthC=rcclient.right-rcclient.left ;;

  2. #2
    train spotter
    Join Date
    Aug 2001
    near a computer
    Try GetDC() for just the client area.

    Don't forget to ReleaseDC() or you will have a GDI leak.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help. Drawing program
    By Cherry65 in forum Windows Programming
    Replies: 4
    Last Post: 12-21-2008, 08:34 PM
  2. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM