|
|
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 |
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 #8921 is a reply to message #8918] |
Sat, 07 April 2007 22:55 |
|
forlano
Messages: 1202 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
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 05:08:15 CEST 2024
Total time taken to generate the page: 0.04022 seconds
|
|
|