Ho to show a normal window as modal window ?

Windows specific questions.
Post Reply
kcvinu
Posts: 232
Joined: Oct 07, 2015 16:44
Location: Keralam, India

Ho to show a normal window as modal window ?

Post by kcvinu »

Hi all,
I am trying to mimic the dot net method "Form.ShowDialog()" in my gui library hobby project. After a few hours of google search, i came to know that i need to use EnableWindow function to achieve this. Means, disable all other windows when my ShowDialog is called and enable all those windows back when my modal window gets closed. But this resulted in a strange behavior. When i click on any disabled window, my modal window is not flashing. But i can hear a beep sound. I doubt that i should take care about the parent child relationship of all the windows. I hope someone will enlighten me with their ideas. Thanks in advance.
erik
Posts: 39
Joined: Dec 28, 2020 17:27
Location: Krasnoyarsk
Contact:

Re: Ho to show a normal window as modal window ?

Post by erik »

You need to call DialogBoxParam or DialogBoxIndirectParam.
Post Reply