NO

Author Topic: New to Cprogramming, new to Pelles C, GUI ?  (Read 13886 times)

vmars316

  • Guest
Re: New to Cprogramming, new to Pelles C, GUI ?
« Reply #15 on: April 21, 2012, 07:40:23 PM »
Hey, great Thread guys:

Tater: Thanks for that code, excellent docs, very tutorial.
            Are all your programs documented that well?
             Great stuff! I'll will run it.
 
"Our friend, however, will not learn programming by avoiding programming..."
I think that is a true statement.

Let me ask you this
    Do you retype this(below) every time:

// create the window
VOID CreateMainWindow(void)
  { WNDCLASS  wc;                     
    // register App Class
    memset(&wc,0,sizeof(wc));
    wc.style          = CS_CLASSDC;
    wc.hInstance      = Inst;
    wc.hCursor        = LoadCursor(NULL,IDC_ARROW);
    wc.hbrBackground  = CreateSolidBrush(GetSysColor(COLOR_3DFACE));
    wc.lpfnWndProc    = &MsgProc;
    wc.lpszClassName  = L"TINY_UNICODE";
    RegisterClass(&wc);
    // create the main window
    Wind[0] = CreateWindowEx( WS_EX_CONTROLPARENT,
                    L"TINY_UNICODE",L"Tiny Unicode Editor",
                    WS_OVERLAPPEDWINDOW,
                    CW_USEDEFAULT,0,500,300,NULL,NULL,Inst,NULL);

OR
do you hand type it in each time ?
Or paste it in?
Or use a template of sorts.
That's all I am saying.
I call it being practical, you might call it being lazy, or unprofessional.

Dialogs: sounds interesting, I'll check it out.

But I like fast, tiny, and pretty.
Most "C" programs i see, are fast,tiny, but not pretty.
Usually, standard system colors, ugh!
Colorizing is also an artistic phase of programming.

BTW: I am planning to DIY (External-heart-pump, EECP). 
            For that i'll be using an Arduino micro. Which uses a subset of "C".
            So, i'm thinking, since I am learning C anyways, why not learn it good ?

Thanks ALL...Vernon

 www.vmars316.com

CommonTater

  • Guest
Re: New to Cprogramming, new to Pelles C, GUI ?
« Reply #16 on: April 21, 2012, 09:08:23 PM »
But let us stop the discussion about window and dialog based, everbody should do in way which is most familar for him/her.

It's interesting to learn about other programmers and how they think.
But I agree... this isn't what the OP asked, is it?

CommonTater

  • Guest
Re: New to Cprogramming, new to Pelles C, GUI ?
« Reply #17 on: April 21, 2012, 09:27:57 PM »
Hey, great Thread guys:

Tater: Thanks for that code, excellent docs, very tutorial.
            Are all your programs documented that well?
             Great stuff! I'll will run it.

Yes... some better.  I always ask myself: "What if I have to come back to this in 5 years?" ... It would be nice to still be able to follow it.

Quote
Let me ask you this
do you hand type it in each time ?
Or paste it in?
Or use a template of sorts.

By hand.  Every program is a little different, the class name is different, sometimes the class options are different, there a differing number of windows of differing types and sizes... so, yes, I do generally end up hand typing the whole thing for each new project.  That is to say that, for me, every project starts with a blank page...

Quote
That's all I am saying.
I call it being practical, you might call it being lazy, or unprofessional.

Not at all... Pelles C supports both Wizards and code snippets. The facility exists, no harm in using it... All I was suggesting is that *until you understand it* doing it by hand is usually a better way to learn.

Quote
But I like fast, tiny, and pretty.
Most "C" programs i see, are fast,tiny, but not pretty.
Usually, standard system colors, ugh!
Colorizing is also an artistic phase of programming.

I don't know if you're aware of this or not but there are "coding standards" for Windows programs. The reason for this is quite simple... so that end users don't struggle to adjust from one program to the next.  The idea is that a consistent appearance and consistent behaviours from one program to the next makes the computer easier to operate... and I agree. 

http://msdn.microsoft.com/en-us/library/windows/desktop/aa511258.aspx

The attached image is a perfect example of now NOT to write a windows program....
 
« Last Edit: April 21, 2012, 09:34:39 PM by CommonTater »