Tuesday, May 22nd 2018, 11:44pm UTC+2

You are not logged in.

  • Login
  • Register

Date of registration: Nov 30th 2017

Posts: 18

1

Friday, April 27th 2018, 6:43am

Creating a new window

Hi I have one straight forward question...Can we create a new window(not a child window) on top of a window without deleting the existing one..?
What will be the impact on performance.Please give your suggestions. :)

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 584

2

Friday, April 27th 2018, 11:42am

Hi,

You can create a window without passing a parent handle (just pass 0) and WM_SetStayOnTop(). This makes the given window to be the top most.
Call this function again with 0 as second parameter to to clear the stay-on-top-flag.

Regards,
Sven

Date of registration: Nov 30th 2017

Posts: 18

3

Friday, April 27th 2018, 12:06pm

Ok. Thanks for the quick reply.

Date of registration: Nov 30th 2017

Posts: 18

4

Friday, April 27th 2018, 12:14pm

So WM_SetStayOnTop() should be passed as 0 while deleting the window.

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 584

5

Friday, April 27th 2018, 2:40pm

Hi,

Quoted

So WM_SetStayOnTop() should be passed as 0 while deleting the window.
No, just call it with 0 to make the window no more the top most. After calling the function with 0 any other window can become the top most again.
When deleting, just call WM_DeleteWindow() and the window disappears.

Regards,
Sven

Date of registration: Nov 30th 2017

Posts: 18

6

Friday, April 27th 2018, 3:23pm

Ok understood.. Thanks. :)