• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX Window inside FSX

Messages
7
Hi,

I've read a lot of threads here about how to show a window inside FSX and wanted to try it myself now. I have to admit that I'm not really an expert in WinAPI programming and from what I've seen there's still nobody here who knows how to show a modeless window in fullscreen and window mode.

But I can't even get a modal window to show up inside the FSX. I started off with the SimConnect example which enables the Dialog Mode and then tried to get the handle to the FS window and create a child window, but nothing happens.

Here's what I did when the Dialog Mode is turned on:
Code:
hFSimWindow = FindWindow((LPCWSTR)"FS98MAIN", NULL);
hInst = (HINSTANCE)GetWindowLong( hFSimWindow, GWL_HINSTANCE );

WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX); 
wcex.style			= CS_HREDRAW | CS_VREDRAW; 
wcex.lpfnWndProc	= (WNDPROC)WndProc;
wcex.cbClsExtra		= 0;
wcex.cbWndExtra		= 0;
wcex.hInstance		= hInst;
wcex.hIcon			= NULL;
wcex.hCursor		= LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground	= (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName	= NULL;
wcex.lpszClassName	= (LPCWSTR)L"TestModule";
wcex.hIconSm		= NULL;

RegisterClassEx(&wcex);

hWnd = CreateWindowEx(WS_EX_TOPMOST,wcex.lpszClassName, (LPCWSTR)L"TestModule", WS_CHILD | WS_CAPTION | WS_OVERLAPPEDWINDOW | WS_VISIBLE, 100, 100, 300, 200, hFSimWindow, NULL, hInst, NULL);

What am I doing wrong here? And has anyone made progress regarding modeless windows?
 
You do all right. But, next step need create a loop of redraw window - else you can't see window
 
Back
Top