fxscintilla-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fxscintilla-users] RE: example seems to not work


From: Gilles Filippini
Subject: Re: [fxscintilla-users] RE: example seems to not work
Date: Wed, 22 Oct 2003 21:27:43 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030910 Debian/1.4-4.he-1

I don't have a cygwin box to try your example.
All I can say for now is that it compiles and runs fine on my Linux box. It opens a small window at the top left corner of the screen. Try using PLACEMENT_SCREEN instead of PLACEMENT_DEFAULT. It should make your window centered on the screen. You may also want to specifiy fixed width and height for the main window, say:
        new FXMainWindow(&application, "FXScintilla Example", NULL,
                NULL, DECOR_ALL, 0, 0, 600, 400);

HTH

_gilles.


David Hisel wrote:
I'm using cygwin and using FOX-1.1.38. My program compiles just fine, and it even runs, but no window shows up, any suggestions?
Here's the code:
// ------------------------------------------------------------------------
// sc.cpp
//
// Time-stamp: <2003/10/14 16:15:22, address@hidden> (s/trash@/david@/)
// cygwin> uname -ro
// 1.5.5(0.94/3/2) Cygwin
// FOX-1.1.38
// (./configure --disable-shared --prefix=/usr; make; make install;
//  ln -s /usr/lib/libFOX-1.1.a /usr/lib/libfox.a;
//  ln -s /usr/lib/libFOX-1.1.la /usr/lib/libfox.la)
#include <fox/fx.h>
// FXScintilla-1.53 (./configure --prefix=/usr;make;make install)
#include <fxscintilla/Scintilla.h>
#include <fxscintilla/FXScintilla.h>
using namespace FX;
// compile this example with:
// g++ -o sc.exe -O2 -mwindows -e _mainCRTStartup sc.cpp -lfxscintilla -lfox -lcomctl32
int main(int argc, char ** argv)
{
FXApp application("FXScintilla");
application.init(argc, argv);

FXMainWindow *win =
  new FXMainWindow(&application, "FXScintilla Example");
// Instantiate an FXScintilla widget
FXScintilla *scint =
  new FXScintilla(win, NULL, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y);
// The Scintilla programming interface is through messages
// à la Windows (see scintilla/doc/ScintillaDoc.html)
scint->sendMessage(SCI_STYLESETFONT, STYLE_DEFAULT, (long)"Courier New");
scint->sendMessage(SCI_STYLESETSIZE, STYLE_DEFAULT, (long)10);
scint->sendMessage(SCI_STYLECLEARALL, 0, 0);
application.create();
win->show(PLACEMENT_DEFAULT);
return   application.run();
}
// ------------------------------------------------------------------------
when I run sc.exe, focus is taken from my rxvt, but no window shows up.
Am I compiling this correctly? (see comments for compile cmd line)
Are any code statements out of order?
Any suggestions?
Thanks,
David Hisel
http://www.hisel.com/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]