Use the toggle button to simulate the Ctrl key now

Hello

I saw someone asked something very similar before, but nobody seemed to know the solution.

I was wondering if it is possible to use a toggle button to simulate the CTRL key now, the idea being that the user could then zoom in on a rectangle of their choice on a field without having to press the button themselves. I know that you can use the FakeKeystroke function to simulate support that the key however is possible that it may be held?

Thank you

I forgot one thing. You must handle the case when you have a real EVENT_DOUBLE_CLICK. In this case, you don't want to reset the keyboardState. Here's the modified code.

char oldKeyState [256] = {0};
char newKeyState [256] = {0};
int isFakeDouble = 0;

Zoom CVICALLBACK int (int, int int event, control panel,
void * callbackData, int eventData1, int eventData2)
{
HWND hwnd;
toggleButton int = 0;
switch (event)
{
case EVENT_LEFT_CLICK:

get the current state of the keyboard
GetKeyboardState (oldKeyState);
get the State of the toggle button
GetCtrlVal (panelHandle, PANEL_TOGGLEBUTTON, & toggleButton);

If (ToggleButton)
{
create the new copy of the keystate
memcpy (newKeyState, oldKeyState, 1);

Active control key.
newKeyState [VK_CONTROL] = 128;
SetKeyboardState (newKeyState);

generate left mouse button events that will be holding the CTRL active
SetActiveCtrl (panelHandle, PANEL_GRAPH);
GetPanelAttribute (panelHandle, ATTR_SYSTEM_WINDOW_HANDLE, (intptr_t *) &hwnd);)
isFakeDouble = 1;
SendMessage (hwnd, WM_LBUTTONDOWN, 0, 0);
isFakeDouble = 0;
}

break;
case EVENT_LEFT_DOUBLE_CLICK:

mouse event generated will be taken as a double click. restore the old state of the keyboard
If (isFakeDouble)
SetKeyboardState (oldKeyState);

break;
}
return 0;
}

Tags: NI Software

