Nov 21, 2009

How Can I Create A Gui Using C++ - I need easy steps!

free web hosting
Open Discussion > MODERATED AREA > Computers > Programming Languages > C/C++ Programming

How Can I Create A Gui Using C++ - I need easy steps!

negativezero
can someone tell me how to create gui using c++...
thanks!!!! biggrin.gif

Notice from KuBi:
Questions do not belong in the tutorial section. Moved. Topic names and descriptions are VERY important. Changed that too. Issued warning.

Comment/Reply (w/o sign-up)

FeedBacker
how can i create a notepad using C++
How Can I Create A Gui Using C++

How can I create a notepad using borland builder GUI? I have been encountering several problems in this task.I really need you help.Its my dream

-question by Olanipekun Olalekan Williams

Comment/Reply (w/o sign-up)

osknockout
umm, I'll try to answer the 3 year old question. wxwidgets works really well - develop once and you can get gui's over a bunch of OSes.
As for the second question, I have no experience with Borland products biggrin.gif

Comment/Reply (w/o sign-up)

howardh
I don't have any experience with borland either but if you want to create a gui for something like a notepad on windows, try these links:

http://www.winprog.org/tutorial/
http://www.functionx.com/win32/index.htm
http://catch22.net/tuts/

http://www.gametutorials.com/

those were the ones I've used to learn. If you're interested in creating games too, you can look into SDL and openGL. http://www.libsdl.org/


btw, is there a rule against bumping threads? this thread's been dead for 3 years.

Comment/Reply (w/o sign-up)

osknockout
To be fair, in the C/C++ section, the same 10 questions are asked all the time.

"Where did you -X- with C?"
"What do you -X- with C?"
"How do I learn C?"
"I have X. Please do/fix X for me in C."
"Learn C -because there's not already a thousand threads in here on this topic that technically fall into the Tutorials section."
etc.

I haven't seen an actual c-language question here that wasn't bug-related in a while.

So I'd see bumping threads as a manageable way of avoiding the very strong redundancy in this part of the forum.

Comment/Reply (w/o sign-up)

xico
QUOTE(negativezero @ Jul 19 2005, 12:41 AM) *
can someone tell me how to create gui using c++...
thanks!!!! biggrin.gif

Notice from KuBi:
Questions do not belong in the tutorial section. Moved. Topic names and descriptions are VERY important. Changed that too. Issued warning.


You can use Microsoft Visual c++ 6.0 or .net to create the gui

Comment/Reply (w/o sign-up)

iGuest-Michael
Windows GUI and API-Win32
How Can I Create A Gui Using C++

Hello to everybody

I�m learning to program in Microsoft Visual C++, I already know how to write a simple Console application, however I already want build Win32 Applications without using MFC, I have seen the MSDN library But this info isn�t enough. I need books that teach to structure a Win32 Application since cero. If somebody already know to program Win32 Application, and can help me, I will be thankful.

Good Bye;


-question by Michael

Comment/Reply (w/o sign-up)

iFail
I cannot post any of the books that I used, because, unfortunately, they are not in English. Sorry.
And even if they were, I'd have a hard time trying to find them anyway (backups...)
So I'll just post my code here, for creating a basic window.

CODE
#include <windows.h>
#include <windowsx.h>

LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
    HWND hWnd;
    WNDCLASSEX wc = (WNDCLASSEX) {
        sizeof(WNDCLASSEX), CS_HREDRAW | CS_VREDRAW,    //size, style
        (WNDPROC)WindowProc, 0, 0, hInstance, NULL,        //WndProc, {cls,wnd}Extra (WTF?)
        LoadCursor(NULL, IDC_ARROW), (HBRUSH)COLOR_WINDOW,    //cursor, brush
        NULL, "Window Class 123", NULL};                //menu, name, def icon
    RegisterClassEx(&wc);

    hWnd = CreateWindowEx(0, "Window Class 123", "Stupid window requires so much code...",
                          WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, NULL, NULL, hInstance, NULL);

    ShowWindow(hWnd, nCmdShow);
    MSG msg;

    while(GetMessage(&msg, NULL, 0, 0)) {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }

    return msg.wParam;
}

LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
    switch(message) {
        case WM_DESTROY: {
                PostQuitMessage(0);
                return 0;
            } break;
    }

    return DefWindowProc (hWnd, message, wParam, lParam);
}


The code is mine, but you can use it freely (coz it's so common it would be stupid to copyright it)

 

 

 


Comment/Reply (w/o sign-up)

(G)Maria
Creating Window and Simple GUI in Visual C++
How Can I Create A Gui Using C++

Hi iFail,

Your code works good for creating window in Visual C++.However,I am not successful to create textbox, spinner and push buttons on it.

Could you please help me ASAP.(I request you to add code for text box,spinner and push button on it)
Thank you.

-reply by Maria

 


Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Gui Steps33


    Looking for create, gui, c, easy, steps

Searching Video's for create, gui, c, easy, steps
See Also,
advertisement


How Can I Create A Gui Using C++ - I need easy steps!

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com