Skip to main content
gamedev.net
🔒 Locked

SendMessage disappeared

Started by Anarchi Nov 26, 2001 at 11:55 PM 1 replies 200+ views
Original Post
Anarchi
Anarchi
AAAAAAAAAAAAAAAAAAAAAarrrrrrrrrrrgggggggggghhhhhhh.......! Ok I have a MSVC++6 MFC Dialog project and I need to change the contents of a static picture on the dialog. I managed to get the hWnd of the static picture control, and now I need to send a message to the control to change it...BUT when I compile it says: ----------------------------------------------- error C2660: ''SendMessageA'' : function does not take 4 parameters ----------------------------------------------- The Docs have two SendMessage functions: ----------------------------------------------- LRESULT SendMessage( HWND hWnd, // handle of destination window UINT Msg, // message to send WPARAM wParam, // first message parameter LPARAM lParam // second message parameter ); LRESULT SendMessage( UINT message, WPARAM wParam = 0, LPARAM lParam = 0 ); ----------------------------------------------- I need to use the 1st one (with four params) so I can specify the hWnd I retreived from GetDlgItem: ----------------------------------------------- HWND hbmp = LoadBitmap(NULL, "test.bmp"); this->GetDlgItem(IDB_BITMAP1, &hWndBitmap); ----------------------------------------------- But it wont accept the SendMessage functions with 4 parameters..Why? How else can I change a static picture? Any help would be appreciated, thanks.

Downloads, D3DXSprite tutorial, New platform game: .-= The ZeroOne Realm =-.

Downloads, Free GoldLib game library, D3DXSprite tutorial, New platform game: .-= The ZeroOne Realm =-.
Oluseyi
Oluseyi
::SendMessage(...); 
Beer Hunter
Beer Hunter
Just to clarify what Oluseyi said (which might not be 100% clear).

Due to the namespace that your code is running in, a lookup for "SendMessage" comes up with the three parameter version. The four parameter version is part of the global namespace, which can be accessed by typing two colons before "SendMessage".

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.