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 » RichText,QTF,RTF... » UWord and Windows fole association
UWord and Windows fole association [message #8917] Sat, 07 April 2007 17:58 Go to next message
DuncanShortland is currently offline  DuncanShortland
Messages: 45
Registered: January 2006
Member
Compiled Uword under 2007.1rc2

Moved executable into separate directory and associated .qtf under windows XP with the uword executable.

When click on the file in file manager uword opens but there is no file displayed.

When open the file in uword the file appears.

Can anyone help
Re: UWord and Windows fole association [message #8918 is a reply to message #8917] Sat, 07 April 2007 19:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
AFAIK, this has to be supported by application (and it is not by UWord a the moment).

AFAIK, opening CommandLine would do.

Mirek
Re: UWord and Windows fole association [message #8921 is a reply to message #8918] Sat, 07 April 2007 22:55 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Sat, 07 April 2007 19:40

AFAIK, this has to be supported by application (and it is not by UWord a the moment).

AFAIK, opening CommandLine would do.

Mirek


After addressing me on CommandLine and some experiment I've modified a bit UWord to open a file by clicking on it (after associating it with windows XP). I've just modified a bit the main with CommandLine and moved Load() from protected to pubblic (I hope there is no drawback for this).

Luigi


class UWord : public TopWindow {
protected:
...
public:
	void Load(const String& filename);
	typedef UWord CLASSNAME;

	static void SerializeApp(Stream& s);

	UWord();
};

...

GUI_APP_MAIN
{
	SetLanguage(LNG_ENGLISH);
	String fn;
	
	UWordFs().Type("QTF files", "*.qtf")
	         .AllFilesType()
	         .DefaultExt("qtf");
	PdfFs().Type("PDF files", "*.pdf")
	       .AllFilesType()
	       .DefaultExt("pdf");

	LoadFromFile(callback(UWord::SerializeApp));

	// -------- new ----------------
	int argc = CommandLine().GetCount();
	const Vector<String>& argv = CommandLine();	
	if(argc < 1) {
		new UWord;
	}
	else {
		fn = argv[0];
		//new UWord(fn);
		(new UWord)->Load(fn);
	}
	// --------- end new -----------
	
	Ctrl::EventLoop();
	StoreToFile(callback(UWord::SerializeApp));
}

[Updated on: Sun, 08 April 2007 08:38]

Report message to a moderator

Re: UWord and Windows fole association [message #8925 is a reply to message #8921] Sun, 08 April 2007 09:49 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Sat, 07 April 2007 16:55

luzr wrote on Sat, 07 April 2007 19:40

AFAIK, this has to be supported by application (and it is not by UWord a the moment).

AFAIK, opening CommandLine would do.

Mirek


After addressing me on CommandLine and some experiment I've modified a bit UWord to open a file by clicking on it (after associating it with windows XP). I've just modified a bit the main with CommandLine and moved Load() from protected to pubblic (I hope there is no drawback for this).



Nice.

Maybe we could add a code to associate file extension too? (And eventually, uninstall it).

Mirek
Re: UWord and Windows fole association [message #8928 is a reply to message #8925] Sun, 08 April 2007 11:52 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Sun, 08 April 2007 09:49

forlano wrote on Sat, 07 April 2007 16:55

luzr wrote on Sat, 07 April 2007 19:40

AFAIK, this has to be supported by application (and it is not by UWord a the moment).

AFAIK, opening CommandLine would do.

Mirek


After addressing me on CommandLine and some experiment I've modified a bit UWord to open a file by clicking on it (after associating it with windows XP). I've just modified a bit the main with CommandLine and moved Load() from protected to pubblic (I hope there is no drawback for this).



Nice.

Maybe we could add a code to associate file extension too? (And eventually, uninstall it).

Mirek



I agree. But this is far from my knowledge... at least by using U++.

Luigi
Re: UWord and Windows fole association [message #8931 is a reply to message #8928] Sun, 08 April 2007 14:04 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Sun, 08 April 2007 05:52


I agree. But this is far from my knowledge... at least by using U++.

Luigi



There is no support in U++, you would have to do this with plain Win32 API.

Mirek
Re: UWord and Windows file association [message #24244 is a reply to message #8925] Thu, 07 January 2010 06:07 Go to previous messageGo to next message
jaynorwood is currently offline  jaynorwood
Messages: 7
Registered: May 2008
Promising Member
Were there any problems discovered with this proposed solution? I notice that UWord still does not open an associated .qtf file when it is double-clicked in build 1824 in Windows... still comes up empty.
Re: UWord and Windows file association [message #24245 is a reply to message #24244] Thu, 07 January 2010 08:13 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
jaynorwood wrote on Thu, 07 January 2010 00:07

Were there any problems discovered with this proposed solution? I notice that UWord still does not open an associated .qtf file when it is double-clicked in build 1824 in Windows... still comes up empty.


See, UWord is a demonstration example. Associating extension is additional step which changes the configuration of your Windows.

I do not think that demonstration examples should be as intrusive.

Plus, it is supposed to be multiplatform too.

Mirek
Previous Topic: ERROR! please correct!
Next Topic: Bad text quality problem in Qtf
Goto Forum:
  


Current Time: Thu Mar 28 17:23:02 CET 2024

Total time taken to generate the page: 0.01428 seconds