Results 1 to 4 of 4

Thread: Displaying messages in-game...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109

    Displaying messages in-game...

    you know how in multiplayer games like RainbowSix, Counter-Strike, etc... you can chat while you play....

    my question is, how could i make my program, send a chat message.... so it shows up in game.... its like a bound keys program, so if u press 'f5' it will automatically say "Tango down" for you, or whatever...

    also, is there a way i can display a message during gameplay on the screen.... like by using bitblt or something. during gameplay, the gamewindow is on top of all other windows, and fullscreen.... so is there any way i can show a message somewhere on the screen? like if i grab the games window handle, is there some way i can print a message on it?


  2. #2
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    If think you could use the TextOut API to print a message on screen.

    Code:
    Private Declare Function TextOut Lib "gdi32.dll" Alias "TextOutA" _
     (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
    
    retval = TextOut(frmMessage.Picture1.hdc, 0, 0, strMessage, MessLen)
    Any use?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    hmmm.... that might work.... how would i get the hdc value from the handle of a window?

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    I'd prolly use GetDC eh?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width