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
 To: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 Tags
Subject: RE: Close button Click API
Thread ID: 310802 Message ID: 310904 # Views: 41 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Win32API programming
Date: Monday, June 27, 2011 6:24:25 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/
>
> Hi jijo
> i tried many bindevent to windows messages unsuccessfully.the messagebox raises always before destroying the window (modi comm).
> Even if you cut the window titlebar: same behavior.
>
> if you dont modify (view only),you can use
>
> MODIFY COMMAND FileName NOEDIT NOMENU &&this dont fire the saving messagebox
> 

>
> modi file :same thing,same message.
> modi memo works(linked to  a memo file):no message  but no coloring syntax here.
> 

> In past i seen a custom editing vfp window (gdi+XPAD)in this link
> http://weblogs.foxite.com/bernardbout/archive/2009/04/14/8096.aspx
> its from Bernard Bout but the source is an exe and then cannot access to code.I have answered BB on this...
> he used a command window (modi comm ) to retrieve some memo fields without any saving even when you type some things on (not saved).it have coloring syntax ,contextuel menu and intellisence.
> I hope BB answers you on this.
>
> i believe you can also use a richtextbox or a browser (designmode=on/off) for this goal.
>
> Regards
> Yousfi Benameur

Hi Yousfi,
Thanks for your help. WM_SYSCOMMAND is working for me

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