Labwindows forum


















So I wrote this little module to dump all the valid attributes off a panel or control. It just prints them all. Two source files: ShowAttributes. H ave you ever noticed that in the user interface editor you can move between panels using Ctrl-shift and the left or right arrow? Well, here's a little piece of code that allows you to do the same thing in your C programs. In addition it will print or center your panels on request. Note that on Linux the keymaps are a bit different so you may want to verify them.

In this small source code, you'll also find functions to handle default keys print, screenshot O K, so there are several predefined popups, like ConfirmPopup or GeneralPopup that you can call, and they will return the button clicked by the user. I mulled that one over for a while, until a suggestion from Martin J.

Saxon: the trick is to call RunUserInterface again Here's another example which allows you to change the format, precision and padding of a numeric control. Note: you may be thinking about doing the same for a graph properties popup, but this is largely done already if you use legends and enable [Interactive Legend].

And yet another example which allows you to change the format, precision and a few other attributes to a graph axis. And yet another example which allows you to change some cosmetics on a slider popup, including the ramp colors, needle width, etc. T here are many default events in LabWindows, but some are missing.

For instance you can drag and drop files from explorer onto a panel only if you call the EnableDragAndDrop function. Something else that is sometimes necessary is shift-click, ctrl-click and alt-click. The code is below. The thing I haven't been able to figure out yet is how to separate and get the coordinates of mouse-down and mouse-up on a canvas, which is necessary for drawing a box for instance. Another trick that has to do with user input is to regroup the keyboard events to the top panel.

For instance if you have a child or separate panel that catches a few keyboard event but you want all other keyboard events to go to the main one useful for instance if the menu bar is only on the main panel , do the following in the child panel callback function:.

The problem is that the data must be sent to the strip chart precisely 1s apart. Thus you cannot use a timer which lacks the precision. So I wrote this set of functions which writes the dates as text labels on the axis. It should work with an arbitrary number of strip charts at the same time.

That's about all there is to it, even if the data comes at non-deterministic intervals. It depends on the session you're logged on, on the computer, etc For instance, 3Dx devices message numbers are and on two different windows sessions So is there a simple way to get this windows message number programmatically during the 3Dx initialisation, or is there a workaraound that I may use Thanks a lot for any help. Post by jwick » Wed Sep 07, pm It is a registered Windows message.

You need to look it up each time the program starts. It will be consistent while your program is running. There is some sample code in the html documentation that comes with the SDK that you can copy. I haven't seen many LabWindows users 'round here, but if it may help, I will post here a code skeleton that I use to handle 3D mouses in LabWindows. Many thanks again! Post by jwick » Wed Sep 07, pm That would be terrific if you would post a sample skeleton. Also if you could give the device a kind word on the LabWindows forums, that might bring people over.



0コメント

  • 1000 / 1000