Voidz

@Ancient Dragon

That doesn't work with Win32. Thanks for trying though, C++ is a weird language. Something so simple, shouldn't be so complex.

Voidz Newbie Poster

Hi, I know how to do it in the console, but when it comes to Win32, I can't I've tried all those #includes(with Windows.h), and it doesn't let me. Anyways, if you guys know how, please share, I'd like to know.

Voidz

[QUOTE=Frederick2;1592262]That's not terribly hard. All you need to do is create a BRUSH of the color you want and select it into the device context in your WM_PAINT handler. I don't think I have a C/C++ example handy, but here is a PowerBASIC example of a WM_PAINT handler where I paint the whole window bright red, and draw "Hello, World!" in massive white text on it...

[CODE]
Function OnPaint(wea As WndEventArgs) As Long
Local hDC,hBrush,hTmp,hFont As Dword
Local lpPaint As PAINTSTRUCT
Local strText As String
Local rc As RECT

hDC = BeginPaint(wea.hWnd, lpPaint)
hBrush=CreateSolidBrush(&h000000FF)
hTmp=SelectObject(hDC,hBrush)
Call GetClientRect(wea.hWnd,rc)
Call FillRect(hDC,rc,hBrush)
Call DeleteObject(SelectObject(hdc,hTmp))
Call SetTextColor(hDC,&H00FFFFFF)
hFont=CreateFont(40,0,0,0,%FW_BOLD,0,0,0,0,0,0,2,0,"SYSTEM_FIXED_FONT")
hTmp=SelectObject(hDC,hFont)
Call SetBkMode(hDC,%TRANSPARENT)
strText = "Hello, World!"
Call TextOut(hDC,52,90,ByVal StrPtr(strText),Len(strText))
Call DeleteObject(SelectObject(hdc,hTmp))
Call EndPaint(wea.hWnd,lpPaint)

OnPaint=0
End Function
[/CODE][/QUOTE]

Thanks, this will help.

Voidz Newbie Poster

Hi, I have an array of hWnds, and I need to change each one of their background colors. They're all without a border(titlebar, and such). I've searched Google, and IxQuick, and I need an answer please. Thanks so much for the help.

Voidz

Why not system("taskkill") or whatever? You're a fucking horrible programmer.

Voidz

What are you doing this for?

Voidz

[CODE]cin.sync();
cin.get();[/CODE]

Instead of system("Pause");

Voidz

Botnet's suck. I have one on my computer right now. Gotta reinstall Windows.

Voidz Newbie Poster

Hi, is there a good .ISO burner I can download? I have a CD, just need to burn a .ISO to it.

Voidz

No, sorry lol. I'm trying to say basically, if someone like let's say I write some Python, then I send it to another Windows computer. This computer doesn't have anything about Python installed. Will it run? For example. If I make a C# program, and I send it to someone who doesn't have .NET Framework. It will not run. Does Python have anything like this?

Voidz Newbie Poster

What's this mean? It's from Youtube. Can anyone tell me if it's just me or everyone? I got a virus today, so might just be me.

Voidz Newbie Poster

Hi DW(DaniWeb) - I hope that's the correct term, since I'm a total Python/DaniWeb noob. I [B]think[/B] Python doesn't have a RE(Runtime Environment), but Python has the option for one. [URL="http://www.python.org/download/"]http://www.python.org/download/[/URL]. So, basically what I want to know is, do you [B]have[/B] to have a RE(Runtime Environment) or anything like a RE(Runtime Environment) [B]for developing Web Application's especially[/B], or just executable application's. Thanks so much, sorry I'm a noob.

Voidz

[QUOTE=snippsat;1516992]Python is used in all application you can think off.
Python is strong in web application's as you say with many good Web Frameworks.
[url]http://wiki.python.org/moin/WebFrameworks[/url]
Pyhon also have strong GUI-toolkit like wxpython,PyQT,PyGTK and bulid-in Tkinter.

To run a Java program, you must have Java's Runtime Environment installed on your machine.
To run a Python program, you must have Python's Interpreter installed on your machine.
Allmost all linux distros an mac comes with python pre install.

Python easy to install just 1min and it`t ok on windows.
For stand alone application there are tool like py2exe,cxfreez,Gui2exe,portable python also using installer like inno-setup for making a good looking installer.

Thank you. Very good answer. lulz

Voidz Newbie Poster

Hi DW, I'm extremely new to DaniWeb. I have been coding in C++ for about one month. I'm thinking about coding in Python too. But, I'd like to ask some newbie question's about it first.

[B]I'd like to know what it's used for.[/B] [I]I think it's mostly used for web application's.[/I]

[B]I'd also like to know if it has a runtime environment[/B] [I]For example, Java's runtime environment is the JVM(Java Virtual Machine), at least I think so.[/I]

[B]Also, is Python a language that's actually used?[/B] [I]Like do many companies use Python?[/I]

Voidz

wxPython.

Voidz Newbie Poster

Hi, what's #pragma and #pragma once? I can't find website's that explain it for a noob, as I am a noob. I think it's related to #ifdef? I also think I know what #ifdef is. It's when you want to see if something is defined. Like #ifdef WIN32 #endif. Thanks.