Link to home
Start Free TrialLog in
Avatar of manjunath_k_v
manjunath_k_v

asked on

view,messages and events

I have a dialog box that consists of two check boxes.I am calling my dialog box in a function named DRAWLINE.In this
function if one of the check boxes in the dialog box is checked then I ask for the coordinates to draw a line. this part is working.however if the other check box is checked then "OnLbuttonDown" function should get enabled.how can i
make it possible?.both functions ie.. drawline and onlbuttondown belong to the same view.
    Until this dialog box is called the view should not get enabled.how to make it possible?
Avatar of pagladasu
pagladasu

I would like you to clarify a few points:
DrawLine() is a member function of your view class. In this function you call the DoModal() function to display the dialog box. Here there are two check boxes. After your dialog box closes, in your DrawLine() function you somehow test the state of the check boxes and make calls to appropriate functions.
Are you trying to do this or trying to call the OnLbuttonDown() from the dialog box. Secondly what exactly do you mean by 'Until this dialog box is called the view should not get enabled' . Please clarify.

thanks
pagladasu
Avatar of manjunath_k_v

ASKER

  my view consists of the following functions. OnLButtonDown,OnMouseMove,OnLButtonUp and drawline. The first three corresponds to the message maps regarding mousemove.
In drawline i am calling dialogbox.
my dialog box has two check buttons named yes and no.i call this dialog box thru domodal()in the function drawline. if checkbox "yes" is checked I ask for the coordinates for the line.if checkbox "no" is checked then I must be able to draw the line in the view just by clicking the leftmousebutton and dragging the mouse.
my problem is i dont know how to connect my mouse movement with the dialog box called in drawline. Right now i am able to draw the line just by clicking the mouse an dragging.This i want to avoid.This is what i meant by saying my view should not get activated.
        I must be able to draw the line only after passing thru the dialogbox.
PLEASE HELP.
   
You see, the view must receive input focus for the drawing. In order to do so, you can close the dialog box the appropriate check box is checked.

ASKER CERTIFIED SOLUTION
Avatar of plaroche
plaroche

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial