Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

.Net API Hooking or .Net Common Dialogs subclassing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pavel.gritsay@gmail.com - 03 Jul 2006 12:19 GMT
Hello everyone,

I have met a problem.
If anyone on Earth knows why does .NET 2.0 is subclassing Common
Dialogs' owner window, and why doesn't it set back the prevous WinProc
address when quiting but is calling DefWndProc directly???

Does MS think that none will subclass those dialogs for particular
needs? hmm...

The only way found was API hooking, just to hook SetWindowLong and
resubclass it again but here again MS comes into the scope, I could
find no chances to hook APIs, which were DLLImported.
Can you guys give me any suggestions?
Stoitcho Goutsev (100) - 04 Jul 2006 21:36 GMT
Hi,

If this is the case and if you know when microsoft's subclassing happens you
can try to subclass after. This way all the messages will go through your
WndProc first and then you can let MS code call the DefWndProc as they wish.

Signature

HTH
Stoitcho Goutsev (100)

> Hello everyone,
>
[quoted text clipped - 10 lines]
> find no chances to hook APIs, which were DLLImported.
> Can you guys give me any suggestions?
pavel.gritsay@gmail.com - 05 Jul 2006 10:30 GMT
Well, actually the problem is that I can not catch the moment when it's
unsubclassed.You see when closing common dialog removes the subclassing
and set the address of DefWinProc. This doesn't allow me to subclass it
again as I don't know when to do this.
A. Petrov - 05 Jul 2006 16:40 GMT
For some purposes you can try to use Dialog Workshop .NET components instead
of subclassing
These components are designed to replace standard Windows Forms dialog
components. Specifically,
you can add your own WinForm in the dialog (add your controls, preview pane,
etc.),
customize File list view control, add MRU files tab (like in VB6), etc.

Also each dialog can be displayed as modeless window or it can be inserted
as a child control in
your own Windows Form.

Supported dialogs: open/save, browse for folder, print, color, font, run,
about, page setup, etc.

Please visit for details:  http://www.componentage.com

Best regards,
Alex

> Hello everyone,
>
[quoted text clipped - 10 lines]
> find no chances to hook APIs, which were DLLImported.
> Can you guys give me any suggestions?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.