?
Solved

modeless dialogbox

Posted on 2003-10-31
7
Medium Priority
?
213 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
4 Comments
 
LVL 45

Accepted Solution

by:
AndyAinscow earned 280 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 280 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 280 total points
ID: 9661578
Instead use the FlashWindowEx which handles the repeated flashing.

amit
0
 
LVL 45

Expert Comment

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

Featured Post

Independent Software Vendors: 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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses

839 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