Similar Questions

  • Accents by using the Ctrl key

    Hi, I asked this same question a couple of days and got a response very quickly M Murphy.  Thank you, Mike.  I can [t find my original question, so I'm he reiterate here, but in a different way: how to regain control, apostrophe + vowel that allows me to enter foreign characters?]  The feature seems to have disappeared from my keyboard.  Mike suggested to do a system restore, but because moyenessentiel is now a few months, I don't think it will work for me.

    Using the control key is the best way for me to work with accents and other diacritics.  Go to the 'symbol' command and manually insert an accent mark or using Alt + clumsy series of numbers is not the best way for me to use accents.

    Hopoefully someone can help me learn how to restore the use of accents with the command apostrophe + vowel?

    http://social.answers.Microsoft.com/forums/en-us/vistahardware/thread/cbb6408d-F9C7-438d-96fa-83190ba03d60/#eb7c83be-6FB6-4727-B635-2b218b004473

    Above is the link to your original question, if you need.

    See you soon.

    Mick Murphy - Microsoft partner

  • multiple selection in listbox without using the ctrl key

    Hello

    I wanted to know if it is possible to select multiple items in a listbox without using ctrl or SHIFT key. I write code for a touch screen application and you want to activate the user select more than one entry in a listbox control.

    I saw a similar post that had a solution for a tree control. Is it possible to do the same thing for a listbox control too?

    Pavitra-

    I saved to the audit zip file previous version

  • Why all my keyboard shortcuts use the 'Alt' key instead of the ' CTRL '? I use Windows 7 and Firefox 5.0.1.

    I recently downloaded Firefox 5 and noticed that all my keyboard shortcuts by default using the 'Alt' key instead of the 'Ctrl' key (so, for example, open a new tab is Alt + T instead of Ctrl + T).

    I noticed that this applies even to copy and paste in Firefox (Alt + C and Alt + P is the only commands that work).

    No idea why this is happening? I am running Windows 7 and Firefox 5.0.1.

    I had this problem. I found that a roaming profile directory has been installed which contained a user.js file in which changed the hotkey of CTRL ALT.
    I deleted the profile folder a name randomly in c:/Users / [myuser] / AppData/Roaming/Mozilla/Firefox/Profiles and then I stuck to that of c:/Users / [myuser] / AppData/Local/Mozilla/Firefox/Profiles.

    This bad user.js file was some other parameters, including the definition of the user agent string
    "Mozilla/5.0 (X 11;" U; Linux i686; en-US; RV:1.0.0; (Salut, maman) gecko/20020604 "

    The user.js file is (or similar to) those listed here: https://www-archive.mozilla.org/unix/customizing.html

  • When I click on anything it either in the Outlook Express Preview window to stop answer and I have use the ctrl-alt-del combination for her all over again.

    When I click on anything it either in the Outlook Express Preview window to stop answer and I have use the ctrl-alt-del combination for her all over again. Anyone out there have the same problem? If so what did you do about it.

    Original title: I'm under Oulook Express 6 Windows XP Home SP3 environment.

    Bruce:

    The problem has been fixed (I think) but in a most unusual way. Let me explain.

    When I was closing down to give the computer a rest yesterday, there was a pop up saying that vprotector expected to close. He really wanted the process of closing until I clicked on finish the process. Curious to know what vprotector is, I searched on the net and got a lot of shots, saying: it is a virus and should be deleted pronto. So I searched the hard drive for the vprot. * and found in the folder program files for AVG!

    I then went to AVG to see if it's really a part of AVG and they said yes. If there is a problem with vprot, the toolbar is at fault and needs to be reinstalled. There was one click here to download and run the part of the program to fix the problem. However, I had WebRoot antivirus running that stopped the download of this program as a virus. Because I trust AVG, I've disabled WebRoot and reinstalled the AVG search bar.

    I haven't restarted WebRoot and computer flying along as it should, and OE is the link to IE when I click on a link as it has always done.

    Seems to me to be the faulty AVG toolbar and a cross with two virus programs upward was at fault. Thank you for your time. Your reply gave me a chance to think differently this problem could arise.

    Computers are really complicated machines and we have to be complicated to deal with their problems.

    Thanks again,

    Fred

  • How can I move precisely image in the monitor by using the arrow keys?

    I am currently using first 13 items on my desktop Windows 10. When I use the special effects of culture, I am able to precisely position the top, down, left and right limiters by typing in a decimal percentages. It works very well, especially when you try to manually move the limiter in the monitor by holding down the left mouse button and dragging. Enter the percentage allows the adjustment takes place easily.

    However, I was unable to find a similar positioning tool for when I want to move the image in the monitor. The only way I know to move the image currently is holding down the left mouse button and dragging the image. What would be the most direct and intuitive way (for me) to precisely move the image, once you left mouse clicked on the clip to show the white frame with its 8 small white squares, simply hold the CTRL key, and then use the 4 arrows to position the image. However, holding the CTRL key and pressing the keys 4 arrow do not work, or not keeping the Alt key and pressing the key 4 arrow, nor does not hold down Shift Ctrl, shift, or Ctrl Alt Shift For me, it would help greatly to a precise positioning, if I could hold the CTRL key and press the arrow key should be.

    Anyone happen to know how to position an image in the monitor otherwise than by holding down the left mouse button and dragging the image where you want?

    Thank you

    With the clip selected on your calendar, click effects applied on the right side of the interface.

    In the effects Panel, open the path properties. Here you can define the Position and the scale and Rotation of your clip. You can also effects and keyframe animated trajectories.

  • Texas use faith E-mail window displays tiny fonts after using the function key can not reverse

    Open E-mail c - faith and tried to highlight several entries by maintaining control. When I did the font on the page became so small it is not readable. How do I reverse this order?

    Zoom on the page can be changed by pressing the Ctrl key while using the mouse wheel to scroll.

    To reset the Zoom of Page - press on and hold the Ctrl key while pressing 0 to reset. Is the zero key number.

  • Why can I not use the tab key to highlight the links on a Web page?

    In previous versions of FF and in other browsers, I use the tab key to navigate through all the links on a Web page - I can't do this with FF5, the tab key will highlight only the address bar, search bar, and any form of fields on a Web page.

    Using the button tab to navigate through the links on a page is an accessibility feature, and I use it often to display links to jump hidden at the top of a Web page for users who prefer the keyboard on a mouse and assistive technologies.

    Is this something that can be turned on in the preferences? Or is there a reason why it has been removed from this version?

    It can be fixed in Mac OS X Tiger preferences (keyboard-> "all controls") or try a ctr - F7

  • Using the FN keys without flash cards

    Hello everyone

    I wonder if its possible to use the FN keys without toshiba flash cards on the top of the screen and therefore without having to install the value-added package?

    Some FN keys like brightness, mute, switch the display and sleep work without VAP
    but I also enabled WiFi, touchpad switch, mode switching power, buttons, which do not zoom

    Yet once, I don't want this utility to flash, still running cards and consumption of ram

    As far as I know something like this is not possible and if you have FN feature flash card utility must be running in the background.
    This along with the consumption of RAM is funny to me because if you turn it off you won't see any difference in the performance of the computer.

    Maybe you should disable some other background process unnecessary that you don't need.
    If you have the new model laptop with Win7 they have enough RAM for all operations and execution of flash cards will not have much influence on the performance of the computer.

  • Print layout on screen rotation when you use the arrow keys

    I must have accidentally pressed a wrong key combination.  Now, when I use the arrow keys on the keyboard while typing of text, orientation changes screen, according to which key I hit it, I hit the down arrow, the text on the printed page rotates 180 degrees.

    How can I fix it?

    Biggar Gordon

    Houston, Texas

    Thanks for your reply.

    I googled the question of fun and learned you can hit CTRL + Alt + an arrow key to change the direction of the display on the monitor.  Pressing on the same new keys cancels the function.  I must have accidentally done to create the mess in the first place.

    I've done the same thing if I had rebooted the system.

    Thank you very much!

    Biggar Gordon

  • When I click the Ctrl key and click on the left at the same time a circle appears around the element that my mouse is placed on it. I want to stop. How do I do that?

    I often use my computer for demonstration software. When that someone turned on the feature of having one zero circle on this point I am pointing to and activated by Ctrl-left click but I have no idea how turn it off.

    Help!

    Thank you

    Type 'mouse' in the 'Search' box and press ENTER. Click "Pointer Options" and uncheck the box "see the position of the pointer when I press the CTRL key".

  • When I use the delete key, it does not delete anything, instead, he types a period. How can I remove text by using the delete key?

    When I hit the button Delete, all I get is a period. Does not, delete just leave behind it a period. How to delete using the delete key, without the period?

    Hello

     
    1 What is the problem occurs with a specific program?
    2. What is the brand and model of the keyboard?
     
    You must select the text you want to delete and press on "remove". "."

    Answer us with more information so that we can better help you.

    Thank you.
  • Re-install Windows 7 Professional by using the product key?

    Original title: Windows 7 Professional.

    Hello

    I just bought a pc that was advertised on facebook, he has Windows 7 Professional installed, I asked if he had the drive, but I was told that it has been installed by a computer scientist with a purchased product key.

    I want to reformat the h/d and to reinstall the software, how can I do this using the product key?

    Concerning

    TonyB76

    Hello Tony

    It depends on the type of license that is on the PC. to determine this, the simplest method is to run the MGADiag tool:

    Download MGADiag (by Microsoft) from the link below:

    http://go.Microsoft.com/fwlink/?LinkId=52012

    Run the tool by double-clicking the file. Press to continue when prompted

    When it is finished, press on copy and then paste (Ctrl + V) in your next post please

    Please also indicate which version of windows is mentioned on your COA sticker (if you have one) but do not publish the key.

    http://www.Microsoft.com/en-us/howtotell/hardware.aspx

  • Can't use the product key, because 2 of the numbers/letters have rubbed off and I can't read them. What should I do?

    My computer crashed and now I have to put in my product key for microsoft. The only problem is that 2 of the numbers/letters have rubbed off and I can't read them. What should I do?

    Original title: product key

    Option 1:

    If the COA sticker is damaged, you must use the recovery partition to reinstall Windows 7, it will be exempt from the need to use the product key to activate your installation of Windows 7.

    Option 2:

    If your recovery partition is not available or damaged, you must contact the manufacturer of your computer, and request that a defined recovery disk you can use to reinstall Windows 7. They could practice a small shipping and handling. This will exempt the need to also use the product key.

    Option 3:

    If neither options 1 or 2 is possible, then you will need to invest in a new license of full version of detail.

    New computers coming often pre-installed with Windows 7 have what is called a recovery partition. This is used to reinstall an operating system in the case of a system failure. To access it, you need to start when you start your computer by pressing a function key. This can be either F1, F2, F9, F10, F11, F12 key DEL or tab. See the manual that came with your PC for instructions on how to reinstall Windows.

    This is how the recovery partition is accessible to most popular brands...

    For Dell, press CTRL + F11 directly after switching on the device

    For HP, press F11 directly after switching on the device

    For LG, press F11 directly after switching on the device

    For Toshiba, press and hold "0" BEFORE and during the power upward

    For Acer, press and hold ALT + F10, as soon as you see the logo

    For Asus, press F9, as soon as you see the Asus logo.

    For Samsung, press F4 to the power upward...

    For Fujitsu, press the F8 key directly after the power

    Advent, restart your computer. Then, press F10 repeatedly until the message "Starting system recovery"

    Sony VAIO, reboot and press "F8" or "F10" repeatedly until the screen "Advanced Boot Options".

  • Can I use the product key to my Home Premium pre installed windows 7 64-bit OS that are in my label of windows laptop back?

    I downloaded the iso file of windows 7 Home premium 64-bit. can I use the product key to my Home Premium pre installed windows 7 64-bit OS that are in my label of windows laptop back...

    Original title: the Windows 7 product key

    Yes you can. To learn more:

    http://techingiteasy.WordPress.com/2012/04/13/how-to-activate-Windows-7-OEM-license-using-a-retail-disc/

    If your computer is pre-installed with Windows 7 Home Premium, you should have a recovery if partition:

    New computers coming often pre-installed with Windows 7 have what is called a recovery partition. This is used to reinstall an operating system in the case of a system failure. To access it, you need to start when you start your computer by pressing a function key. This can be either F1, F2, F9, F10, F11, F12 key DEL or tab. See the manual that came with your PC for instructions on how to reinstall Windows.

    This is how the recovery partition is accessible to most popular brands...

    For Dell, press CTRL + F11 directly after switching on the device

    For HP, press F11 directly after switching on the device

    For LG, press F11 directly after switching on the device

    For Toshiba, press and hold "0" BEFORE and during the power upward

    For Acer, press and hold ALT + F10, as soon as you see the logo

    For Asus, press F9, as soon as you see the Asus logo.

    For Samsung, press F4 to the power upward...

    For Fujitsu, press the F8 key directly after the power

    Advent, restart your computer. Then, press F10 repeatedly until the message "Starting system recovery"

    Sony VAIO, reboot and press "F8" or "F10" repeatedly until the screen "Advanced Boot Options".

    ------------------------

    If the recovery partition is damaged or does not, you can then use the downloaded Home Premium as an alternative.

Maybe you are looking for

  • How can I uninstall ePrint from my computer?

    I downloaded ePrint for Windows 8, and now I can't print. It's ridiculous! My printer is a HP Laserjet P1006 and when I try to print a document, my printer don't even show up as an option. My printer does not support ePrint. I want things to what the

  • Flex15 keyboard backlighting

    Hello I just bought a Lenovo Flex15 Ultrabook. I can not activate the backlight for the keyboard. All the drivers are installed.I tried fn + space, but nothing happens. How can I activate the backlight for the keyboard?

  • Hotmail registration problem

    I connect to hotmail with screen name and a password, but it will never through. Then finally says "Internet Explorer cannot display etc.."

  • Error 345?

    I installed the Sims 3 - Ambitions, but when I try to play there is an "error 345. What can I do?

  • LabVIEW 8.6 Build ends immediately with any executable file

    Hi all By reading the subject line, I'm going to venture that many of you are probably thinking I screwed up my spec to build, but I don't think I did. : smileywink: (I'll be really embarrassed if that's the case) I just opened a project, LabVIEW 8.5