Jump to content
xisto Community
Sign in to follow this  
saga

Win32 Api: Modal Dialog Box Problem C++ Win32 API Programming

Recommended Posts

Here is my problem, I want to create a modal dialog box (application modal) that has a keyboard accelerator assign to it. I just don't know where to put the TranslateAccelerator() function with regards to modal dialog box since the message loop is inside the function DialogBox(). So how to I make a modal dialog box which has a keyboard accelerator assign to it?

Share this post


Link to post
Share on other sites

shut up

Win32 Api: Modal Dialog Box Problem

 

 

Use flag variable to control the behavior of opened dialogs;

Like this;

 

 

//gloable initialization

Int flag =1;

 

//before showing a dialgobox, check this condtion

If(flag)

{

DialogBox(..WS_SHOW);

flag=0;

}

 

// when you click close[x]option or cancle button of the dialogbox

// before closing it, unset this flag variable

Flag=1;

 

 

Regards

A.B.See.

Class 5th grade

 

-imran

Share this post


Link to post
Share on other sites
Win32 Api: Modal Dialog Box Problem - C++ Win32 API ProgrammingWin32 Api: Modal Dialog Box Problem

Hi Saga,

I am running into the same question, and haven't found an answer after a good amount of searching.  Did you ever figure out a solution to this?

I see there is a solution for MFC apps, but not for Win32 apps.  Here is the MFC one:

https://support.microsoft.com/en-us/kb/100770

-reply by Mark

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.