Tuesday, January 7, 2014

comp.lang.c++ - 26 new messages in 3 topics - digest

comp.lang.c++
http://groups.google.com/group/comp.lang.c++?hl=en

comp.lang.c++@googlegroups.com

Today's topics:

* Friendly GUI for windows building? - 24 messages, 7 authors
http://groups.google.com/group/comp.lang.c++/t/c865fa27ccf9e327?hl=en
* Behavior of the local class - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/485b73a7b838fdff?hl=en
* Practice of basic concepts - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/44be24048e34514b?hl=en

==============================================================================
TOPIC: Friendly GUI for windows building?
http://groups.google.com/group/comp.lang.c++/t/c865fa27ccf9e327?hl=en
==============================================================================

== 1 of 24 ==
Date: Sat, Jan 4 2014 9:22 am
From: ram@zedat.fu-berlin.de (Stefan Ram)


Francois Guillet <guillet.francois@wanadoo.fr> writes:
>Creating many windows and controls is very tedious when the parameters
>of the CreateWindowEx function have to be set manually.
>I'm looking for a tool able to build code automatically from drag and
>drop of objects (buttons, check boxes, edit controls...) onto a first
>empty window, and allowing repositionning, sizing, property settings...

This seems to reduce manual work by adding even more manual work.

What I do is to use the abstraction mechanisms of C++ to actually
reduce manual work. For example, I have written some helper functions
to build Windows dialogs, so that I now can write:

void appendDialogDescription( LPWORD lpw )
{ LPWORD const lpw0 = lpw; WORD n = 0; lpw = my_dialog( lpw, 0, 0 ); int y = 0;
lpw = my_label( lpw, ( y += 10 )+ 2, ID_TEXT_0, "&Hours" ); ++n;
lpw = my_edit( lpw, ( y += 0 )+ 0, ID_EDIT_0, "0" ); ++n;
lpw = my_label( lpw, ( y += 20 )+ 2, ID_TEXT_1, "&Minutes" ); ++n;
lpw = my_edit( lpw, ( y += 0 )+ 0, ID_EDIT_1, "0" ); ++n;
lpw = my_button( lpw, ( y += 20 )+ 0, ID_START, "&Start Shutdown" ); ++n;
lpw = my_button( lpw, ( y += 20 )+ 0, ID_EXIT, "&Exit" ); ++n;
my_dialog( lpw0, ( y += 20 )+ 0, n ); }

. The full code of the program can be found at

http://www.purl.org/stefan_ram/pub/c++-windows

. (Since it was written for tutorial purposes, it should not have gotten too
complicated, therefore I am still using fixed pixel dimensions, such as �10�
and �20�. In a real application these would be abstracted away too.)

Actually, these means of abstraction already are available in C, C++ is not
required.

The way of the programmer.





== 2 of 24 ==
Date: Sat, Jan 4 2014 9:36 am
From: "Alf P. Steinbach"


