Announcement

Collapse
No announcement yet.

Dir Function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #41
    Code:
    DECLARE FUNCTION MessageBoxTimeoutA LIB "user32.dll" ALIAS "MessageBoxTimeoutA" (BYVAL hWnd AS DWORD, lpText AS ASCIIZ, _
    lpCaption AS ASCIIZ, BYVAL uType AS DWORD, BYVAL wLanguageID AS WORD, BYVAL dwMilliseconds AS DWORD) AS LONG
    
    FUNCTION PBMAIN( ) AS LONG
     LOCAL zText, zCaption AS ASCIIZ * 255
     LOCAL uType, dwMilliseconds AS DWORD
     zCaption = "by David Roberts"
     zText    = "Will this do, Jim?"
     dwMilliseconds = 3000
     uType = %MB_OK OR %MB_SYSTEMMODAL OR %MB_ICONQUESTION
     MessageBoxTimeoutA 0, ztext, zCaption, uType, 0, dwMilliseconds
    END FUNCTION
    https://duckduckgo.com instead of google

    Comment


    • #42
      My FLASH_NOTE_FOR_SECONDS routine produces a user notification message on a dedicated app textbox. No need for a popup MessageBox. Since it calls a Thread Function you can fire and forget it and it does not slow down the main routine that much. When the Thread completes it calls SHOW_A_GENERIC_MESSAGE which are built-in messages for the System Status and only presents a message to the textbox if there is some status that needs to be displayed. So what you have is a system status message displayed initially. A flash message happens for a short period. Then the System Status message reappears. Very ingenious. I'd say. But that is:

      Other methods I use are FIFO buffers especially for communications routines. FIFO buffers in my case are simply global dynamic strings. Why act on a received message immediately when you can drop it in a FIFO buffer and let the Thread based message interpreter act on the messages and carry them out in sequence.

      Comment


      • #43
        What have Threads,Globals and Popup Message boxes got to do with Online Help for the DIR$ function?

        Comment


        • #44
          Stuart,
          If you took a minute to read my comments then you would know my point was to say that DIR$ could be made thread-safe. Note to Adam.

          Comment


          • #45
            hutch at movsd dot com
            The MASM Forum

            www.masm32.com

            Comment

            Working...
            X