473,386 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Is there a way to keep getting Windows messages while the UI-thread is suspended?

Hi, I have a simple question for you guys. In my WinForms app, I'm using WndProc to trap certain Windows messages. I sometimes need to block the Main UI-Thread (waiting for a worker thread or a modal dialog box to close). WndProc stops working once that happens. Is there a way to keep getting Windows messages while the UI-thread is suspended?

Thanks.
Jan 24 '11 #1

✓ answered by Plater

Don't suspend the thread, suspend the objects.
Do you have specific reason why the GUI thread HAS to be suspended? Generally that is the opposite of what you want.

1 2021
Plater
7,872 Expert 4TB
Don't suspend the thread, suspend the objects.
Do you have specific reason why the GUI thread HAS to be suspended? Generally that is the opposite of what you want.
Feb 2 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Beach Potato | last post by:
Hi: I've searched newsgroups and various archives, including MSDN & MFC sources, but at this point failed to locate an accurate and simple implementation of WndProc function for MSWindows window...
0
by: sshuangw | last post by:
Hello: I am encountering a very weird issue with MDI child, Overriden WndProc function and hidden form. Basically, the application has two forms, Form1(parent form), Form2(Child form),...
2
by: Ed Sutton | last post by:
How can a WndProc be created inside a component? Currently I have a WndProc in my frmMain. It looks for WM_DEVICECHANGE messages for connection and removal events for a USB/Serial device. My...
0
by: cyrille | last post by:
Hello from example from web i did a little code to avoiding columnHeader resize. this code seems to work well, but when I put a 'normal' ListView on the same Form than my overrided ListView it...
2
by: dworthem | last post by:
if I have the compiler option /clr:oldSyntax in a Windows Forms application protected: void WndProc(System::Windows::Forms::Message* m) is called If I remove oldSyntax protected:
2
by: Derrick | last post by:
Hello all; I'm trying to create a UI that's a little atypical. In the main form's Paint event handler, I draw an image on the form - this is what I want to by my "real" UI. I turned off the...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
4
by: Rob | last post by:
I've constructed a user control inherited from ListView so I can handle and respond to scrolling events (to keep 2 listviews scrolling in sync). My user control includes an Overrides of WndProc...
0
by: makifsar | last post by:
I am using a comserver to communicate remote equipments. This server gives response via WndProc. First I call READ function to start communication and remote equipment gives response this via...
4
by: Piotrekk | last post by:
Hi I have overriden WndProc to detect when the key is pressed. Because it didnt work i inserted debug code to detect what messages pass through the WndProc exactly.My application is minimized in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.