Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Function key to Button
Re: Function key to Button [message #54356 is a reply to message #54352] Fri, 03 July 2020 10:41 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1226
Registered: August 2007
Senior Contributor
Hello Shwetha,

Quote:
still not clear.

I get the following error :

cannot call member function 'virtual bool Upp::TopWindow::Key(Upp::dword, int)' without object


Koldo has shown the correct generic way: If your derived class is based on TopWindow, it will work. But in your specific example, the button is called froım Tab5_Dynamic class, which is derived from ScatterDemo. So you should call ScatterDemo::Key (or any other base class that derives from Upp::Ctrl, thati s suitable), if you need to further process ScatterDemo keys (you'll probably need that in the future.)

Try this instead:

bool Tab5_Dynamic::Key(dword key, int val)

{
	LOG("key");
	DUMP("KeyAction");
	
  if(key == K_CTRL_S) {
        bStart.Action();
        return true;
    } else
        return ScatterDemo::Key(key, val); 
}




Best regards,
Oblivion


[Updated on: Fri, 03 July 2020 11:50]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Ultimate++ i.r.t. Fossil SCM
Next Topic: build UMK from SVN repository on windows
Goto Forum:
  


Current Time: Sun Aug 24 09:47:02 CEST 2025

Total time taken to generate the page: 0.04430 seconds