CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Convert

  1. #1
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Convert

    I have this code which supposed to change title of a window with iHandle handle
    1. titl = "hello"
    2. SendMessage iHandle, WM_SETTEXT, 0&, titl



    but everytime i run it it gives me errors. If i declare titl as string, it will give me type mismach on line 2. If i will declare titl as long, it will give me error on line 1. So I have no idea how to make it work because it worked before, I think on VB5 it did, but I know that this method of changing title of a window works, just not in my case . Please let me know what am I doing wrong. Thank You.

    Programs and requests for them for FREE.
    http://falstok.fly.to

  2. #2
    Join Date
    Sep 2000
    Location
    Ottawa, Ontario
    Posts
    356

    Re: Convert

    titl must be a Long pointer to a String Not a string. all messages take 2 LONG's as params. You have to send the string ByRef.


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

Featured