473,387 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to make any form hidden...

Hye friends!!!
A silly question but still harassing me. I am developing one project and
in that I want full support of MFC. So, what I have to make is make one
project by Wizard (for MFC-->Dialog Application).. Now I want to hide that
dialog when initializing and start some of the threads depending on the
conditions... (threading part is ready but hiding a dialog makes me
annoying) So, the dialog must not appear one time also, it must be initially
hidden.

I know there would be four or five line of code for doing that but I
don't know it right now.. So, if you have it handy please give me..

--
Jigar Mehta
jb*******@yahoo.co.in
Nov 17 '05 #1
3 3343
Jigar Mehta <jb*******@yahoo.co.in> wrote in message
news:Oc**************@TK2MSFTNGP09.phx.gbl...
Now I want to hide that
dialog when initializing and start some of the threads depending on the
conditions... (threading part is ready but hiding a dialog makes me
annoying) So, the dialog must not appear one time also, it must be initially hidden.

I know there would be four or five line of code for doing that but I
don't know it right now.. So, if you have it handy please give me..


Dialogs are windows of a particular class. Windows may be shown or hidden by
calling ShowWindow(). There the SW_HIDE flag can be used used to hide it and
SW_SHOWNORMAL can be used to display it.

Note that modal dialogs should not be hidden. That's because the "dialog
manager wants" to disable the parent/owner while a dialog is in progress.
Modeless dialogs, howver, may be shown or hidden as you like.

Regards,
Will
Nov 17 '05 #2
Thanks william for replying,
But what I want to do is want to put some code for hiding form in the
initInstance() function of the dialog itself. So that the dialog is not
shown once also. I am afraid that showwindow(SW_HIDE) will work in
initinstance...

Thank you..

Jigar Mehta
jb*******@yahoo.co.in

"William DePalo [MVP VC++]" <wi***@mvps.org> wrote in message
news:u0**************@TK2MSFTNGP11.phx.gbl...
Jigar Mehta <jb*******@yahoo.co.in> wrote in message
news:Oc**************@TK2MSFTNGP09.phx.gbl...
Now I want to hide that
dialog when initializing and start some of the threads depending on the
conditions... (threading part is ready but hiding a dialog makes me
annoying) So, the dialog must not appear one time also, it must be initially hidden.

I know there would be four or five line of code for doing that but I
don't know it right now.. So, if you have it handy please give me..


Dialogs are windows of a particular class. Windows may be shown or hidden by
calling ShowWindow(). There the SW_HIDE flag can be used used to hide it and
SW_SHOWNORMAL can be used to display it.

Note that modal dialogs should not be hidden. That's because the "dialog
manager wants" to disable the parent/owner while a dialog is in progress.
Modeless dialogs, howver, may be shown or hidden as you like.

Regards,
Will


Nov 17 '05 #3
Jigar Mehta <jb*******@yahoo.co.in> wrote in message
news:eY**************@TK2MSFTNGP11.phx.gbl...
Thanks william for replying,
You are welcome.
But what I want to do is want to put some code for hiding form in the
initInstance() function of the dialog itself. So that the dialog is not
shown once also. I am afraid that showwindow(SW_HIDE) will work in
initinstance...


In the resource editor, design a modeless dialog which does not have the
WS_VISIBLE style. Then when you create it at runtime you will get a handle
to an invisible window. You can use that handle in a call to ShowWindow()
todisplay it.

As I mentioned in my last post, do not try to manage the visibility of modal
dialogs.

Regards,
Will

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Terence Parker | last post by:
I am trying to connect an e-commerce system to a payment gateway (located in Hong Kong). The gateway takes values in the form of a simple form submit - however, the results (i.e. authorisation...
3
by: Mr. x | last post by:
Hello, How can I make a form (tag = "<form>") invisible ? <form id = "myform"> ... myform.style.visibility = "hidden"; // this doesn't work !!! Thanks :)
1
by: Don Stefani | last post by:
Hello, I have a form that I want to submit "onchange", OK I've got that working, but when the form submits, I want to pass along a value to a CGI script, as if that value was in a hidden form...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
2
by: windsorben | last post by:
I'd like to have an image appear after the student answers each short answer question correctly. I can't seem to get it to work properly. See code below. Thanks! <html> <head>...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
1
by: TopherB | last post by:
Hi, First let me say that my knowledge of HTML and Javascript is fairly limited. But I am stuck in a situation of trying to adapt a website's shopping cart to a new one. Here's the problem, the...
1
by: mlshoats | last post by:
Hello I am trying to make a log to track questions i answer on little hardware problems. I got most of it working but I am very new to programming anything and just started picking up things. I am...
2
by: Mo | last post by:
I am trying to calculate open-account credibility for new customers. I have set up a form in which to enter the feedback from their trade references, but the vars get reset each time the page...
5
by: programmerboy | last post by:
I never had this kind of issue before and it is completely surprising. I have a usercontrol where I need 2 forms to make 1 form. When I have only 1 form it submits the page to itself. I have spent...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.