A common solution to access MFC objects from other threads is posting user defined messages. Then the manipulation of the object occurs inside the thread that owns the MFC object. If your thread is a worker thread see the CP article Using Worker Threads[^] for examples.
With the new great OS -- 10 -- we're seeing something odd.
Running our installer is not shutting down our app.
We do receive the WM_QUERY_ENDSESSION and we do reply with TRUE ( ok to shutdown )
But, upon receiving the WM_ENDSESSION we receive a FALSE (don't shutdown).
Somewhere between the QUERY and the END -- "someone" is saying NO to this.
How does one go about debugging this sort of thing?
I've used SPY++ but am not finding it to be the most useful tool, except to confirm what I knew in code. SPY is not telling me who sends the QUERY. If I could figure out where these messages are coming from, maybe I could watch the conversations taking place around this transaction.
-- in previous versions of Windows this was not an issue -- it worked like we would expect. But Windows10 is telling me not to end my session.
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">soonr.com -- PC Power delivered to your phone</a>
hi i had learn c++ and something about the framework Qt but the problem that the Qt is not used for building apps smartphone like C# or JAVA !!
so do u advice me to leave c++ and Qt and start with C# or JAVA ??
please i need your Advice Thank you
Now. I am getting focus on first button of toolbar. I clicked SPACEBAR and this button get pressed. It open a dialog , after my operation I closed it.
After that, Unfortunately second button get activated. I pressed spacebar again.It will pressed that button and called related function , which will open another dialog. After my operation, I closed it .
Now the focus went to First button. According to project requirement the focus must retain to the last clicked button. I checked in project code, nowhere first button getting activated explicitly.
I am working on a legacy Windows app written in Win32.
There's a checkbox in the screen and i call the SetFocus() function to have the focus on it. I know that it works as far as setting the focus, because now i can use space button in keyboard to check and uncheck the checkbox.
But the problem is, when a control get's the focus, it's supposed show a broken rectangle around it. In my case this broken rectangle is not drawn/shown all the time. Sometimes it shows the broken rectangle and some times it doesn't.
I need to show some visual indication to user that this checkbox has the focus. I tried using WM_CTLCOLORSTATIC, but that creates some painting issues in the window.
So am looking for a simpler solution, by which i could show some visual indicator to user that this checkbox is having focus.
Like changing the text color or background color or even force draw a broken rectangle.
But i have no idea how to do this without using the WM_CTLCOLORSTATIC.
Is there a easier way to show some sort of visual indication on a checkbox in Win32?
There's a bunch of good texts listed in this[^] thread.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
My app was running fine with Windows 7 & 8.1 using URLDownloadTofile(NULL,sUrl,SFile,0,NULL). With the upgrade to Windows 10 it has stopped working. I've made sure my app has security settings to allow it through the firewall (and this hasn't changed) but now the request to download fails. Also the Visual Studio 2008 Document explorer now just comes up with "Unable to download <help page="">" which makes me suspect it's a more general problem that just my app. I can't find any security settings that should be blocking my app.
If any one could shed some light on my problem I'd be grateful. I've trawled around the web for a day with no useful results.
Thanks it turned out the problem was that the directory that the Temporary Internet files were stored in no longer existed after the update to Windows 10. Trying to change this under the Control Panel application for Internet settings failed to change the directory as the one that it was trying to move the files from did not exist. The only way to correct the problem was to manually edit the registry key as explained here: