Solved

modeless dialogbox

Posted on 2003-10-31
7
207 Views
Last Modified: 2013-11-20
i have done the textchat application for that one i created the modeless dialog box. now my question is if i am talking with 5 persons means, 5 dialog boxed will be created and they will be minimed. now if one of the 5 persons send the message, that particular dialog box window should appear in blue color. when i used the commeand Setforegroundwindow() , the window is appearing as foreground in window NT, but in windows 2000 it is glowing in blue not coming as foreground window.now i want irrespective of the operating system, then window should be blinked in blue color not coming as front window. for that one which window i have to use.


devakiB
0
Comment
Question by:devakiB
  • 2
7 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 70 total points
ID: 9656347
Check is the window minimised
pWnd->IsIconic();

If it is minimised then restore it
pWnd->ShowWindow(SW_RESTORE);

Now bring to foreground (if required)
pWnd->SetForegroundWindow();
0
 
LVL 8

Assisted Solution

by:martynjpearson
martynjpearson earned 70 total points
ID: 9656364
To "blink" a window, what you need to do is call CWnd::FlashWindow repeatedly in a timer.

So, if you want to make the window flash every second, then do :

SetTimer(1, 1000, NULL);

Then in the timer handler :

FlashWindow(TRUE);

To make the window appear normal (i.e. once the flashing has stopped), call

FlashWindow(FALSE);

Hope this helps
Martyn
0
 
LVL 4

Assisted Solution

by:AmitAgarwal
AmitAgarwal earned 70 total points
ID: 9661578
Instead use the FlashWindowEx which handles the repeated flashing.

amit
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 11849685
My comment would be a way to achieve the desired effect
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question