Solved

modeless dialogbox

Posted on 2003-10-31
7
208 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sameEnds challenge 3 187
wordappend challenge 8 225
Trying to run powershell  in a batch file. How do I do this? 8 117
c++  placing data into a form and an editbox 5 25
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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