Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

problem to get HWnd to main frame

arvind17arvind17 Posts: 62Member
hi,
I am trying to use the CWindow::SendMessage()
I need HWND to use the above message. I need to send message to the OnLButtonDown which

I implemented in the View class.

Can sb give me the appr code.
What HWnd handle and how should I get to post the appr messages ?

I also tried using the CWnd::SendMessage. It only works in the CView class. In the other files I need to specify the handle to the window i need to send the message. I need to send to the view class - i am seeking what HWnd - handle to use ???

regards
-arvind

Comments

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    [b][red]This message was edited by AsmGuru62 at 2003-3-18 7:54:2[/red][/b][hr]
    [b][red]This message was edited by AsmGuru62 at 2003-3-18 7:53:12[/red][/b][hr]
    : hi,
    : I am trying to use the CWindow::SendMessage()
    : I need HWND to use the above message. I need to send message to the OnLButtonDown which
    :
    : I implemented in the View class.
    :
    : Can sb give me the appr code.
    : What HWnd handle and how should I get to post the appr messages ?
    :
    : I also tried using the CWnd::SendMessage. It only works in the CView class. In the other files I need to specify the handle to the window i need to send the message. I need to send to the view class - i am seeking what HWnd - handle to use ???
    :
    : regards
    : -arvind
    :
    [blue][b]m_hWnd[/b] is a public member of any MFC class representing a window, so you can access it just by using . or -> operators:

    AfxGetMainWnd()->m_hWnd[/blue]




Sign In or Register to comment.