What actually WM_IsVisible api checks?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • What actually WM_IsVisible api checks?

    hi I created a dialog box and took handle. On press of button in that dialog box new dialog will be created and previous one was deleted using GUI_EndDialog. now I want to check if the previous dialog box handle is valid or not for that i am checking WM_IsWindow() api. which will return 1 if window handle is valid else will return 0. which is fine.
    When a handle got deleted but still it holds some value what is that value? is it an address or some value.
    Before using WM_IsWindow() i used WM_IsVisible api but this api is returning 1 even if that handle is deleted. can you please explain the difference?
  • Hi,

    The handle of a window holds a value we use internally to access its data through the emWin memory management. After deleting a window the handle has still the value (it doesn't gets zeroed). With WM_IsWindow() you can check if a handle with a value is valid. With WM_IsVisible() you can check whether a window is visible or not. Either hidden or completely covered by another window.

    Regards,
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,

    so you you pass the handle of a deleted window to the function WM_IsVisible()?

    The return value can be anything if the window handle is not valid.

    Regards,
    Sven
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.