[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Lets say Im coding in C or any other language. How would I go
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 29
Thread images: 2
File: Program Window.png (6 KB, 414x365) Image search: [Google]
Program Window.png
6 KB, 414x365
Lets say Im coding in C or any other language. How would I go about making a window like this for my program to display things visually instead of having it run in the background all invisible n shit.
>>
have fun diving into the abyss that is the Win32 API
>>
>>53448060
Visual C++

now go away
>>
File: 21.jpg (19 KB, 640x474) Image search: [Google]
21.jpg
19 KB, 640x474
>>53448139
>>53448115
>>53448108

Don't listen to these retards

use SDL2 for a multimedia app / GTK / wxwidgets (audacity uses this if you want an example of a real app)
>>
>>53448060
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=win32%20api%20c%2B%2B%20hello%20world
>>
You use a widget library for this.
The concrete answer depends on many things:
* language
* target platform/OS
>>
>>53448161
>>53448115
>winapi
>programming for windows

How do you test it? You're not telling me you're technologically inept enough to be running Windows, right Anonymous?
>>
>>53448060
Run it in the debugger
cout<<
QT
>>
>>53448060
Qt is best choice. Cross platform and ez pz.

Also by C I assume you mean blessed C++
>>
>>53448262
GTK is also cross-platform and it's easier to use due to simpler event system.
C++ is a garbage language you only use because you're forced to. New projects should be done in D or Rust.
Or actually, for UI Python is great.
>>
Qt is pretty easy to figure out and looks native on a lot of platforms.
They have tutorials, so it should be easy for you to figure out how to.
It is C++ though.

Gtk is a C toolkit but it looks like shit on anything else than linux, so you will have to weight the pros and costs there.
>>
>>53448304
>using meme languages

nah thanks though
>>
>>53448334
C++ is a meme language.
>>
>>53448304
I always have appreciation for programs in C++ because you know it had attention to detail put in and you know it's stable and versatile.

Like when deluge was made in C then switched to python I believe. Drop that shit fast.
>>
>>53448060

visual studio
>>
>>53448060
idk but I bet there's a library or some shit that has already done this all for u.
>>
>>53448060
https://msdn.microsoft.com/en-us/library/windows/desktop/ff381409(v=vs.85).aspx
>>
>>53448416
Why though?
A lot of people use it so you don't have to create a lot of solutions to problems that have been solved already.
You can be very domain specific if you want to.
You can make efficient as C and you can make it safer like D.
It might try to be a lot of things at once, but it is still one of the best languages out there.
>>
>>53448060
window.open(<url of window here>)
>>
>>53448060
You could use straight up OpenGL / Vulkan or DirectX to draw shapes and put observers on their positions.
>>
>>53448436
>I always have appreciation for programs in C++ because you know it had attention to detail put in and you know it's stable and versatile.
Wait, you're claiming that programs in sepples have to automatically be good?
>Like when deluge was made in C then switched to python I believe.
What the fuck? Deluge was always written in Python 2.
>>
>>53448060
By typing "Win32 API Tutorial" into a search engine you lazy cunt. The forgers tutorial is one I remember, also check out petzold's winapi book. Its been awhile though, this shit might be outdated.
>>
>>53448522
>A lot of people use it so you don't have to create a lot of solutions to problems that have been solved already.
Solutions to problems other languages don't have.
>You can be very domain specific if you want to.
D has much better meta-programming facilities. You can literally output source code with a constant D function (a feature called mixin in D).
>You can make efficient as C and you can make it safer like D.
Or you can use d or Rust, which are both efficient like C and safer.
>but it is still one of the best languages out there
That might be true. It's certainly not as bad as PHP or ES. But that only shows that most programming languages are bad. Which is maybe normal, programming was and is evolving, and people were and are learning on past mistakes.
>>
>>53448060
you need some kind of library. it can be gdi, it can be whatever else.

google "gdi", should be enough for you.
>>
>>53448758
>Solutions to problems other languages don't have.
No. As in libraries for things you need.
>D has much better meta-programming facilities.
Got to disagree with you but okay.
>or you can use D
Okay. It is not really compatible with many projects, so even if I did want to use D over c++, I would have to rewrite a lot of things or start over.
>Mosts programming languages are bad
Programming languages is meant to make things easier, C++ makes it rather easy to do a of things.
Some of it might be a bit verbose, but this is why we have things like templates.
D doesn't seem like a huge improvement over C++.
It is like arguing for using holyC over regular C because it offers some nice features even though it breaks compatibility with so many programs.
>>
>>53448158
>use SDL2 for a multimedia app
Don't listen to this retard, SDL2 can't into interrupts anymore.
>>
>>53448304
>D
>automatic memory management
into the trash

>rust
>Pointer restrictions
into the trash
>>
>>53448758
you're so fucking stupid it makes me happy
>>
http://www.winprog.org/tutorial/
Thread replies: 29
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.