Results 1 to 6 of 6

Thread: Need to know about Controls and WndProc

  1. #1
    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?

  2. #2
    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.

  3. #3
    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.

  4. #4
    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?

  5. #5
    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?

  6. #6
    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.

Similar Threads

  1. what controls a mouse?
    By celafox in forum Off Topic Chat
    Replies: 2
    Last Post: 23-09-2010, 01:15 PM
  2. Rotating Controls in VB.NET
    By GracieSingh in forum Software Development
    Replies: 5
    Last Post: 30-03-2010, 12:06 AM
  3. Who controls the internet?
    By CACTUS101 in forum Technology & Internet
    Replies: 3
    Last Post: 23-11-2009, 04:56 PM
  4. C# code : WndProc method
    By Kiran123 in forum Software Development
    Replies: 4
    Last Post: 05-02-2009, 07:04 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,045,789.19577 seconds with 17 queries