How to pass string using SendMessage
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: How to pass string using SendMessage

  1. #1
    Join Date
    Feb 2010

    How to pass string using SendMessage

    Hi all,
    In my SDI application,i am trying send a custom message from dialog box to CScrollView.Along with that message i need to pass a string Value.I know how to send the String using SendMessage.But how to retrieve the string in the destination function,Bcos the parameter LPARAM is of LONG_PTR.How can i convert this into string,Here is my code..

    CString DelVar;

    In the Destination,
    LRESULT CTestView::OnMyChangeVariable(WPARAM,LPARAM)
    Now My string is in LPARAM,How could i access it,Can any Pls help on this,


  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003

    Re: How to pass string using SendMessage

    Just cast the LPARAM pointer back to a CString pointer when you get that message.

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center