| 
 | 
 | 
 
Home » U++ Library support » TopWindow&PopUp, TrayIcon » Problem with SetTimeCallback in TrayIcon 
	
		
		
			| Problem with SetTimeCallback in TrayIcon [message #6015] | 
			Sat, 28 October 2006 10:34   | 
		 
		
			
				
				
				
					
						  
						zaurus
						 Messages: 42 Registered: May 2006 
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		Hi! 
 
I have done a 'Trayicon-Application' and want to use a SetTimeCallback, but I'm getting an error during compiling the application. 
 
C:/UPP_610/uppsrc/CtrlCore/CtrlCore.h:963: error: `void Ctrl::SetTimeCallback(int, Callback, int)' is inacces 
	sible 
 
I thought TrayIcon is inherited from Ctrl, so why I cannot access SetTimeCallback? If I use the 'Class Browser' I can find SetTimeCallback in TrayIcon class. 
 
Anything I did wrong? 
 
Thanks for any tips or help. 
 
Zaurus
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	
		
		
			| Re: Problem with SetTimeCallback in TrayIcon [message #6040 is a reply to message #6026] | 
			Sun, 29 October 2006 06:32    | 
		 
		
			
				
				
				
					
						  
						zaurus
						 Messages: 42 Registered: May 2006 
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		Hi Bas! 
 
Thanks for the link, but this is inside a Ctrl where it also works for me. I have used it in this way many times, but now I have a class inherited from TrayIcon and then SetTimeCallback seems to be not available. Even TrayIcon is inherited from Ctrl, so in my logic it should work, but I'm just a beginner in U++ and so most likely I did something wrong. 
 
This is from the class declaration: 
 
class MyClass : public TrayIcon { 
public: 
	typedef MyClass CLASSNAME; 
	MyClass(); 
private: 
	void OnTimer(); 
 
Then this in my constructor: 
 
SetTimeCallback(1500, THISBACK(OnTimer)); 
 
And I get this error during compiling: 
 
C:/UPP/uppsrc/CtrlCore/CtrlCore.h: In constructor `MyClass::MyClass()': 
C:/UPP/uppsrc/CtrlCore/CtrlCore.h:936: error: `void Ctrl::SetTimeCallback(int, Callback, int)' is inaccessibl 
	e 
C:\MyApps\MyClass\main.cpp:17: error: within this context 
C:/UPP/uppsrc/CtrlCore/CtrlCore.h:936: error: `void Ctrl::SetTimeCallback(int, Callback, int)' is inaccessibl 
	e 
C:\MyApps\MyClass\main.cpp:17: error: within this context 
C:\MyApps\MyClass\main.cpp:17: error: `Ctrl' is not an accessible base of `MyClass' 
 
Any ideas how to get it working?
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |  
	
		
		
			| Re: Problem with SetTimeCallback in TrayIcon [message #6101 is a reply to message #6086] | 
			Mon, 30 October 2006 16:26   | 
		 
		
			
				
				
				
					
						  
						zaurus
						 Messages: 42 Registered: May 2006 
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		Hi Mirek! 
 
Thanks for the explanation. I tried TimeCallback and it works fine for what I want to do. 
 
Just to highlight in case somebody reads through the thread again. The class is TimeCallback not TimerCallback. 
 
Zaurus
		
		
		
 |  
	| 
		
	 | 
 
 
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 02:30:26 CET 2025 
 Total time taken to generate the page: 0.10228 seconds 
 |   
 |  
  |