Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Need to know about Controls and WndProc

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 26-06-2011
Member
 
Join Date: May 2011
Posts: 40
Need to know about Controls and WndProc
  

When I roll a window class to provide a callback function is traditionally called WndProc. All windows created from this window class will then receive message notifications by the way of this particular function WndProc. Windows controls such as Button and Tree View are predefined window classes that were never recorded and that means never provide a callback function WndProc for them. Instead it provides a window function WndProc father and then receives notification messages of control in place.

I wonder if there is never a need or a reason to define a WndProc of the checks. Is it possible (in a standard way without the excessive piracy)? I could not figure out. I know it's possible to subclass the WndProc of built-in control, but this is not the same as replacing it with a WndProc its own way of doing when registering a window class. Why is there this difference between the controls and their own window classes registered?

Reply With Quote
  #2  
Old 26-06-2011
Member
 
Join Date: Nov 2008
Posts: 1,192
Re: Need to know about Controls and WndProc

As per my knowledge I think Windows common controls have their own built-in window procedures just to make programmer's life easier much easier. However, it is possible that you can set your own application-defined procedures by Subclassing Controls or by Superclassing them. Well I have never tried this since I didn?t got chance to do this but I think that you must try it. Have self experience.
Reply With Quote
  #3  
Old 26-06-2011
Member
 
Join Date: Nov 2008
Posts: 996
Re: Need to know about Controls and WndProc

What do you mean by "replacement"? Sorry, I have no idea to what extent these techniques are used in the Windows software industry anyway, in my humble opinion, something beyond simple customization of some behavior must be considered advanced, since it involves the proper management and forwarding of all messages and classes / windows specific data to-be-sub/superclassed window procedure, often require the knowledge of its inner workings, thus introducing unwarranted links and code potentially unstable behavior.
Reply With Quote
  #4  
Old 26-06-2011
Member
 
Join Date: May 2008
Posts: 979
Re: Need to know about Controls and WndProc

No. I think in most cases the styles always control / messages / functions are sufficient. These are reasonable, but keep in mind that all non-trivial treatment of the control messages cause any reliance on the inner workings of control. in terms of standard C + + is concerned, no runtime check is needed to conduct in this case (and since the runtime controls has a cost I would say that a standard implementation should not act on this case), perhaps Microsoft's implementation of a check is made whether the assembly has set created?
Reply With Quote
  #5  
Old 26-06-2011
Member
 
Join Date: Nov 2008
Posts: 1,054
Re: Need to know about Controls and WndProc

You are the only troll here. Forums Sun / Oracle Java banished forever (finally) and now that has descended on Code Guru. But what we are seeing is that everyone here someome, who may be the most useful members in the forum, is much more tolerant and kind than they were in forumsof Oracle. This tolerance has its limits. You really do not want to prohibit other programming forum right?
Reply With Quote
  #6  
Old 26-06-2011
Member
 
Join Date: May 2008
Posts: 913
Re: Need to know about Controls and WndProc

I've never used written in this context, I know it throws an exception if the pointer is null, but I do not know how they are supposed to behave when the pointer and said mismatch types, especially when one is not a polymorph type. I suspect that it is undefined behavior in general. If my suspicion is true, then there is probably no way to make it portable. I hope you got what I am able to explain you.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Need to know about Controls and WndProc"
Thread Thread Starter Forum Replies Last Post
what controls a mouse? celafox Off Topic Chat 2 23-09-2010 01:15 PM
Rotating Controls in VB.NET GracieSingh Software Development 5 30-03-2010 12:06 AM
Who controls the internet? CACTUS101 Technology & Internet 3 23-11-2009 04:56 PM
C# code : WndProc method Kiran123 Software Development 4 05-02-2009 07:04 PM


All times are GMT +5.5. The time now is 08:27 PM.