Click here to Skip to main content
15,891,184 members

Postmessage in loop for long due to which other window messages are not working

kaushik4study asked:

Open original thread
Hi guys
well this time my question is not summarized in form of code. but i am asking it in different way.
I am working on mfc application and there is a condition in which i am posting window messages by using
C++
PostMessage
it is executing in a loop

Now after some time if i press close button at upper left corner that is not accepting it as the reason is message loop is processing other window messages which are generated in loop. I know its straight question..is there is way that i can do that the priority of the close window (WM_CLOSE) will be high than the other window messages.
Note: i cannot skip from posting the messages you can assume that is in loop of 30000.

any suggestion or link will be beneficial..

thanks in advance

Extended after your response Hi all first of all thanks everyone for answering. Yes there can be redesigned possible let me first tell you i do have a video recording of say 1 day. i am extracting frames on the basis of events.Suppose it is giving one frame at each second so data is extremely large. In this case what i am doing. i am extracting frame and do postmessage to display in listcontrol. Reason Why i am doing postmessage because i do not need to block the dialog(modelless) and it happening in thread data is coming continuously. Requirment: if there is any solution that i can avoid message loop will beneficial.
Tags: C++, MFC

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900