Home » Community » Newbie corner » RegisterSystemHotKey not work here
RegisterSystemHotKey not work here [message #55256] |
Fri, 23 October 2020 15:13 |
BetoValle
Messages: 203 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
i build function to remove in the class
class HWld : public WithmeuL<TopWindow> {
private:
void fxRemove();
int keyId;
public:
typedef HWld CLASSNAME;
.......................
void HWld::fxRemove(){
int i = grid.GetCursor();
String s;
s << i;
PromptOK( s );
grid.Remove( i );
}
....................... below in constructor compilation error occurs
main.cpp (86): error: 'this' cannot be implicitly captured in this context
HWld::HWld()
{
CtrlLayout(*this, "Titulo da janela");
keyId = Ctrl::RegisterSystemHotKey(K_CTRL_DELETE, []{ fxRemove(); } );
I had done a simple test before with:
int id = Ctrl::RegisterSystemHotKey(K_CTRL_DELETE, [] { PromptOK("Ctrl delete ok"); });
it didn't generate an error, I thought I could put a function in place of the promptOK
so how should i write the code?
there is probably another alternative using a WhenAction but I don't know how to write this option.
Thanks
|
|
|
Goto Forum:
Current Time: Mon Apr 29 00:45:22 CEST 2024
Total time taken to generate the page: 0.05712 seconds
|