construction with mouse

Can I construct a box for example or a line not by giving digitals arguments in constructors but by selection with MOUSE in the screen?

thanks.

riadh bouallegue's picture

salut
je crois que C++ permet d'avoir comme entée des données de la souris,
et il en meme des fonction déja prétes;
WM_LBUTTONDOWN et
WM_LBUTTONDBCLIC........

va voir comment utiliser ses fonctions et y inserer les ogjets a dessiner.

riadh

Collin's picture

Yeah, English would have been nice. I'm sure more people on this list understand English than French.

Jean-Claude Demosthenidy's picture

Don't worry - I understand French and I can tell you that even if you don't, you have not missed much in this response.

Sharjith Naramparambath's picture

Hi,
You can do this in the InputEvent Function-You have to Convert the clicked mouse coordinates (X, Y)to 3d space coordinates(X, Y, Z) and construct gp_Pnt and do whatever you want further!
See The MFC samples for the InputEvent Function
All the best!

N Sharjith