April 27, 200422 yr Hi all, I want to be able to left click on .bmp A, and as long as the left mouse button is held down, .bmpB will replace it. However, I want .bmpB to disappear and .bmpA to reappear when the left mouse button is released. Just one click of the left button.An example are the buttons on the default GPS. Click on one, and as long as the left mouse button is depressed, the button will be "in". Release and it goes back "out".Thanks, don
April 27, 200422 yr Hey Don. If we're talking about a C gauge, it's pretty simple. Start out with a MAKE_ICON macro set up to display the UP bitmap. You'll have a BOOL such as bMouseDown that will tell that element's callback that the mouse button is down. If the button is down, draw the 2nd one.For your mouse callback, you can use MOUSE_LEFTSINGLE to alert you when the button goes down, and MOUSE_LEFTRELEASE when it's released. The mouse function would check to see if the MOUSE_LEFTRELEASE or MOUSE_LEFTSINGLE bits are set in mouse_flags, using a bitwise AND.If you need some sample code, let me know. :-) Matt KaprockiFor fastest support, please submit a ticket at http://support.precisionmanuals.com
April 27, 200422 yr Thanks for the response Matt! But, no I'm not a programmer per se. Just an XML hacker that understands enough to get himself into trouble. I'm not even sure what a "macro" is (sort of know). But I think that is what Microsoft used in the default GPS. Take care, donp.s. You know you've been simming too much when you press on the button on the yoke of a real C172 and wonder why the trim is not working!
April 27, 200422 yr Hi,Try:(M:Event) 'LeftSingle' scmp 0 == if{ (your event 1) } (M:Event) 'Leave' scmp 0 == if{ (your event 2) } Jan"Beatus Ille Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
April 27, 200422 yr Don, This may help..(G:Var1)(M:Event) 'LeftSingle' scmp 0 == if{ DO SOMETHING and 1 (>G:Var1) } (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>G:Var1) }Regards,Romanhttp://home.new.rr.com/spokes2112/images/Image2.gif FS RTWR SHRS F-111 JoinFS Little Navmap
April 28, 200422 yr Thanks Jan and Roman for the responses! I guess I need to learn about M:events. I follow what you are doing, but what is scmp?Cheers, don
April 28, 200422 yr FS9 Panels_SDK:scmp Compares strings.if two strings are equal the result is 0.Arne Bartels
Create an account or sign in to comment