c++ - Mouse message handling in win32 -


enter image description here

when user clicks on window b window c becomes visible.

situation 1 : while window c visible , user clicks anywhere on window or b or other child windows of window a, window c becomes invisible.

situation 2 : while window c visible , user clicks on window c program few things , makes window c invisible. [window c has more child windows]

how achieve functionality ?

the setcapture won't work situation 2.

in window b got, works situation 1, not situation 2.

lresult windowb::lbuttondown ( hwnd hwnd, uint message, wparam wparam, lparam lparam ) {     if ( !capture )     {         ::setcapture ( hwnd );         capture = true;         windowc->show (  );     }     else     {         ::releasecapture (  );         capture = false;         windowc->hide (  );     }     return 0; }; 

p.s : using pure winapi oop c++, , own wrapper windows , message handling.

edit: more code added requested.

lresult windowc::lbutton ( uint message, wparam wparam, lparam lparam ) {       dostuff (  );      ::postmessage (  hparent, wm_command, wparam ( bn_clicked ), lparam ( hwnd )  );      return 0;   }; 


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -