Creating new windows

All development related issues welcome

Moderator: Moderator Team

Post Reply
BStroms
Posts: 3
Joined: Wed Jun 21, 2006 9:14 pm

Creating new windows

Post by BStroms »

I have been making some modifications to the ReactOS Explorer which include the creations of new windows. I can create windows just fine using the CreateWindow function but it behaves strangely when I do.

The window appears on the screen but does not accept any input from the keyboard/mouse. You cannot move it around the screen or close it with the x button.

This is despite copying and pasting the code from a test program I compiled and ran perfectly. The only change made between the two of them was that when I compile it within the mainframe.cpp code it expects WCHAR* for two of the parameters that it expects char* for in my test program so I adjusted accordingly.


I would appreciate any advice as to what is causing this behavior and how to get around it.

Thanks,
~BStroms

terrance
Site Admin
Posts: 70
Joined: Mon Nov 22, 2004 9:52 pm
Location: Switzerland

Post by terrance »

It would be really nice to see some code snips. And also: have you tried it on windows? Does it work there?

BStroms
Posts: 3
Joined: Wed Jun 21, 2006 9:14 pm

Post by BStroms »

I'm running the explorer from within Windows at all times.

If I just create a simple test program that calls

Code: Select all

CreateWindow("STATIC", "TEST", WS_VISIBLE | WS_BORDER |WS_CAPTION | WS_POPUPWINDOW, 200, 120, 100, 160, 0 , 0 , 0 , 0 );
it works.

If I put this in mainframe.cpp as

Code: Select all

CreateWindow(L"STATIC", L"TEST", WS_VISIBLE | WS_BORDER | WS_CAPTION | WS_POPUPWINDOW, 200, 120, 100, 160, 0 , 0 , 0 , 0 );
it creates the Window but I cannot click and drag the window around or close it without closing the explorer.

It also seems strange the change in parameter format as you can see by the difference in the way they are called.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests