Author Topic: Cadís uI MFC Classes.  (Read 5307 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Cadís uI MFC Classes.
« on: July 25, 2007, 06:33:42 AM »
Whatís the benefit of using AutoCADís MFC UI classes? I tried using CAdUiListCtrl in place of CListCtrl
and I found that they behave quite differently.

::GetSubItemRect required different arguments
::SetColumnOrderArray seemed to behave differently.
Etc..

They are both usable, but this adds confusion to newb pupils trying to get a handle on MFC. What do You use master?


LE

  • Guest
Re: Cadís uI MFC Classes.
« Reply #1 on: July 25, 2007, 09:30:07 AM »
Whatís the benefit of using AutoCADís MFC UI classes? I tried using CAdUiListCtrl in place of CListCtrl
and I found that they behave quite differently.

::GetSubItemRect required different arguments
::SetColumnOrderArray seemed to behave differently.
Etc..

They are both usable, but this adds confusion to newb pupils trying to get a handle on MFC. What do You use master?

You will be end up rolling your own from MFC.... those classes are not well documented.

There are some advantages for example when you derive from CAcUiDialog you have the registry lockup and storage.

There are classes like the CAdUiBitmapButton that provides tooltips, autoload, etc.... but is not simple to understand...

(but I see you are only focus on the CListCtrl)

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Cadís uI MFC Classes.
« Reply #2 on: July 25, 2007, 10:35:14 AM »
Thanks for the reply Luis, I was only referencing CListCtrl as this what I am playing with now.
I have been deriving from CAcUiDialog which seems to work very well.
I suppose I need to learn each of the built-in AutoCAD controls as well as the standard MFC ones,
so I am not re-inventing anything.

Have you converted to solely using .NET? or are you still doing Arx too.

Thanks

LE

  • Guest
Re: Cadís uI MFC Classes.
« Reply #3 on: July 25, 2007, 10:56:41 AM »
Have you converted to solely using .NET? or are you still doing Arx too.

Nope, the C# I been doing it is just for play and for learning purposes - all my base functions are in C++/ARX and the UI's in MFC

well, all I do about programming is just for a hobby - :)

MP

  • Seagull
  • Posts: 17450
Re: Cadís uI MFC Classes.
« Reply #4 on: July 25, 2007, 10:59:33 AM »
well, all I do about programming is just for a hobby

{ blink } Sorry Luis but I'm genuinely confused by this statement -- What about all the software and source code you've sold?
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

LE

  • Guest
Re: Cadís uI MFC Classes.
« Reply #5 on: July 25, 2007, 11:10:20 AM »
well, all I do about programming is just for a hobby

{ blink } Sorry Luis but I'm genuinely confused by this statement -- What about all the software and source code you've sold?

Hi Michael;

I did that in the past, and lately all I have been doing about programming (with some minor exceptions) it is to keep my hobby alive and my mind busy - :)

MP

  • Seagull
  • Posts: 17450
Re: Cadís uI MFC Classes.
« Reply #6 on: July 25, 2007, 11:19:58 AM »
I hear what you're saying Luis but that's a little like Tiger Woods saying he's decided to take up recreational golf.

:)
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

Paul Richardson

  • Guest
Re: Cadís uI MFC Classes.
« Reply #7 on: July 25, 2007, 12:15:42 PM »
well, all I do about programming is just for a hobby

{ blink } Sorry Luis but I'm genuinely confused by this statement -- What about all the software and source code you've sold?

Hi Michael;

I did that in the past, and lately all I have been doing about programming (with some minor exceptions) it is to keep my hobby alive and my mind busy - :)

Luis - If you are in need of brain stimulation - a nice MFC tutorial would be helpful to us...`~)

Anyone remember a post here a while back that pointed to a link on using the win api directly instead of MFC? I realize there is plenty out there but I recall the OP stating it was a pretty good link.

LE

  • Guest
Re: Cadís uI MFC Classes.
« Reply #8 on: July 25, 2007, 12:28:09 PM »
Luis - If you are in need of brain stimulation - a nice MFC tutorial would be helpful to us...`~)

He he.... (Paul, I recall that Owen mentioned that he will be doing a tutorial, base on the OpenDCL project - not 100% sure on that - if he does it, then there will be plenty of MFC stuff) - I can post MFC samples - but a tutorial - that's to much (I guess)

