Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MS Flight Improvement Wish List

Featured Replies

mgh: maybe one day you'll write a real GUI program then? perhaps one without blocking i/o like your previous Keys example.

  • Replies 264
  • Views 42.7k
  • Created
  • Last Reply

Top Posters In This Topic

mgh: maybe one day you'll write a real GUI program then? perhaps one without blocking i/o like your previous Keys example.
What's your definition of a Windows GUI program - one like the attached? My example was an extract from a working C gauge (.gau file) intended to intercept keystokes and supress the default action so that the gauge could take its own action. Obviously it doesn't use a GUI - it's not intended to!

Gerry Howard

mgh: You ever think windows is so advanced that instead of using threading it uses something else to accomplish the same thing? Perhaps a little better than Unix where the concept was first introduced. :) Maybe you've already implicity wrote threaded code? At least in respect to the way it's executed on the CPU?

mgh: You ever think windows is so advanced that instead of using threading it uses something else to accomplish the same thing? Perhaps a little better than Unix where the concept was first introduced. :) Maybe you've already implicity wrote threaded code? At least in respect to the way it's executed on the CPU?
Is the screenshot I gave a Windows GUI application or not?

Gerry Howard

Is the screenshot I gave a Windows GUI application or not?
Yes ... is the mouse running in your code?What about the graphics device context.. where's that code running?And outside of your API method call to the keyboard, where's the keyboard code? It's obvious you have no clue what a thread is... when you get past your first year of programming let me know...
Yes ... is the mouse running in your code?What about the graphics device context.. where's that code running?And outside of your API method call to the keyboard, where's the keyboard code? It's obvious you have no clue what a thread is... when you get past your first year of programming let me know...
Let me remind everyone of what you originally said.
Ahhh.. all Windows applications are multithreaded.. it's a requirement of a GUI.Where did you read otherwise?
Let me now give you a couple of quotes from Microsoft, which perhaps knows more about programming than you do. "Many applications are designed as single-threaded applications, meaning that the process that implements the application never has more than one thread executing .... Many single-threaded client applications already exist, and many more are being written daily. In many cases, single-threaded behavior is sufficient. "http://msdn.microsof...e/cc164037.aspx"An application consists of one or more processes. A process, in the simplest terms, is an executing program. One or more threads run in the context of the process."http://msdn.microsof...v=vs.85%29.aspxClearly, an application can have only one process and one thread and so is not multi-threaded. This shows your original statement is wrongAnyone who understands anything about programming knows that to create a thread the programmer has to code the thread, create it, start it, stop it, and destroy it. They also have to ensure that only thread-safe function are called. Programmers don't just "implicity wrote threaded code". as you suggested.The following Microsoft link gives an example of creating threads.http://msdn.microsof...v=vs.85%29.aspxI've also learnt here that when posters have to resort to personal attacks it because they have run out of reasons and have lost the argument.

Gerry Howard

  • Moderator
It's obvious you have no clue what a thread is... when you get past your first year of programming let me know...
veeray, you're just embarrasing yourself now... :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
veeray, you're just embarrasing yourself now... :(
You're absolutely right.... I'll stop now. Obivously if you can't answer the question which thread the mouse, graphicsdevice is running in and not realize it's not your thread and you have no ownership of it.. what can I do. I'm sure the windows dispatch processor is creating it's own messages and consuming them as well.
You're absolutely right.... I'll stop now. Obivously if you can't answer the question which thread the mouse, graphicsdevice is running in and not realize it's not your thread and you have no ownership of it.. what can I do. I'm sure the windows dispatch processor is creating it's own messages and consuming them as well.
Totally irrelevant and has nothing to do with you incorrect original claim that "all Windows applications are multithreaded." As Fr Bill says you're just embarassing yourself and appearing foolish. Come back when you know what a Windows application actually is.

Gerry Howard

Really I should take advice from Bill... the man that has the most complicated scheme for converting to BCD16 I've ever seen... apparently he didn't take first year programming eitehr where you deal with bitshifting. Bottom line answer the question which thread if not yours does the mouse and graphics and keyboard run in? Oh wait does that mean you are implicitly using MULTIPLE threads?

Really I should take advice from Bill... the man that has the most complicated scheme for converting to BCD16 I've ever seen... apparently he didn't take first year programming eitehr where you deal with bitshifting. Bottom line answer the question which thread if not yours does the mouse and graphics and keyboard run in? Oh wait does that mean you are implicitly using MULTIPLE threads?
"Many applications are designed as single-threaded applications, meaning that the process that implements the application never has more than one thread executing .... Many single-threaded client applications already exist, and many more are being written daily. In many cases, single-threaded behavior is sufficient. "Is Microsoft wrong when it says that and you are right when you say "all Windows applications are multithreaded?" As simple yes or no will do.

Gerry Howard

Totally irrelevant and has nothing to do with you  incorrect original claim that "all Windows applications are multithreaded." As Fr Bill says you're just embarassing yourself and appearing foolish. Come back when you know what a Windows application actually is.
He does this a lot .....

To be honest they are both right.While a process itself may not create multiple threads, the OS or other components it uses may spin up other threads to handle background tasks. For instance usually the video driver has a separate thread to handle the interactions between the D3D runtime and the hardware. Technically this program would still be called a single-threaded app though, even if multiple threads are running in support of the app.Either way FSX was actually a multi-threaded app, even though certain parts of it like the rendering were not, so the original flame comment that spurred this debate was incorrect anyway. It will always be the case with any complicated multi-threaded app that not all the CPUs\cores are utilized as much as they could be. There are parts of algorithms that are serial in nature and are impossible to parallelize.

To be honest they are both right.
You can't fudge it like that.veeray said "all Windows applications are multithreaded" which is equivalent to saying no Windows applications are single-threadedMicrosoft said "Many applications are ... single-threaded applications" which is equivalent to saying some Windows applications are single-threadedOnly one of these statements can be true. Take your choice who is correct - veeray or Microsoft?

Gerry Howard

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.