Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jijo Pappachan
  Where is Jijo Pappachan?
 Kerala
 India
 Jijo Pappachan
 Tags
Subject: Close button Click API
Thread ID: 310802 Message ID: 310802 # Views: 62 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Win32API programming
Date: Saturday, June 25, 2011 8:27:05 AM         
   


Hi Experts,
I have a problem. I have opened one editor window using
Modify command myfilename


for a specific purpose(not for creating prg files. but i want syntax coloring and beautify options and all
So, memo field is not suitable here).

When I click on close button (X) after making some changes, VFP will show "Save changes" confirmation messagebox.
What I want to know, is there any way to bind Close button click event of a window and override it?
I tried to bind WM_CLOSE, WM_QUIT events of that window. But nothing seems to work.
I have handle of that specified window. Please advice me.

PS: - I have one (dirty) workaround idea,
1. get CLOSE (X) button positions(left, top, width, height)
2. bind WM_MOUSEDOWN event of that window
3. Check whether mouse position is inside X button area.
Is it good idea, if so, how I will get X button area?

Jijo
JUST THINK, THERE IS A WAY
my blog:http://weblogs.foxite.com/jijo_pappachan/

ENTIRE THREAD

Close button Click API Posted by Jijo Pappachan @ 6/25/2011 8:27:05 AM
RE: Close button Click API Posted by onytoo @ 6/25/2011 10:27:42 AM
RE: Close button Click API Posted by Jijo Pappachan @ 6/25/2011 10:45:02 AM
RE: Close button Click API Posted by onytoo @ 6/26/2011 3:29:50 AM
RE: Close button Click API Posted by Jijo Pappachan @ 6/27/2011 6:23:18 AM
RE: Close button Click API Posted by onytoo @ 6/27/2011 11:13:28 AM
RE: Close button Click API Posted by Yousfi Benameur @ 6/27/2011 10:21:56 AM
RE: Close button Click API Posted by onytoo @ 6/27/2011 11:17:27 AM
RE: Close button Click API Posted by Yousfi Benameur @ 6/26/2011 1:05:05 AM
RE: Close button Click API Posted by Jijo Pappachan @ 6/27/2011 6:24:25 AM