Reputation: 1014
private:
#define WM_SETTEXT 0x000C
void doSomethinggToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
SendMessage(this->Handle, WM_SETTEXT, (wPARAM)"Some Window Title", 0);
}
results in the following errors:
error C2065: 'wPARAM' : undeclared identifier
error C2143: syntax error : missing ')' before 'string'
error C2059: syntax error : ')'
this->Handle <--- (error) no suiteble conversion from System::IntPtr to HWND
Upvotes: 1
Views: 1273
Reputation: 37202
The symbol you need is WPARAM
(all uppercase), not 'wPARAM'.
Also note that WM_SETTEXT
actually takes the string parameter as the lParam
value, not wParam
:
SendMessage(this->Handle, WM_SETTEXT, 0, (LPARAM)"Some Window Title");
Upvotes: 1