Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using API in VC60

0 views
Skip to first unread message

John

unread,
Dec 20, 1999, 3:00:00 AM12/20/99
to
An update to this question: I read in another group to include
<Windows.h> instead of winuser.h and it should work, but it still does
not work...this is what i have.

#include "stdafx.h"
#include "Refresh.h"
#include "RefreshDlg.h"
#include <Windows.h>


Function is SendMessage( args...

Errors:
C:\WinInternals\Refresh\RefreshDlg.cpp(192) : error C2660:
'SendMessageA' : function does not take 4 parameters

I dont know what to do anymore, since SendMessage() does take 4
arguments when you look at the DDK guide.

Help......


a f f l e s 2@worldnet.att.net Ron Ruble

unread,
Dec 20, 1999, 3:00:00 AM12/20/99
to

John wrote in message ...
>I am pretty new to this language, i am trying to use the API function:
>
>LRESULT SendMessage(
>
> HWND hWnd, // handle of destination window
> UINT Msg, // message to send
> WPARAM wParam, // first message parameter
> LPARAM lParam // second message parameter
> );
>
>in my code, but whenever i compile it tells me that Sendmessage does not
>take 4 arguments. I looked in the helpfile and realized that vc also has
>its own sendmessage function, so can someone tell me how and what do i do
to
>make api calls work in my program?

That other version of SendMessage is part of MFC.
Non-MFC apps don't have to do anything special to
call APIs. Where an MFC class function exists with
the same name as an API function, just prefix the API
function name with the scope resolution operator, like
so:

::SendMessage

This is a standard C++ operator that says to look in
the global namespace for the function SendMessage.


>
>
>Thanks very much.
>
>

0 new messages