On 04.01.2014 11:51, Francois Guillet wrote:
>
> Creating many windows and controls is very tedious when the parameters
> of the CreateWindowEx function have to be set manually.
>
> I'm looking for a tool able to build code automatically from drag and
> drop of objects (buttons, check boxes, edit controls...) onto a first
> empty window, and allowing repositionning, sizing, property settings...
>
> This was provided in environments like C++ builder, but I'm searching
> for a more light tool that would generate simple cpp and h files to
> include in my project and that wouldn't need an obscure and heavy
> library (I'm using codeblock/gcc/mingw).

Look for "Resource Editors". These generate dialog resources and header
files. It's pretty old technology but sounds like what you're after.

A dialog can be main window.

You can create such a window from a dialog resource embedded in the
executable, by calling e.g. the DialogBox API function.


Cheers & hth.,

- Alf





== 3 of 24 ==
Date: Sat, Jan 4 2014 1:14 pm
From: David Brown


On 04/01/14 11:51, Francois Guillet wrote:
> Hi
>
> Creating many windows and controls is very tedious when the parameters
> of the CreateWindowEx function have to be set manually.
>
> I'm looking for a tool able to build code automatically from drag and
> drop of objects (buttons, check boxes, edit controls...) onto a first
> empty window, and allowing repositionning, sizing, property settings...
>
> This was provided in environments like C++ builder, but I'm searching
> for a more light tool that would generate simple cpp and h files to
> include in my project and that wouldn't need an obscure and heavy
> library (I'm using codeblock/gcc/mingw).
>
> Some advises?
>
> Thanks

What about using wxWidgets rather than raw Windows API? I don't know
where you draw lines for "heavy" and "light" libraries, but wxWidgets is
certainly not obscure - and there is very good support for it in
Code::Blocks.





== 4 of 24 ==
Date: Sat, Jan 4 2014 1:44 pm
From: Mr Flibble


On 04/01/2014 21:14, David Brown wrote:
> On 04/01/14 11:51, Francois Guillet wrote:
>> Hi
>>
>> Creating many windows and controls is very tedious when the parameters
>> of the CreateWindowEx function have to be set manually.
>>
>> I'm looking for a tool able to build code automatically from drag and
>> drop of objects (buttons, check boxes, edit controls...) onto a first
>> empty window, and allowing repositionning, sizing, property settings...
>>
>> This was provided in environments like C++ builder, but I'm searching
>> for a more light tool that would generate simple cpp and h files to
>> include in my project and that wouldn't need an obscure and heavy
>> library (I'm using codeblock/gcc/mingw).
>>
>> Some advises?
>>
>> Thanks
>
> What about using wxWidgets rather than raw Windows API? I don't know
> where you draw lines for "heavy" and "light" libraries, but wxWidgets is
> certainly not obscure - and there is very good support for it in
> Code::Blocks.

wxWidgets looks too much like MFC making it a bag of shite like MFC is a
bag of shite.

Try Qt; it is the least worst option.

/Flibble





== 5 of 24 ==
Date: Sat, Jan 4 2014 1:58 pm
From: Ike Shaffer


Mr Flibble wrote:

>> What about using wxWidgets rather than raw Windows API? I don't know
>> where you draw lines for "heavy" and "light" libraries, but wxWidgets
>> is certainly not obscure - and there is very good support for it in
>> Code::Blocks.
>
> wxWidgets looks too much like MFC making it a bag of shite like MFC is a
> bag of shite.
>
> Try Qt; it is the least worst option.

Yes, and pay for the shit as well. I guess he goes back to CreateWindowEx




== 6 of 24 ==
Date: Sat, Jan 4 2014 2:08 pm
From: Mr Flibble


On 04/01/2014 21:58, Ike Shaffer wrote:
> Mr Flibble wrote:
>
>>> What about using wxWidgets rather than raw Windows API? I don't know
>>> where you draw lines for "heavy" and "light" libraries, but wxWidgets
>>> is certainly not obscure - and there is very good support for it in
>>> Code::Blocks.
>>
>> wxWidgets looks too much like MFC making it a bag of shite like MFC is a
>> bag of shite.
>>
>> Try Qt; it is the least worst option.
>
> Yes, and pay for the shit as well. I guess he goes back to CreateWindowEx

You only pay for Qt if you want to link statically mate.

/Flibble






== 7 of 24 ==
Date: Sat, Jan 4 2014 2:20 pm
From: woodbrian77@gmail.com


On Saturday, January 4, 2014 4:08:00 PM UTC-6, Mr Flibble wrote:
>
> You only pay for Qt if you want to link statically mate.
>

Please don't swear here. I didn't like MFC either.

Brian




== 8 of 24 ==
Date: Sat, Jan 4 2014 2:41 pm
From: Mr Flibble


On 04/01/2014 22:20, woodbrian77@gmail.com wrote:
> On Saturday, January 4, 2014 4:08:00 PM UTC-6, Mr Flibble wrote:
>>
>> You only pay for Qt if you want to link statically mate.
>>
>
> Please don't swear here. I didn't like MFC either.

Your repeated requests to stop fucking swearing will ALWAYS be ignored
so you may as well stop requesting it.

/Flibble





== 9 of 24 ==
Date: Sat, Jan 4 2014 3:01 pm
From: woodbrian77@gmail.com



We'll see.





== 10 of 24 ==
Date: Sat, Jan 4 2014 3:01 pm
From: Ike Shaffer


Mr Flibble wrote:

> On 04/01/2014 22:20, woodbrian77@gmail.com wrote:
>> On Saturday, January 4, 2014 4:08:00 PM UTC-6, Mr Flibble wrote:
>>>
>>> You only pay for Qt if you want to link statically mate.
>>>
>>>
>> Please don't swear here. I didn't like MFC either.
>
> Your repeated requests to stop fucking swearing will ALWAYS be ignored
> so you may as well stop requesting it.

Well, this is not right fible, you need to pay for that qt shit in anycase,
otherwise you may not distribute your compilation. You are an idiot,




== 11 of 24 ==
Date: Sat, Jan 4 2014 3:13 pm
From: Mr Flibble


On 04/01/2014 23:01, Ike Shaffer wrote:
> Mr Flibble wrote:
>
>> On 04/01/2014 22:20, woodbrian77@gmail.com wrote:
>>> On Saturday, January 4, 2014 4:08:00 PM UTC-6, Mr Flibble wrote:
>>>>
>>>> You only pay for Qt if you want to link statically mate.
>>>>
>>>>
>>> Please don't swear here. I didn't like MFC either.
>>
>> Your repeated requests to stop fucking swearing will ALWAYS be ignored
>> so you may as well stop requesting it.
>
> Well, this is not right fible, you need to pay for that qt shit in anycase,
> otherwise you may not distribute your compilation. You are an idiot,

You are a tool.

"Qt is available under the following copyright licenses:[42]
GNU LGPL[4] 2.1 version with Qt special exception
GNU GPL[43] 3.0 version
Commercial Developer License[5]"

Now go learn what LGPL is, you idiot.

/Flibble






== 12 of 24 ==
Date: Sat, Jan 4 2014 3:27 pm
From: Ike Shaffer


Mr Flibble wrote:

> On 04/01/2014 23:01, Ike Shaffer wrote:
>> Mr Flibble wrote:
>>
>>> On 04/01/2014 22:20, woodbrian77@gmail.com wrote:
>>>> On Saturday, January 4, 2014 4:08:00 PM UTC-6, Mr Flibble wrote:
>>>>>
>>>>> You only pay for Qt if you want to link statically mate.
>>>>>
>>>>>
>>>> Please don't swear here. I didn't like MFC either.
>>>
>>> Your repeated requests to stop fucking swearing will ALWAYS be ignored
>>> so you may as well stop requesting it.
>>
>> Well, this is not right fible, you need to pay for that qt shit in
>> anycase,
>> otherwise you may not distribute your compilation. You are an idiot,
>
> You are a tool.
>
> "Qt is available under the following copyright licenses:[42]
> GNU LGPL[4] 2.1 version with Qt special exception GNU GPL[43] 3.0
> version Commercial Developer License[5]"
>
> Now go learn what LGPL is, you idiot.

Why, can't you read "Commercial Licence"? Idiot.




== 13 of 24 ==
Date: Sat, Jan 4 2014 3:34 pm
From: Mr Flibble


On 04/01/2014 23:27, Ike Shaffer wrote:
> Mr Flibble wrote:
>
>> On 04/01/2014 23:01, Ike Shaffer wrote:
>>> Mr Flibble wrote:
>>>
>>>> On 04/01/2014 22:20, woodbrian77@gmail.com wrote:
>>>>> On Saturday, January 4, 2014 4:08:00 PM UTC-6, Mr Flibble wrote:
>>>>>>
>>>>>> You only pay for Qt if you want to link statically mate.
>>>>>>
>>>>>>
>>>>> Please don't swear here. I didn't like MFC either.
>>>>
>>>> Your repeated requests to stop fucking swearing will ALWAYS be ignored
>>>> so you may as well stop requesting it.
>>>
>>> Well, this is not right fible, you need to pay for that qt shit in
>>> anycase,
>>> otherwise you may not distribute your compilation. You are an idiot,
>>
>> You are a tool.
>>
>> "Qt is available under the following copyright licenses:[42]
>> GNU LGPL[4] 2.1 version with Qt special exception GNU GPL[43] 3.0
>> version Commercial Developer License[5]"
>>
>> Now go learn what LGPL is, you idiot.
>
> Why, can't you read "Commercial Licence"? Idiot.

You don't have to accept the commercial licence, idiot. You can accept
the LGPL licence, idiot.

/Flibble






== 14 of 24 ==
Date: Sat, Jan 4 2014 3:41 pm
From: Ike Shaffer


Mr Flibble wrote:

>> Why, can't you read "Commercial Licence"? Idiot.
>
> You don't have to accept the commercial licence, idiot. You can accept
> the LGPL licence, idiot.

You mean I need to read that crap first. That spoils the fun, since it
would tell me I may not distribute the compilation unless paying a big bag
of money to them.

They are from Finland, they all are gays.




== 15 of 24 ==
Date: Sat, Jan 4 2014 3:43 pm
From: Mr Flibble


On 04/01/2014 23:41, Ike Shaffer wrote:
> Mr Flibble wrote:
>
>>> Why, can't you read "Commercial Licence"? Idiot.
>>
>> You don't have to accept the commercial licence, idiot. You can accept
>> the LGPL licence, idiot.
>
> You mean I need to read that crap first. That spoils the fun, since it
> would tell me I may not distribute the compilation unless paying a big bag
> of money to them.
>
> They are from Finland, they all are gays.

LGPL lets you distribute your application (and the other party's DLLs)
free of charge, idiot.

/Flibble





== 16 of 24 ==
Date: Sat, Jan 4 2014 3:46 pm
From: Ike Shaffer


Mr Flibble wrote:

>> You mean I need to read that crap first. That spoils the fun, since it
>> would tell me I may not distribute the compilation unless paying a big
>> bag of money to them.
>>
>> They are from Finland, they all are gays.
>
> LGPL lets you distribute your application (and the other party's DLLs)
> free of charge, idiot.

Not if you letter charge for your efforts, imbecile.




== 17 of 24 ==
Date: Sat, Jan 4 2014 3:52 pm
From: Mr Flibble


On 04/01/2014 23:46, Ike Shaffer wrote:
> Mr Flibble wrote:
>
>>> You mean I need to read that crap first. That spoils the fun, since it
>>> would tell me I may not distribute the compilation unless paying a big
>>> bag of money to them.
>>>
>>> They are from Finland, they all are gays.
>>
>> LGPL lets you distribute your application (and the other party's DLLs)
>> free of charge, idiot.
>
> Not if you letter charge for your efforts, imbecile.

LGPL lets you distribute commercial proprietary software (i.e.
chargeable) linked with the other party's LPGL DLLs (for free), idiot.

You think changing the follow up group to "alt.ufo.reports" is funny?
It is certainly childish, idiot.

/Flibble






== 18 of 24 ==
Date: Sat, Jan 4 2014 3:57 pm
From: Ike Shaffer


Mr Flibble wrote:

> On 04/01/2014 23:46, Ike Shaffer wrote:
>> Mr Flibble wrote:
>>
>>>> You mean I need to read that crap first. That spoils the fun, since
>>>> it would tell me I may not distribute the compilation unless paying a
>>>> big bag of money to them.
>>>>
>>>> They are from Finland, they all are gays.
>>>
>>> LGPL lets you distribute your application (and the other party's DLLs)
>>> free of charge, idiot.
>>
>> Not if you letter charge for your efforts, imbecile.
>
> LGPL lets you distribute commercial proprietary software (i.e.
> chargeable) linked with the other party's LPGL DLLs (for free), idiot.

Then you contradict yourself, making the "Commercial Licence" invalid,
asshat.




== 19 of 24 ==
Date: Sat, Jan 4 2014 4:01 pm
From: Mr Flibble


On 04/01/2014 23:57, Ike Shaffer wrote:
> Mr Flibble wrote:
>
>> On 04/01/2014 23:46, Ike Shaffer wrote:
>>> Mr Flibble wrote:
>>>
>>>>> You mean I need to read that crap first. That spoils the fun, since
>>>>> it would tell me I may not distribute the compilation unless paying a
>>>>> big bag of money to them.
>>>>>
>>>>> They are from Finland, they all are gays.
>>>>
>>>> LGPL lets you distribute your application (and the other party's DLLs)
>>>> free of charge, idiot.
>>>
>>> Not if you letter charge for your efforts, imbecile.
>>
>> LGPL lets you distribute commercial proprietary software (i.e.
>> chargeable) linked with the other party's LPGL DLLs (for free), idiot.
>
> Then you contradict yourself, making the "Commercial Licence" invalid,
> asshat.

There is no contradiction, idiot. The commercial licence is totally
separate to and what it offers is different to the LGPL license, idiot.
You can choose one or the other, idiot. The LGPL licensed Qt has no
charge, idiot; but you can charge for *your* software, idiot.

If you read my initial reply telling you to read about what LGPL is we
could have perhaps been saved from your idiotic further replies.

/Flibble






== 20 of 24 ==
Date: Sat, Jan 4 2014 4:28 pm
From: Ike Shaffer


Mr Flibble wrote:

>> Then you contradict yourself, making the "Commercial Licence" invalid,
>> asshat.
>
> There is no contradiction, idiot. The commercial licence is totally
> separate to and what it offers is different to the LGPL license, idiot.
> You can choose one or the other, idiot. The LGPL licensed Qt has no
> charge, idiot; but you can charge for *your* software, idiot.

Then I guess you can skip reading that LGPL manifest and just send an e-
mail to them, telling that you intend to use their crap, and make big
money.

Let them call you an imbecile! LOL

You are a wise man flib :)




== 21 of 24 ==
Date: Sat, Jan 4 2014 4:31 pm
From: Mr Flibble


On 05/01/2014 00:28, Ike Shaffer wrote:
> Mr Flibble wrote:
>
>>> Then you contradict yourself, making the "Commercial Licence" invalid,
>>> asshat.
>>
>> There is no contradiction, idiot. The commercial licence is totally
>> separate to and what it offers is different to the LGPL license, idiot.
>> You can choose one or the other, idiot. The LGPL licensed Qt has no
>> charge, idiot; but you can charge for *your* software, idiot.
>
> Then I guess you can skip reading that LGPL manifest and just send an e-
> mail to them, telling that you intend to use their crap, and make big
> money.
>
> Let them call you an imbecile! LOL
>
> You are a wise man flib :)

I've decided that as well as being an idiot you are also a troll so
welcome to my killfile.

/Flibble





== 22 of 24 ==
Date: Sat, Jan 4 2014 4:36 pm
From: Ike Shaffer


Mr Flibble wrote:

>> Then I guess you can skip reading that LGPL manifest and just send an
>> e-
>> mail to them, telling that you intend to use their crap, and make big
>> money.
>>
>> Let them call you an imbecile! LOL
>>
>> You are a wise man flib
>
> I've decided that as well as being an idiot you are also a troll so
> welcome to my killfile.

Ohh yes, you lost the debate, proved as imbecile.

Just send that email, flib, tell them you won't register nor pay a shit.

Let them conclude this discussion. No need need for their LGPL reading.




== 23 of 24 ==
Date: Sat, Jan 4 2014 8:01 pm
From: "Alf P. Steinbach"


On 05.01.2014 01:36, Ike Shaffer wrote his umpteenth noise article:
>
> Ohh yes, you lost the debate, proved as imbecile.

plink






== 24 of 24 ==
Date: Sat, Jan 4 2014 8:06 pm
From: Öö Tiib


On Sunday, 5 January 2014 02:36:34 UTC+2, Ike Shaffer wrote:
> Mr Flibble wrote:
>
> >> Then I guess you can skip reading that LGPL manifest and just send an
> >> e-
> >> mail to them, telling that you intend to use their crap, and make big
> >> money.
> >>
> >> Let them call you an imbecile! LOL
> >>
> >> You are a wise man flib
> >
> > I've decided that as well as being an idiot you are also a troll so
> > welcome to my killfile.
>
> Ohh yes, you lost the debate, proved as imbecile.
>
> Just send that email, flib, tell them you won't register nor pay a shit.
>
> Let them conclude this discussion. No need need for their LGPL reading.

It is perfectly legal to use dynamically linked Qt in commercially
(or how ever you want to license it) distributed application. There are
only such limitations:
1. Your application must be dynamically linked to the Qt components that
came with your downloaded LGPL Qt distribution. No static linking allowed.
2. You can't make changes to the Qt source code itself and sell your
application based on the changed version of Qt.
3. You must inform users of your application that Qt is used in the
application in some licence text or in a readme somewhere within your
distributed application files.
4. You must provide a copy of the Qt LGPL licence file together with your
distributed application files.

These things above can't be show stopper problems.

The biggest annoyance with Qt is that it tends to create large binaries.
Lesser annoyance is that it uses custom preprocessors that do not
understand too well C++ (particularily templates and preprocessor) and
other tools tend also not to understand Qt crap (underlining it red
and reporting errors).





==============================================================================
TOPIC: Behavior of the local class
http://groups.google.com/group/comp.lang.c++/t/485b73a7b838fdff?hl=en
==============================================================================

== 1 of 1 ==
Date: Sat, Jan 4 2014 11:18 am
From: "K. Frank"


Hi somenath (and Alf and Victor)!

On Thursday, January 2, 2014 10:15:57 AM UTC-5, Alf P. Steinbach wrote:
> On 02.01.2014 10:22, somenath wrote:
> > I am not able to understand why the following program does not compile.
> > ...
> > Whenever I try to compile the program I get the following error
> > g++ LocalClass.cpp
> > /tmp/ccfEKvyT.o:LocalClass.cpp:(.text+0x2b): undefined reference to `i'
> > collect2: ld returned 1 exit status
>
> This is known g++ bug, already reported at
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52688
> As a workaround you can pass the referenced static variable as an
> argument, or maybe move it inside the class, or ...
>
> Cheers & hth.,
> - Alf

I tried this with my copy of g++.

For what it's worth, your code compiles and runs fine
when I compile it with a mingw-w64 version of g++:

C:\>g++ --version
g++ (rubenvb-4.8-stdthread) 4.8.1 20130324 (prerelease)


Happy New Year Hacking!


K. Frank





==============================================================================
TOPIC: Practice of basic concepts
http://groups.google.com/group/comp.lang.c++/t/44be24048e34514b?hl=en
==============================================================================

== 1 of 1 ==
Date: Sat, Jan 4 2014 4:45 pm
From: Luca Risolia


Stefan Ram wrote:

> "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> writes:
>>Display a 10*10 multiplication table, nicely formatted.
>
> ::std::cout << /* not tested */
> " | 0 1 2 3 4 5 6 7 8 9\n"
> "--|----------------------------------------\n"
> " 0| 0 0 0 0 0 0 0 0 0 0\n"
> " 1| 0 1 2 3 4 5 6 7 8 9\n"
> " 2| 0 2 4 6 8 10 12 14 16 18\n"
> " 3| 0 3 6 9 12 15 18 21 24 27\n"
> " 4| 0 4 8 12 16 20 24 28 32 36\n"
> " 5| 0 5 10 15 20 25 30 35 40 45\n"
> " 6| 0 6 12 18 24 30 36 42 48 54\n"
> " 7| 0 7 14 21 28 35 42 49 56 63\n"
> " 8| 0 8 16 24 32 40 48 56 64 72\n"
> " 9| 0 9 18 27 36 45 54 63 72 81\n";

::std::cout << R"(
| 0 1 2 3 4 5 6 7 8 9
--+----------------------------------------
0| 0 0 0 0 0 0 0 0 0 0
1| 0 1 2 3 4 5 6 7 8 9
2| 0 2 4 6 8 0 12 14 16 18
3| 0 3 6 9 12 15 18 21 24 27
4| 0 4 8 12 16 20 24 28 32 36
5| 0 5 10 15 20 25 30 35 40 45
6| 0 6 12 18 24 30 36 42 48 54
7| 0 7 14 21 28 35 42 49 56 63
8| 0 8 16 24 32 40 48 56 64 72
9| 0 9 18 27 36 45 54 63 72 81
)";





==============================================================================

You received this message because you are subscribed to the Google Groups "comp.lang.c++"
group.

To post to this group, visit http://groups.google.com/group/comp.lang.c++?hl=en

To unsubscribe from this group, send email to comp.lang.c+++unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.c++/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

No comments: