| | |
Accessing a form's "close" button using win32 API
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2009
Posts: 7
Reputation:
Solved Threads: 0
Hello all, I recently was assigned to a project that requires me to take an unorthodox approach to handling a web page. I have been using win32 API calls such FindWindowEx() and SendMessage() to access dialog boxes and the buttons within. Everything has been running smoothly except for the final call I have to make. At this point I am done with the dialog box and I want to close it. I have tried using the standard approach for finding the window and button inside (a FindWindowEX() using the title of the window, then using FindWindowEx() to get the handle of the button I'm trying to activate), however this isn't working. I have also tried using the destroyWindow() function on the handle, which returns a bool indicating whether or not the destroy was successful.
I was wondering if maybe every window has access to a close or exit button of some kind. So far I've tried {close, &close, c&lose, exit, &exit, e&xit}, none of which return a valid handle.
Any ideas?
I was wondering if maybe every window has access to a close or exit button of some kind. So far I've tried {close, &close, c&lose, exit, &exit, e&xit}, none of which return a valid handle.
Any ideas?
Last edited by adamf07; Jun 5th, 2009 at 8:38 pm.
Have you tried using Spy++? Check out this article: http://www.c-sharpcorner.com/UploadF...ingCSharp.aspx
-Ryan Hoffman
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
•
•
Join Date: Jun 2009
Posts: 7
Reputation:
Solved Threads: 0
•
•
•
•
Have you tried using Spy++? Check out this article: http://www.c-sharpcorner.com/UploadF...ingCSharp.aspx
Cool. If you don't know how to get Spy++, I believe I read that it is included in the Windows SDK.
-Ryan Hoffman
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
![]() |
Similar Threads
- Win32 API Input/Output Question (C++)
- using WIN32 API "CopyFile" (C++)
- Creating A Table With Win32 Api (C++)
- Having some problems with "stdio.h" in win32 (C++)
- anyone understand win32 api? (C)
- Can't remove "about:blank" homepage. Please help. (Viruses, Spyware and other Nasties)
- Internet Explorer "... needs to close" (Web Browsers)
Other Threads in the C# Forum
- Previous Thread: Decompress large file
- Next Thread: Writing Bits with c#
| Thread Tools | Search this Thread |
.net access algorithm api array asp.net barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom database databaseconnection datagrid datagridview dataset datetime dbconnection degrees design development draganddrop drawing encryption enum event eventhandlers excel file firefox form format forms function gdi+ httpwebrequest image index input install java label libraries list listbox loop mandelbrot marshalbyrefobject math mouseclick movingimage mysql mysql.data.client operator path photoshop php picturebox pixelinversion post programming radians regex remote remoting resourcefile richtextbox server sleep socket sql statistics stream string study system.servicemodel table tcpclientchannel text textbox thread time timer update usercontrol validation visualstudio webbrowser windows winforms wpf xml





