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 » U++ Library support » U++ Library : Other (not classified elsewhere) » Getting compile errors, I modeled after TreeCtrlDnd, but I can't see the error
Getting compile errors, I modeled after TreeCtrlDnd, but I can't see the error [message #33629] Thu, 01 September 2011 19:26 Go to next message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member
I am trying to code a tree and use the WhenLeftDouble, to do some processing.

I am getting the following compile errors:

C:\MyApps\Train3\main.cpp(11) : error C2146: syntax error : missing ';' before identifier 'CLASSNAME'
C:\MyApps\Train3\main.cpp(11) : error C4430: missing type specifier - int assumed. Note: C++ does not support default
-int
C:\MyApps\Train3\main.cpp(11) : error C2208: 'Upp::TopWindow' : no members defined using this type
C:\MyApps\Train3\main.cpp(11) : fatal error C1903: unable to recover from previous error(s); stopping compilation
main.cpp
Train3: 1 file(s) built in (0:01.60), 1604 msecs / file, duration = 2948 msecs, parallelization 14%

There were errors. (0:23.82)

It looks similar to the TreeCtrlDnd in the reference item, so not sure why? Everything that I can see has the ; as required on it.

Also once I get to the ItemDC, how would I identify which item was double clicked upon?

I have attached my code.

Thanks

David
  • Attachment: train3.zip
    (Size: 1.37KB, Downloaded 309 times)
Re: Getting compile errors, I modeled after TreeCtrlDnd, but I can't see the error [message #33631 is a reply to message #33629] Fri, 02 September 2011 07:32 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi David,

The compilation problem is most probably just too much copy-paste Wink
struct MyApp : TopWindow {

    
    SplitterFrame sf, RightSide;	
	TreeCtrl   tree;
		
	typedef App CLASSNAME;  // <-- There is no type "App", it must be "MyApp"
...


To identify the line you clicked on, you can use GetCursorLine(), e.g.:
	void ItemDC()
	{
		PromptOK(DeQtf("Clicked on line " + IntStr(tree.GetCursorLine()) + "!"));
	}


Best regards,
Honza
Re: Getting compile errors, I modeled after TreeCtrlDnd, but I can't see the error [message #33636 is a reply to message #33631] Fri, 02 September 2011 11:07 Go to previous message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member
Thank you. I did cut and paste from a couple of programs.

And the other worked out great.

David
Previous Topic: Linking to a .net DLL ?
Next Topic: libtiff: update to release 3.9.5
Goto Forum:
  


Current Time: Fri Apr 19 04:30:09 CEST 2024

Total time taken to generate the page: 0.02776 seconds