Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[b]private:[/b]
[color green][b]void __fastcall[/b] NoRightClick(TMsg &Message, [b]bool[/b] &Handled);[/color]
[b]__fastcall[/b] TForm1::TForm1(TComponent* Owner) : TForm(Owner)
{
[color green]Application->OnMessage = NoRightClick;[/color]
}
//-----------------------------------------------------------------
[color green][b]void __fastcall[/b] TForm1::NoRightClick(TMsg &Msg, [b]bool[/b] &Handled)
{
[b]if[/b]((Msg.message == WM_RBUTTONDOWN) && (Msg.wParam == MK_RBUTTON)){
Handled = [b]true[/b];
}[b]else[/b]{
Handled = [b]false[/b];
}
}[/color]
[b]void __fastcall[/b] TForm1::NoRightClick(TMsg &Msg, [b]bool[/b] &Handled)
{
[b]if[/b]((Msg.message == WM_RBUTTONDOWN) && (Msg.wParam == MK_RBUTTON)){
Handled = [b]true[/b];
[color green]POINT cursorPos;
GetCursorPos(&cursorPos);
PopupMenu1->Popup(cursorPos.x, cursorPos.y);[/color]
}[b]else[/b]{
Handled = [b]false[/b];
}
}