C++ application loses Focus

I have a Visual C++ application that sends a file to a machine of communication via RS232 connection.  To do this, there is a WM_TIMER loop that sends the junks of the file at a time.  Also, there is a dialog box with a cancel, button program button and the display of the percentage of the file that was sent. By pressing the button of show begins the WM_TIMER loop.  If I click on the dialog box (i.e. the dialogue loses focus) after the show button has been pressed, I'm unable to get the focus to the application.  The percentage of display sometimes also stops change even if the file continues to transmit.

Can someone help me out here?
Thank you
Mary

Hello

Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the MSDN Developer audience. Please ask your question in the following forum.

Visual C++ General Forum:

http://social.msdn.Microsoft.com/forums/en-us/vcgeneral/threads

Concerning

Tags: Windows

Similar Questions

  • Application loses focus when clicked outside the region

    Hello.

    We have created the apex 4.2.5 application.

    Application has a small region (quarter of the screen space).

    When the user clicks outside this region, application loses focus.

    Is it possible to disable click outside the region, or when you click on it on the outside, place the cursor on the element in the region?

    Thank you.

    Kind regards

    Dejan

    AAAAA, he found myself (dynamic action).

    Thanks anyway.

    Kind regards

    Dejan

  • Application loses focus while typing

    Hello!

    While that I m writing this post this application just lost the focous and I write...
    So, I click on the application to continue to write.

    It seems that the computer change automaticaly focous asks the other.

    Sometimes I m reading a Web page and when I try to scroll doesen´t scroll because the losted the focous application and I again have to click anywhere on the web page to get the focous even once, and then I can scroll.

    I hope you can understand my question.

    Thank you
    Dominick

    Hello

    I m bit confused.

    Could you please put some essential details:
    What is your laptop model?
    What system do you use?
    The issue of the update appears while the touchpad is disabled?
    The issue of the update appears with different software for example MS Word or other internet browsers such as Firefox or Chrome?

    Please check that and post the info!

  • Active window loses focus when I hit and I lose my typing - HELP!

    I had a persistent problem with the current window/application loses focus as I type.  Sometimes it is, and sometimes I have to click on the window where I typed back to typing.  It is extremely annoying and cause me to be less productive.  I ran the antivirus, malware analysis controls, spyware checks, etc.  I noticed that I have an amazing amount of background running processes.  My guess is that it is the cause of my problem.  Any help would be appreciated.  BTW, happened to be at least 15 times while I typed this short note.

    Hi Lasbury,

    What software changes you did on the computer before the show?

     
    Follow the method below:
     
    Method 1:
     
    Step 1: Start in safe mode with network and see if the issue
    persists.
     
    See startup options (including safe mode) for instructions on
    boot in safe mode with network.
     
    Step 2: If the problem does not occur in safe mode, turn on the computer in
    clean start State and check if the problem is due to a third party
    program/app or not.
     
    Clean boot will help you determine what third party/PPP program is originally
    in this issue.
    http://support.Microsoft.com/kb/929135

    Note: After the boot minimum troubleshooting step, refer to the section
    "How to reset the computer to start as usual after troubleshooting with."
    clean boot
    "in the link provided to get your computer back to normal."
    start mode.

    Please respond with the State of the question, so that we could help you
    better.
     
    Thank you.
     
     
     
  • Assignment of an element of the application when an element loses focus

    I'm trying to implement this feature in my APEX application:
    When the user enters a value in a text element loses focus, a RadioGroup on the form should be greyed out.
    But the problem is that I need to access the value of the RadioGroup so that the code which is then executed to work properly, but that the value is therefore more accessible if the RadioGroup is disabled.
    So I thought that if I put the value of the Radio group in an application-level element before I turn it off, the code can access the value.
    But how can I do this? It must arrive at the point where a value is entered in the text element and the focus is lost.
    But, as far as I know, the only thing I can implement at this time there is an onblur statement that calls a Javascript function.
    And I don't think I can assign a value to a javascript application-level item, can I?
    Bottom line: I need a way of executing the command
    : F100_Category: =: P1_Category (where P1_Category is the RadioGroup) - what it does to a place in time.
    Any ideas?

    'FALSE' must be all lowercase as 'false '. Without the quotes are necessary

    CITY

    Published by: City aissaoui on December 10, 2008 11:07

  • Active window loses focus

    All past this problem recently. It began not with an upgrade of the OS, if I had just restarted the computer after having been passed away on a trip.

    The active window, I have been working in suddenly loses focus, sometimes in the middle of a Word, I care. A moment I am typing away and all goes well and the next moment every keystroke causes a "thunk" sound effect and I look for my strikes were not registered and the three tasks in the upper left corner color (buttons close, reduce and fullscreen) are grayed out. I do a mouse click in the window to make it active again, and all is well for a while until that happens some time later.

    OS X 10.11.3

    iMac, retina 4K, 21.5 inches, end of 2015

    When you find the problem, note the exact time: hour, minute, second.

    These must be run as administrator. If you have only one user account, you are the administrator.

    Run the Console application in one of the following ways:

    ☞ Enter the first letters of his name in a Spotlight search. Select from the results (it should be at the top).

    ☞ In the Finder, select go utilities ▹ of menu bar or press the combination of keys shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad and start typing the name.

    The title of the Console window should be all Messages. If it isn't, select

    SYSTEM LOG QUERIES ▹ all Messages

    in the list of logs on the left. If you don't see this list, select

    List of newspapers seen ▹ display

    in the menu at the top of the screen bar.

    Each message in the journal begins with the date and time when it was entered. Highlight date back to the time you noted above.

    Select the messages entered since then until the end of the episode, or until they begin to repeat, whichever comes first.

    Copy messages to the Clipboard by pressing Control-C key combination. Paste into a reply to this message by pressing command + V.

    The journal contains a large amount of information, almost all this is useless to solve any particular problem. When you post a journal excerpt, be selective. A few dozen lines are almost always more than enough.

    Please don't dump blindly thousands of lines in the journal in this discussion.

    Please do not post screenshots of log messages - text poster.

    Some private information, such as your name, may appear in the log. Anonymize before posting.

    When you post the journal excerpt, an error message may appear on the web page: "you include content in your post that is not allowed", or "the message contains invalid characters." It's a bug in the forum software. Thanks for posting the text on Pastebin, then post here a link to the page you created.

    If you have an account on Pastebin, please do not select private in exposure menu to paste on the page, because no one else that you will be able to see it.

  • 'successful test' window loses focus

    I use a slightly modified version of the example LabView Simple Interface operator vi. I use this for the user to choose what sequence of test to run.

    The problem I have is that many of the standard popups OR keep loses focus when they appear: the "serial number enter DUT" test pass/failure/end of window and Save_As for printing test reports, are all the standard windows OR this presentation pop up and then disappear because the thumb behind the main window of Labview vi.

    I have to use ALT + Tab to scroll through windows and return to any pop-up window lost focus. And the problem is that my client does not accept this!

    Any ideas?

    Thanks in advance,

    Ian

    Hey Ian,.

    I know that you can make a window in labview come forward with nodes of property and a VI the value application server reference. It works within the bodies of labview, but does not retain the focus by other programs. Either does not have a window in front of internet Explorer just to other windows in labview.

    I continue to experiment to find if another parameter will do what you want better. At the same time, it's a start for you to try as well. Let me know how you go with it.

    Matt

  • Windows 7 full screen games and desktop applications losing focus and stealing discussion questions

    NOTE: The updates at the top of this announcement, the original message is less than.

    UPDATES: here are a few updates and new information that I have gained since the original publication.

    Registry settings

    After doing a lot of reading, I found some registry settings that appear to solve some of the problems I see. All three were found in HKEY_CURRENT_USER-> Panel-> Desktop

    ForegroundLockTimeout: Has been reset for some reason any. I removed the key and restarted, but he is back to zero. This is why I looked at the default value of 200000 (decimal) and set it. After that, he stayed. \

    I saw two other keys HungAppTimeout, WaitToKillServiceTimeout, and WaitToKillAppTimeout and all have been set to zero. I deleted these registered.

    I have no idea what set these registry keys to zero, but after being put into default, I can now click on an application full screen reduced, and he returned immediately. I can still lose focus in full screen or desktop app, but not as often as before and now he is usually just badly behaved apps stealing focus rather than seemingly random events.

    I wonder if there is a patch that has changed these values, or a settings option that does. From what I read, they are sometimes twisted to allow faster restart and stop servers.  I don't have a software that would be while and manually set their and none have the people I know. One of them has confirmed that their box also has these set values zero and has no idea why.

    I hope this information is useful to other people with odd focus problems.

    ORIGINAL POST FOLLOWS *.

    I have a problem in Windows 7, which at first I thought a number of different problems, but I am more convinced that they are all connected.

    All of them started to happen around the same time - late January or February after a Windows Update - and largely the same or very similar issues affect 3 of my friends and co-workers running Vista and 7. Unfortunately my notes on the update happened while the time are missing, but all 4 of us have seen questions start at the beginning of the year in the January/February calendar, which makes it seem like they should be linked.

    NOTE: There were a few minor problems before even with the update, but nothing like what happened in early 2011. I had problems to update with Vista and 7 alone, but they were rare and sometimes fixable with registry hacks or it was an offending program, something did not like Aero, etc..  The questions below got a lot worse in early 2011 so they appear together in this post.

    I will describe each problem separately and the affected BONE and the symptoms, and I hope that some can make sense and help me solve the problem. Major problems first, then a few small problems and measures that I took to the to check follow after. Sorry for the long post, but it's a maddening problem affecting many people, and I want to be as complete as possible.

    Games not switching and the apps full screen #1: if I'm in a game fullscreen and I go to the office, it is very difficult to go back. If I click on the taskbar icon, nothing happens. I have to click on it repeatedly, often a dozen times or more before the application full screen or game is restored. It is most often with the games. Full screen I don't want not maximized, I mean where a program takes the entire screen. Games is easier to reproduce so far have all I currently use the question and variances in how it is difficult to come back in full screen are not significant between them.

    Apps full screen #2 focus lost: this happens especially to my friend running Vista, when you play the game full screen. She will play something like the Lord of the Rings Online and she loses the keyboard focus and the mouse, but the game is always full screen. Usually the only way that she can solve the problem is to use CTRL-ALT-DEL to bring up the Task Manager, which for some reason solves the problem and she can return to the game for a little while that. I run Windows 7 with another couple of friends and we can also see this question, it is much less common. Changing an old mouse seems correct for Vista for some reason any. 7 that it happens rarely, if hard to duplicate to see if changing the mouse would help. In any case, will and against a beautiful new mouse laser mouse is usually a horrible option.

    Office applications #3 lose focus: it affects two of us under Vista and 7. We will be typing in chat, email, anything... and the foreground app will lose focus. What catches there that is impossible to determine. In my case, I can occasionally see a taskbar popup button and then disappear immediately, but I have never been able to track it down. Running in safe mode or boot seems to have no effect on this, or disable all services, extension and program but by default Microsoft in Windows 7 and Vista. Its almost like a Microsoft program is to do. Also, even though I mentioned the taskbar icon appears briefly from time to time, which cannot be bound: it does not always coincide with the loss of focus and is not always present when the focus is lost.

    #4 desktop applications lose keyboard focus and the mouse: it's like the number #2 above, but happens at the level of the office. Unlike the #3 that the window does not lose focus, it is always in the foreground, but keyboard and mouse stop working. It is usually impossible to move to another window. Just like #2, the solution that we have so far is to use CTRL-ALT-DEL to switch to the Task Manager, which temporarily solves the problem. ALT-tab through windows does not work.

    Here are other minor problems that may or may be linked, because they seemed too much to start with.

    Switching away applications full screen takes more time: Windows 7 on my machine, switching off games full screen takes more time than he did in the past. It was a minor issue in autumn 2010 and became much worse early 2011.

    Some windows lost focus while being re-size: if I take the corner of some windows for re - size, sometimes the re-size operation stops until I release the mouse button, as if he has lost the focus. Color of the window indicates usually focus however is still there, and grabbing the corner once again we will move me a little more. It may take several tries to get the window size as I want, as the re-size operation closes several times before I release the mouse button. This affects only 2 of the 4 people I talk so much that I can tell from our conversations and shared between Vista and 7. Both of us have Logitech mouse it might even be a driver problem, but using a mouse cheap test has not fixed the problem with me.

    Firefox: Firefox repeatedly will "dim", where Aero makes the window lose color to indicate that the application is not responding. It didn't happen before January 2011 for any version of Firefox.

    Concrete results to track down the problem:

    I ran programs like WhatHang and others who are trying to catch the programs that are suspended, stealing focus, etc.. Hours of testing found no results except that Firefox crashes frequently. Disable Firefox doesn't solve all the issues however, so I guess that its not related.

    I tried booting safe and clean, and they have had no effect. Secure boot is rather useless since I can not usually run programs that show the problem more easily. I also tried turning off everything except what comes with Windows 7, and it had no significant effect.

    I tried to use a different mouse. While it helped a bit with one of my friends, it only helped me so far. Different mouse drivers do not seem to help either. I also tried various nVidia without significant information acquired or corrective drivers.

    I also ran through various other ideas here as the race of the file system scanner and so on and not found any problems with my system, and where I could help my friends do and they also found nothing of note with maintenance and verification tools.

    My friends and co-workers: most of them are not local to me, so my focus of their issue has been rather limited. The main thing that we all have in common is that we had some minor problems in the past, as in 2010, and they've all got a lot worse in early 2011. Unfortunately none of us kept of records accurate enough to indicate any special updates that might have caused it.

    In any case, I apologize for the log message, but this issue emphasis is maddening. Its become a frustration serious then I thought to post information on the problems which seem related would be the more useful approach.

    I am a graduate of comp-sci systems and a companion systems programmer, and I have tried everything I can think of to debug and isolate problems, symptoms, etc. and had no chance. My friends are usually illiterate computer so that they are even more perplexed and frustrated by this problem. In my reading the forums, I see a lot of Windows Vista and 7 discussion questions, but rarely a lot of details, and when a problem is identified, it this far does not apply to me or my friends.

    I am happy to provide any other details I can.

    Updates:

    I forgot to mention that I have a Setup dual monitor. Aero seems unhappy with it, a lot of flicker when switching to full screen in games and other applications. I guess its because a single display off Aero while the other has it we or maybe not accelerated. Remove the second screen does not solve the problems I see, but I mention it in the interest of further development.

    I want to just chime in that I see similar (but not exactly the same) behavior and time seems to match as well. Among the updates must have messed something up. I forgot my Cardinal never update rule anything :/

    In any case, I have a few specific questions all problems related to full screen/window/input. When you play the Witcher, when you look at, if the mouse touches the edge of the screen, it stops, thus giving a very narrow range of angles I can watch from. Baldurs gate, as soon as I hit any key, I can't click on anything whether (and what I typed does not appear). Looking for police 3 (dosbox) it works fine until I hit a key, and then the mouse bounces oddly around the screen. If I alt - tab, in these 2 cases to last and go back, the problem is solved until I have a button again. In the case of the Witcher, if I alt tab and click the icon to the taskbar, it seems this problem, until I have a press.

    And I'm sure I had none of these problems a few months ago. I have tried everything I can think :( I tried the registry settings, but they do not seem to help.

    Edit: Oh, almost forgot. Whenever I click on full screen on an online video, like youtube, it appears in the background behind other windows, and then I have to click on it in the background to bring it forward. Very weird. Not sure if it's related. I'll try to change my video drivers... So boring when everything was working fine a few months ago.

    Edit 2: Do not take into account my post, I had a program called synergy race (usually use a mouse on multiple computers at the same time). Apparently, he was the problem.

  • Active window partially loses Focus

    I have a very annoying situation when the active window periodically partially loses focus on my Win7 Ultimate x 64 system.

    Usually, about every five minutes (but), what the window is active darkens its border, as if the focus is redirected. However, no other window gets focus.  After about two seconds, the window takes up its full focus for about a second.  This is repeated twice more, after what normal behavior resumes until the next instance.

    If I type while the border is dimmed, the new characters are lost.  If I click in the window while it is grey, full development is restored immediately, but then it fades again as described above, until he went through three dim / restore transitions.  If I analyze the performance of the system with the Manager of the tasks in this behavior, I see my CPU utilization increase of 3%-7% at idling by 40-50 percent, with the core 1 use being somewhat more pronounced than that of 0-based.  Also, during this time to the memory usage increases very slightly (about 50-60 MB), and then returns to its previous level.

    I would appreciate some help to solve this maddening behavior.

    Hi, guenoun.

    Thanks for responding.

    I just installed Win7 and am trying to install all my applications, and it is unclear when this issue arose, so there are a multitude of possibilities for which the application is at fault.

    Norton Internet Security says that my system is clean.

    So, I followed the usual exercise disable all non-Microsoft services, after which, the problem persisted.  I've disabled all the startup programs, saw disappears the problem, then research a binary file, the reactivation of half of them, then the half of the rest, etc..  Finally, I found that the problem was being caused by Gladinet (an aggregator of cloud storage).  I will now examine whether a solution is proposed; If this isn't the case, I can certainly live without it.

    I hope this will save others frustration and loss of time that I lived.

  • App/screen loses focus after closing the Menu

    I'm having a very strange problem with an application that tries to make it backward compatible for 4.2 and devices. Whenever I hit the BB button to display the menu, the screen loses focus and the thread stops to repaint. Currently I use a thread to continually update the screen. the app does not lose focus, as I can always press the BB button and force the screen to repaint only once, even if the fields do not update. The device, on which I'm testing is 4.5.0.77 Pearl 8130 (3.2.0.51).

    I found this question... I had the break and live variables in the same control in the thread, so a break killed the wire...

  • Constantly loses focus of the mode code in OSX CS6

    DW constantly loses focus on the editing in code view pane and seem to focus on another part of the interface.  Two big problems with this:

    1. When I expect to be always in code view and the first thing I do is press DELETE, DW wants to DELETE MY FILE - and worse, the pop-up confirmation is automatically centred on YES, so if I hit enter, the file was gone before I could even watch what happened...
    2. I have to keep dating back to my mouse and find the exact line and place in my code where I had my cursor (and can still see the cursor, simply not carried) and click here to get the update.

    I noticed that this happens repeatedly:

    • When I do command + S to save and then command + put you, put the command focuses on the 'Files' DW component and does not return to the mode of code as it should,
    • If I switch between applications with command + TAB then return to DW, once again my accent is further code where my cursor is still, but does not (yet once, he seems to think I'm trying to handle the file, such as the Delete on the delete key),
    • Sometimes, complately randomly when I insist on something, even loss of focus...

    It's extremely annoying (on the top of the chrome custom already lag and poorly designed).

    10.8.2 and latest DW CS6 OSX.

    Someone knows how to fix this, or is this just another bug that adobe is ignorant?

    It's a documented bug that engineers are trying hard.

    Nancy O.

  • Loses focus when we minimize and maximize the browser?

    Hi all

    In my application, I lose the focus on components when I minimize and maximize the browser. For example I clicked on textinput and focus comes to TextInput component. And now if minimize and maximize my browser once again then the TextInput component loses focus. I want it to focus and activated when I maximixe the browser.

    Not only for TextInput for any component. Please we suggest the best way and give a better solutions to get out of this problem. I want the focus to be stay on the same component after minimize and maximize the browser.

    Thank you

    RAM

    Some browsers like IE allow you to write the JS and set the focus to the player

    instance.

  • Firefox loses focus of the window when I switch to Windows user accounts

    If I have Firefox running in a single Windows account and switch to a different account (where I do not use Firefox) and then back to the account where Firefox is running, and I have to open a new window in Firefox, Firefox loses focus (in other words, I can't use the new window unless I first bring back highlight on the desktop.) ... and, no, it's not a Windows problem, as another program will include an expected. It's just Firefox that does this. Very annoying, btw.

    [Oh and mods, please reopen my previous thread, I wasn't done with it, thank you.]

    I tried Flash 15 and blow me over with a feather, it works! Adobe * actually * fixed something to change. * faints *.

  • Firefox frequently loses focus of the window

    It seems that Firefox frequently loses focus of the window when I opened a new page. It can be a bookmark, a link open in a new tab using CTRL-click left or whatever. The following scenario always translates into the window loses focus (for me).

    1. Open Firefox.
    2. Open this link and save it.
    3. Close, and then reopen Firefox.
    4. Open the page just a bookmark using the bookmarks list and do not touch the window.

    I read this page a day, so when I launch Firefox and open the page, I click on it in order to scroll, etc...

    Firefox 13, Windows 7 Home Premium 64-bit

    I wish this site had 'Preview' for its positions. Geez Louise.

    This can be caused by a recent update of Flash 11.3.

    See:

    You can also try 11.2 Flash you can download it via this link:

  • Firefox loses focus - titlebar to high gray goes - if a new Web site is visited.

    If, say, the URL of a website is put into the address bar and Firefox opens in a new tab in the normal way and then loses focus of the firefox window, the bar of the window in high greys out. I have to click on the page to restore the development.

    This has a much more irritation value as it might seem.

    Same thing with clicking on a Web site, say, google.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

    If this does not work in mode without failure, then disable all extensions and then try to find out who is the cause by allowing both the problem reappears.

    • Choose "Disable all add-ons" on issues to troubleshoot Firefox in Safe Mode to set window to disable all extensions.
    • Close and restart Firefox after each change through "file > exit ' (Mac: ' Firefox > leave";) Linux: "file > exit ')

Maybe you are looking for