Solved

modeless dialogbox

Posted on 2003-10-31
7
202 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
Comment Utility
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
Comment Utility
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
Comment Utility
Instead use the FlashWindowEx which handles the repeated flashing.

amit
0
 
LVL 44

Expert Comment

by:AndyAinscow
Comment Utility
My comment would be a way to achieve the desired effect
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now