Jump to content
xisto Community
Sign in to follow this  
negativezero

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

Recommended Posts

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

Share this post


Link to post
Share on other sites

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 :lol:

Share this post


Link to post
Share on other sites

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://www.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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

can someone tell me how to create gui using c++... thanks!!!! :)

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

#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)
Edited by iFail (see edit history)

Share this post


Link to post
Share on other sites
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

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.