Advertisement

need help with vc++

Started by February 28, 2003 02:38 PM
0 comments, last by manitoon 21 years, 8 months ago
i am trying to make a sort of graphical user interface . ok i can make a button in gdi or using directX . what i want is when the user clicks on the button another exe file would start running .. how can i do that .. ??
Well, this would be different depending on which language your using.

DirectX: You would use DirectInput and test for a mouse click event. then just have a nested loop wherein it tests if the mouse position falls within the area of the button. If TRUE, then run your .exe or call whatever Class, Function, etc you want. (* Read up on DirectInput in the SDK, or on MSDN *)

GDI: Just use MFC or Win 32 API, to create a button on the window, then its very easy to test the state of the button. ( * Read up on MFC and CButton * )
<=- Talon -=>

This topic is closed to new replies.

Advertisement