Quote
Anyone remember a post here a while back that pointed to a link on using the win api directly instead of MFC? I realize there is plenty out there but I recall the OP stating it was a pretty good link.

I remember that Cornbread (Andy) wrote some excellent topic about this.... hmm but not sure... on where they might be :-(
« Last Edit: July 25, 2007, 12:31:31 PM by LE »

Paul Richardson

  • Guest
Re: Cadís uI MFC Classes.
« Reply #9 on: July 25, 2007, 01:01:16 PM »
Luis - If you are in need of brain stimulation - a nice MFC tutorial would be helpful to us...`~)

He he.... (Paul, I recall that Owen mentioned that he will be doing a tutorial, base on the OpenDCL project - not 100% sure on that - if he does it, then there will be plenty of MFC stuff) - I can post MFC samples - but a tutorial - that's to much (I guess)

Quote
Anyone remember a post here a while back that pointed to a link on using the win api directly instead of MFC? I realize there is plenty out there but I recall the OP stating it was a pretty good link.

I remember that Cornbread (Andy) wrote some excellent topic about this.... hmm but not sure... on where they might be :-(

Just ribbing ya on the turorial... I actually have Charles McAuley's book which has a section on MFC. I'll do a serach on Cornbread for the link - Thank you!

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6941
  • AKA Daniel
Re: Cadís uI MFC Classes.
« Reply #10 on: July 25, 2007, 01:45:15 PM »
Paul

Here is a link for you http://www.winprog.org/ ,
also if you look around at Pelles you can find a lot of good info for low level WinAPI stuff
http://www.smorgasbordet.com/pellesc/index.htm

There is a new WTL 8.0 out that looks very interesting too
http://sourceforge.net/projects/wtl

Paul Richardson

  • Guest
Re: Cadís uI MFC Classes.
« Reply #11 on: July 25, 2007, 03:32:25 PM »
Paul

Here is a link for you http://www.winprog.org/ ,
also if you look around at Pelles you can find a lot of good info for low level WinAPI stuff
http://www.smorgasbordet.com/pellesc/index.htm

There is a new WTL 8.0 out that looks very interesting too
http://sourceforge.net/projects/wtl


Thanks Daniel... I got some tips from Kean on getting intellisense working better in C++/CLI. I'll post once I've got a change to try.

MickD

  • Gator
  • Posts: 3310
  • (x-in)->[process]->(y-out)
Re: Cadís uI MFC Classes.
« Reply #12 on: July 25, 2007, 06:11:38 PM »
....
Anyone remember a post here a while back that pointed to a link on using the win api directly instead of MFC?

Was it this link?

It's been a while but I think the benefits of using the acad mfc controls is a better option if using mfc due to many things already mentioned and also the 'focus' issue as discussed in the link above (although cornbread remembered a simple fix for this in the end).

While the win32 api doesn't contain any real 'bling' as is it's very possible to achieve with a bit of study, basically you can start with a blank canvas and draw/write whatever you want and in whatever shape then handle whatever messages you care to catch. In fact you could create you own UI lib from scratch if you wished but you could achieve good results by just sub classing existing controls and hijacking the window procedure to draw and do as you like.
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

Lao Tzu: ďTo attain knowledge, add things
every day; to obtain wisdom, remove things every day.Ē

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Cadís uI MFC Classes.
« Reply #13 on: July 25, 2007, 06:19:35 PM »

The guy who wrote the home page for EFNet #Winprog gets full points in my book !!


...
Here is a link for you http://www.winprog.org/ ,
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Paul Richardson

  • Guest
Re: Cadís uI MFC Classes.
« Reply #14 on: July 25, 2007, 08:23:44 PM »
....
Anyone remember a post here a while back that pointed to a link on using the win api directly instead of MFC?

Was it this link?

It's been a while but I think the benefits of using the acad mfc controls is a better option if using mfc due to many things already mentioned and also the 'focus' issue as discussed in the link above (although cornbread remembered a simple fix for this in the end).

While the win32 api doesn't contain any real 'bling' as is it's very possible to achieve with a bit of study, basically you can start with a blank canvas and draw/write whatever you want and in whatever shape then handle whatever messages you care to catch. In fact you could create you own UI lib from scratch if you wished but you could achieve good results by just sub classing existing controls and hijacking the window procedure to draw and do as you like.

Yes Thanks... Thanks for the info on MFC - I'll stick with it.