Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,25 @@ Control computeTabRoot () {

void createHandle () {
long hwndParent = widgetParent ();

int x=OS.CW_USEDEFAULT;
int y=0;

// Set it to be near the top-left corner of the parent shell by default
if (hwndParent != 0) {
RECT rect = new RECT();
OS.GetWindowRect(hwndParent, rect);

x = rect.left + 100;
y = rect.top + 100;
}

handle = OS.CreateWindowEx (
widgetExtStyle (),
windowClass (),
null,
widgetStyle (),
OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0,
x, y, OS.CW_USEDEFAULT, 0,
hwndParent,
0,
OS.GetModuleHandle (null),
Expand Down
Loading