Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7751467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:33:18+00:00 2026-06-01T11:33:18+00:00

I am working on a program base on C++ and also using SiliconSoftware interface.

  • 0

I am working on a program base on C++ and also using SiliconSoftware interface.
as you see from the attached pisture I am running the main window with the c++ win32 code, but the display window is created with frame grabber inteface with following code :

int Bits=8; int nId =::CreateDisplay(Bits,GrabberOptions::getWidth(),GrabberOptions::getHeight());SetBufferWidth(nId,GrabberOptions::getWidth(),GrabberOptions::getHeight());::DrawBuffer(nId,Fg_getImagePtrEx(fg,lastPicNr,0,_memoryAllc),lastPicNr,"");

but I want this Diplay window, open with within the Main Window.
How can I do it ? any idea?
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:33:20+00:00Added an answer on June 1, 2026 at 11:33 am

    Let’s say you have

    HWND a = ...
    HWND b = ...
    

    assumig they are the native handles of sibling window obtained no matter how.
    To make b a child of a, you have to do

    Setparent(b,a); //a will be the new parent b
    DWORD style = GetWindowLong(b,GWL_STYLE); //get the b style
    style &= ~(WS_POPUP|WS_CAPTION); //reset the "caption" and "popup" bits
    style |= WS_CHILD; //set the "child" bit
    SetWindowLong(b,GWL_STYLE,style); //set the new style of b
    RECT rc; //temporary rectangle
    GetClientRect(a,&rc); //the "inside border" rectangle for a
    MoveWindow(b,rc.left,rc.top,rc.right-rc.left,rc.bottom-rc.top); //place b at (x,y,w,h) in a
    UpdateWindow(a);
    

    Nowm you have to handle WM_SIZE from a and move b accordingly, so that it resize together with its (new) parent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there any small working program for recieving from and sending data to client
Here is the shader from an example program I'm working with: static const char*
I am just getting started using NAnt. I was working from a tutorial, and
I'm working on a program that makes using MySQL databases simpler. Right now I
I'm working with a C++ code base. Right now I'm using a C++ code
I'm working in a small program using Language C. I want to create a
I was working on an embedded program using C. There are tons of hardware
The program I am working on exposes both callbacks and services using wcf. Basically,
I am working with an architecture that has a main program. When this starts
I have a working program in C++ that generates data for a Mandelbrot Set.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.