CFanatic

Go Back   CFanatic > Programming > Win32 Programming

Join CFanatic Forum Now

how to destroy or close the window and create the new window topic posted under Win32 Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2007, 02:18 AM
Member
 
Join Date: May 2007
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
vidhya is on a distinguished road
| More
how to destroy or close the window and create the new window

hi

what i want to do is if once the window is created by executing the code,if next time i execute the same code it should check wether the window is open or not.if the window is open it should close the previous window.and create the new window.

is it possible to do this.if yes please give idea how to do this.

regards
vidhya
Reply With Quote
  #2  
Old 05-24-2007, 04:12 AM
shabbir's Avatar
Administrator
 
Join Date: Sep 2006
Posts: 1,163
Thanks: 57
Thanked 63 Times in 44 Posts
shabbir has a spectacular aura aboutshabbir has a spectacular aura about
| More
Re: how to destroy or close the window and create the new window

Send the WM_CLOSE message to the Window Handle.
Reply With Quote
  #3  
Old 05-24-2007, 10:27 PM
Member
 
Join Date: May 2007
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
vidhya is on a distinguished road
| More
Re: how to destroy or close the window and create the new window

Quote:
Originally Posted by shabbir View Post
Send the WM_CLOSE message to the Window Handle.
see my task is when i first execute my exe file one banner window will display on the desktop it will always be running.when next time i execute exe with some argument the argument should display in the same banner.

what i thought was when i execute exe file second or third time i will close the previous window and open in new window.

what i want is single instance of the window.
Reply With Quote
  #4  
Old 05-24-2007, 11:40 PM
shabbir's Avatar
Administrator
 
Join Date: Sep 2006
Posts: 1,163
Thanks: 57
Thanked 63 Times in 44 Posts
shabbir has a spectacular aura aboutshabbir has a spectacular aura about
| More
Re: how to destroy or close the window and create the new window

You don't need to do it that way. The better way is say you have some Message WM_COPYDATA to send to the old executable some data (Say command Line data). Now when getting the WM_COPYDATA the exe just updates its content accordingly.

Now after sending the message (new running version) should be killed or closed and now you have single instance with the update happening each time you run the exe with the command line.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create window e_pech MFC Programming 1 07-25-2008 02:09 AM
hidding a window pkl Win32 Programming 3 07-15-2008 03:52 PM
Window Properties ranjini.sg Win32 Programming 0 06-26-2007 12:53 AM
how to make a window to always on top of all the other window vidhya Win32 Programming 11 06-05-2007 09:25 PM
how to pass the arguments to procedure to close the window vidhya Win32 Programming 0 05-30-2007 05:24 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 01:50 AM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board