For Linux Users Only

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Does any Linux Users here know of a C++ Linux Window Skeleton??

I know that in Windows, it's

Code:
[COLOR=#728fce]#include <windows.h>

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

static char gszClassName[]  = "darkblue";
static HINSTANCE ghInstance = NULL;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
        WNDCLASSEX WndClass;
        HWND hwnd;
        MSG Msg;

        ghInstance = hInstance;

        WndClass.cbSize        = sizeof(WNDCLASSEX);
        WndClass.style         = NULL;
        WndClass.lpfnWndProc   = WndProc;
        WndClass.cbClsExtra    = 0;
        WndClass.cbWndExtra    = 0;
        WndClass.hInstance     = ghInstance;
        WndClass.hIcon         = LoadIcon(NULL, IDI_APPLICATION);
        WndClass.hCursor       = LoadCursor(NULL, IDC_ARROW);
        WndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
        WndClass.lpszMenuName  = NULL;
        WndClass.lpszClassName = gszClassName;
        WndClass.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);

        if(!RegisterClassEx(&WndClass)) {
                MessageBox(0, "Window Registration Failed!", "Error!", MB_ICONSTOP | MB_OK);
                return 0;
        }

        hwnd = CreateWindowEx(
                WS_EX_STATICEDGE,
                gszClassName,
                "darkblue owNz!",
                WS_OVERLAPPEDWINDOW,
                CW_USEDEFAULT, CW_USEDEFAULT,
                320, 240,
                NULL, NULL,
                ghInstance,
                NULL);

        if(hwnd == NULL) {
                MessageBox(0, "Window Creation Failed!", "Error!", MB_ICONSTOP | MB_OK);
                return 0;
        }

        ShowWindow(hwnd, nCmdShow);
        UpdateWindow(hwnd);

        while(GetMessage(&Msg, NULL, 0, 0)) {
                TranslateMessage(&Msg);
                DispatchMessage(&Msg);
        }
        return Msg.wParam;
}
[/COLOR]

I am not sure how to properly ask this question. Thanks for the help :).. Even if there is a site that would be even better, I can copy a code off that and then go from there, I would like to do my own Apps from the ground up instead of using a IDE, I know that an IDE would be easier, but I really think doing it by hand would teach me a lot more than a GUI IDE will.. P.S. GUI(only), I really don't like Console Based Apps..
 
Last edited:

sunils

New Member
Messages
2,266
Reaction score
0
Points
0
/*****************Moved to Programming Help Section************/
Reason:- Author asks about c++ coding.
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
are you asking about a gui? if so, then take a look at the gtk libraries. I was playing with them briefly, making alert boxes and the sort. other than that, without a gui, you're stuck at the terminal :-/
 

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Eww, no thanks, definitely not Terminals, GUI sorry, I should have been more specific..

But, I did happen to look at FLTK, it looks pretty cool
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
as I've mentioned, take a look at GTK. they're a widely used gui, and iirc, it's used on firefox, evolution, and just about all gnome apps. kde uses QT libraries, but they didn't have a gpl license prior to 4.0. they used to be qpl, which was their own license.

so, take a look at GTK :)

taking a look at fltk's screenshots, it looks like something that would be used on openbox or something... :-/
 
Last edited:

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
np ;). although i don't actually program desktop apps (just web apps), I am quite knowledgeable about it still.

but I think that i am gonna try to learn C++ and use gtk to make some sort of backend app for my site maybe, so I don't have to be on firefox. just something for me to do i guess :D
 

natsuki

New Member
Messages
112
Reaction score
0
Points
0
GTK, QT, you can even try WxWidgets, and some others (I dunno much but I know there are some other GUI platforms out there). You could use emacs for editing.
 

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Hey, does anybody know what Taskbars are made from?

I noticed in KDE 4.1 they can be resized, they can be wider or taller, now in Gnome, they can't be either one, I'm starting to think that Taskbars are made from forms, am I right or am I wrong?
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
where the list of programs are? they can be resized in gnome. instead of draggin them, such as kde. right click on the taskbar, go to properties and then change the size. mine's currently 24 on top and bottom.
 
Last edited:

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Sorry, I guess you misunderstood my Q..

I was asking what they did to make a taskbar??
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
ah, to that question i have no answer... maybe checking out gnome's site or googling it (although i know you already have, right?) will net you an answer
 

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Since you understand Linux, how would I find where all the dirctory files are for konqueror?? I know where to find the main executable is, but, I am sure there are settings for it some where on here.. I tried which --help but it said, which --help illegal operation.. lol
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
what do you mean by directory files? any program binaries are located in /usr/bin, /usr/local/bin, and system binaries are located in /usr/sbin, /sbin, and /usr/local/sbin.

as for actual configuration options, go to your home directory, and show the hidden files in there. if your in gnome, simply do CTRL+H, and it may be the same for kde, but i think if you right click, it'll have an option for hidden files. in the terminal, simply type
Code:
ls -a ~

also, NEVER UNDER ANY CIRCUMSTANCE TYPE THE FOLLOWING AS ROOT!!!
Code:
rm -r /
it will remove EVERY SINGLE FILE on your computer.
 
Last edited:

richm8026

New Member
Messages
138
Reaction score
0
Points
0
LOL, rm -r / must remove everything, LOL

Thanks for the tips. and yes, those are the ones I'm looking

I am using KDE 4.1 and I love it, I love what you can do with it, I took the clock off the start menu off, realigned the taskbar centered..

I put another clock on the desktop next to the taskbar I have the K Menu on the desktop a long with my trash folder...

Now, why won't microsoft do stuff like this???

It doesn't take a genius to figure that out, LOL...

But, thanks, I am talking about the configuration files for Konqueror..
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
the binaries for kde on my system are located at /opt/kde, but that's arch linux. i don't know what you are using, but if your're looking for binaries, type
Code:
$ which konqueror
and that should tell you where konqueror is. don't type the $ as it's just an indication that you're in shell ;)
 

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Thanks, I knew where to find Konqueror main executable, I am actually looking for the Konqueror source, I think I have to download the source seperately, any good sites for Debian to get it?
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
yea, the source you would have to go to kde's site and either checkout the svn repo or download a tarball of it :)
 

richm8026

New Member
Messages
138
Reaction score
0
Points
0
Hey, what is SVN anyway????? I see that word a lot to, is that what Ubuntu uses for Repositories?? I'm using Windows right now, so, I'll have to check it out later..

My schooling requires Windows, I got on here to do that, but haven't gotten to it yet, I'm a slacker I know, LOL...
 
Top