LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-19-2002, 06:01 AM   #1
edreddy
Member
 
Registered: Jul 2002
Location: INDIA, Bangalore.
Distribution: Red Hat Enterprise Linux 3.0 Advanced Server
Posts: 34

Rep: Reputation: 15
regarding vc++


how to make modal dialog invisible in vc++
 
Old 07-19-2002, 08:00 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Sorry if I totally got your question wrong. But could you elaborate on what you mean by making it invisible? If I remember correctly modal dialogs where dialogs that require a user to interact with it before they dissapear.

Aren't you the one who controls the creation of such a dialog in your source code. Then why do you want to make it invisible? Isn't the dialog all about interaction with the user? Wouldn't the user need to see the dialog to interact with it?

Last edited by Mik; 07-19-2002 at 08:02 AM.
 
Old 07-19-2002, 08:30 AM   #3
edreddy
Member
 
Registered: Jul 2002
Location: INDIA, Bangalore.
Distribution: Red Hat Enterprise Linux 3.0 Advanced Server
Posts: 34

Original Poster
Rep: Reputation: 15
EVC++ doubts

Thanks Mik,

I am using an application, which demands for
for the invisibility for the Modal dialog.

To be more specific, before making the dialog
visible I am creating a thread which starts listen
on one port. Now My application demands when I start the
application, the modal dialog should not be visible.

I hope This will make u understand
mik! better if you give reply immediately, being it is urgent for me.

Thanks
 
Old 07-19-2002, 08:55 AM   #4
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Well this is what I did in another application to make it's window dissapear. As far as I remember a dialog should be able to handle the same messages. Haven't worked with dialogs in windows in ages.

Anyway this is the command that I used to hide the window:
ShowWindow(hWnd, SW_HIDE);

And this is the command I used to make it reappear:
ShowWindow(hWnd, SW_SHOW);
SetForegroundWindow(hWnd);

The second command is only necessary if you want it to popup to the foreground.

Hope that helps.
 
Old 07-31-2002, 06:43 PM   #5
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473

Rep: Reputation: 30
Ramakrishna:
Do one thing..
Create an MFC dialog based app. Add msg handler for WM_TIMER.
and see the following code,

/* insert this line in OnInitDialog()
SetTimer(100, 1000, NULL);
*/


bool truth = FALSE;


void CJunkdlgDlg::OnTimer(UINT nIDEvent)
{
if( truth)
{
truth = FALSE;
ShowWindow(SW_HIDE);
}
else
{
truth = TRUE;
ShowWindow(SW_SHOW);
}

CDialog::OnTimer(nIDEvent);
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration