winapi - Modeless Child Dialog -


I am making a modeled child communication from a parent communication class and I share the class data of my original window with everyone I want to make a child communication class, how do I do it?

There is a way to use it:

  set window longprint (H.W.D.P., GWLP_USRDATA, (LONDTTR) and parent-class);  

This parent will set the USERDATA field to be the parent class address on HWD. Then in your WM_INITDIALOG handler, call GetWindowLongPtr () back to your parent's HWND and return it to the correct indicator type.

A Better is the way to do this, and in your WM_INITDIALOG handler, you will get the value you got near dwInitParam Get in the area, which is your indicator of parent class.


Comments