RE: FruitBasket-MFC

  • From: "Ken Perry" <whistler@xxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Mon, 19 Nov 2007 17:47:02 -0800


No worries I was missing a lib from your long list there and amazingly
enough I had found the page your talking about but I didn't read down far
enough before quitting because I thought it was just talking about IDE.  I
will go back and read it again 5 or six times.  Then I will complete this
mess.

Ken 

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of jaffar
Sent: Monday, November 19, 2007 4:26 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: FruitBasket-MFC

Ok Ken.  Thought i couldn't propperly concentrate on my work if i didn't
resolve this mystery that you posed, so here it is.  As reference, I read up
on the the mfc msdn documentation and also went to the microsoft site to do
a bit of research.  I am assuming here that you have already set your
project to be writtenin mfc, so I'll skip the primiminaries.
To build your MFC project with the ide,
1. go to view, solution explorer, then arrow up until you hear the title or
name you have given your project.  You will hear something like "exercise, 3
items", for example.
2.  go again to the view menu and arrow up to Properties Pages and press
enter.
3.  Tab until your hear reference.  Arrow down once to configuration.  Right
arrow once.  You'll come to the general tab. Tab once.  You will come to a
group of choices available for you to set.  Arrow down until you hear "Use
Of MFC".  By default, the choice you are given is "Use MFC in a static
library".  Now, tab twice to the browse button.  Press the space bar.  There
are 3 options for you to choose from.  Arrow down to the third option which
is "Use MFC in a shared dll"
4. press ok.
Once you have done that,  Your MFC project will be able to call the needed
routines from the MFCxx(d).dll file.
Using Nmake and makefiles
If you want to build your MFC apps using the command line, then there are
several adjustments you'll need to make to your makefile in order to support
the compiler and linker options.
Set the flags as follows:
/D_AFXDLL /MD
/D_AFXDLL.
Note that the standard MFC headers need the /MD symbol to be defined.  Also
note that the MFC application must use the DLL version of the C runtime
library.
Standard preprocessor flags like debug, for example need to be replaced with
_debug.
Next, you'll have to edit the linker list of libraries.
Change NAFXCWD.LIB to MFCxxD.LIB and change NAFXCW.LIB to MFCxx.LIB.
Replace LIBC.LIB with MSVCRT.LIB.
As with any other MFC library, it
is important that MFCxxD.LIB is placed
before any C-runtime libraries.
Optionally add /D_AFXDLL
 to both your retail and debug resource compiler options (the one that
actually compiles the resources with /R ). This makes your final executable
smaller by sharing the resources that are present in the MFC DLLs.
A full rebuild is required after these changes  are made.  I have just tried
the nmake option and it works fine.  If you need a sample makefile, I'll be
glad to write out one, but i must rush off to work now or i'll never get to
hear the end of it.  Cheers!
----- Original Message -----
From: "jaffar" <jaffar@xxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, November 20, 2007 7:28 AM
Subject: Re: FruitBasket-MFC


> Hi Ken.  Are you using VCExpress?  Cheers!
> ----- Original Message -----
> From: "Ken Perry" <whistler@xxxxxxxxxxxxx>
> To: <programmingblind@xxxxxxxxxxxxx>
> Sent: Tuesday, November 20, 2007 6:31 AM
> Subject: RE: FruitBasket-MFC
>
>
>>
>>
>> I know this but it will not link.  I know there is a flag I am 
>> missing but I have not been able to find it.  I would rather like to 
>> keep my code till I have got it to link.  I guess if you can not tell 
>> me what flags and libraries need to be on the command line for hand 
>> compiling MFC code then I will continue to look on google.
>>
>> Ken
>>
>> -----Original Message-----
>> From: programmingblind-bounce@xxxxxxxxxxxxx
>> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of jaffar
>> Sent: Monday, November 19, 2007 2:27 PM
>> To: programmingblind@xxxxxxxxxxxxx
>> Subject: Re: FruitBasket-MFC
>>
>> Hi Ken.  Could you send me your code for the MFC's minimalist 
>> fruitBasket so I can take a look at it.  I'll see how i can adapt it, 
>> then include the appropiate instructions with the finished code.  
>> Cheers!  Btw, You need not use WinMain() or Main() with mfc because 
>> the class CMyApp : public CWinApp declaration will call the Winmain() 
>> function.  Cheers!
>> ----- Original Message -----
>> From: "Ken Perry" <whistler@xxxxxxxxxxxxx>
>> To: <programmingblind@xxxxxxxxxxxxx>
>> Sent: Tuesday, November 20, 2007 4:50 AM
>> Subject: RE: FruitBasket-MFC
>>
>>
>>>
>>>
>>> I already have one almost written the trouble only is in the linking 
>>> stage it refuses to link because it can't find main.  Well there 
>>> isn't a
>> main.
>>> The main is actually called WinMainCRTStartup and its in an MFC dll 
>>> some where.  If someone like Jafar knows what switch I have to put 
>>> on the command line I can have a single file FruitBasket rather quick.
>>>
>>> Ken
>>>
>>> -----Original Message-----
>>> From: programmingblind-bounce@xxxxxxxxxxxxx
>>> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of jaffar
>>> Sent: Monday, November 19, 2007 8:43 AM
>>> To: programmingblind@xxxxxxxxxxxxx
>>> Subject: Re: FruitBasket-MFC
>>>
>>> Hi Jamal.  Very true.  I'll see if i can write out one over this 
>>> week end.
>>> Anyway, I find MFC less cumbersome than actually writing for windows 
>>> using native c++.  Cheers!
>>> ----- Original Message -----
>>> From: "Jamal Mazrui" <empower@xxxxxxxxx>
>>> To: <programmingblind@xxxxxxxxxxxxx>
>>> Sent: Tuesday, November 20, 2007 12:29 AM
>>> Subject: Re: FruitBasket-MFC
>>>
>>>
>>>> Hi Jaffar,
>>>> That's good to know that hand coding, without wizards and code 
>>>> generators, is also possible with MFC and VS.  If you get a chance, 
>>>> I would be keenly interested in examining a single file, minimalist 
>>>> fruit basket program compiled with VC++.  Personally, I find that 
>>>> multiple source, header, and resource files tmake the code 
>>>> difficult to
>>> comprehend.
>>>>
>>>> Jamal
>>>> On Tue,
>>>> 20 Nov 2007, jaffar wrote:
>>>>
>>>>> Date: Tue, 20 Nov 2007 00:12:54 +0800
>>>>> From: jaffar <jaffar@xxxxxxxxxxxxx>
>>>>> Reply-To: programmingblind@xxxxxxxxxxxxx
>>>>> To: programmingblind@xxxxxxxxxxxxx
>>>>> Subject: Re: FruitBasket-MFC
>>>>>
>>>>> Hi Jamal.  As far as I understand it, MFC itself is a microsoft 
>>>>> created library-cum-wrapper for Win32 programming.  As far As I am 
>>>>> Concerned, I just create MFC applications without the use of the 
>>>>> readily available App Wizards with Visual Studio.  I just start 
>>>>> from scratch from and empty project and hand code the app myself 
>>>>> which i find to be more productive.  Cheers!
>>>>> ----- Original Message -----
>>>>> From: "Jamal Mazrui" <empower@xxxxxxxxx>
>>>>> To: <programmingblind@xxxxxxxxxxxxx>
>>>>> Sent: Monday, November 19, 2007 9:45 PM
>>>>> Subject: RE: FruitBasket-MFC
>>>>>
>>>>>
>>>>> > I'm looking forward to studying your code, Ken.  I have no 
>>>>> > experience with the dialog editor myself, and wonder whether it 
>>>>> > would be possible to develop with MFC without it, by using a 
>>>>> > version of CreateDialogIndirect (or equivalent for regular 
>>>>> > application windows), whereby control attributes are specified 
>>>>> > via memory structures at runtime.  Are there wrappers to help 
>>>>> > develop in this way?
>>>>> >
>>>>> > Jamal
>>>>> > On Sun, 18 Nov 2007, Ken Perry wrote:
>>>>> >
>>>>> >> Date: Sun, 18 Nov 2007 22:36:42 -0800
>>>>> >> From: Ken Perry <whistler@xxxxxxxxxxxxx>
>>>>> >> Reply-To: programmingblind@xxxxxxxxxxxxx
>>>>> >> To: programmingblind@xxxxxxxxxxxxx
>>>>> >> Subject: RE: FruitBasket-MFC
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> Oh yeah same for Jaws and I am betting most screen readers.  
>>>>> >> Like I said I was able to drop the controls but I had to go in 
>>>>> >> and edit their locations because the dialog can not be tabbed 
>>>>> >> through like the Form editor with Jaws.
>>>>> >> I mean when you read tutorials on MFC they say just select the 
>>>>> >> button and hit enter and it will give you a list of properties 
>>>>> >> or stuff like that.
>>>>> >> Well In my case the add button and delete button and edit box 
>>>>> >> were all visible but the list box was not on the screen.  I 
>>>>> >> maximized the dialog with Alt-space but that didn't seem to help.
>>>>> >> I finally just went to the resource file and edited it with the 
>>>>> >> source code editor which means you have to sit down and figure 
>>>>> >> out where each control should go.  I am not complaining because 
>>>>> >> you can do it and it gives you full control over the dialog .
>>>>> >> It
>>>>> >> could be worse as we all know because visual c++ 6 and jaws you 
>>>>> >> couldn't even select the controls and drop them on the dialog.
>>>>> >> At least now you can drop them and arrange them later.
>>>>> >>
>>>>> >> Ken
>>>>> >>
>>>>> >>   _____
>>>>> >>
>>>>> >> From: programmingblind-bounce@xxxxxxxxxxxxx
>>>>> >> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of 
>>>>> >> jaffar
>>>>> >> Sent: Sunday, November 18, 2007 10:30 PM
>>>>> >> To: programmingblind@xxxxxxxxxxxxx
>>>>> >> Subject: Re: FruitBasket-MFC
>>>>> >>
>>>>> >>
>>>>> >> Hi Ken.  Would agree with you there.  The resource editor is 
>>>>> >> not really accessible, although with window eyes, one could use 
>>>>> >> the num pad to read some info on the screen.  I wish it were 
>>>>> >> more accessible though.
>>>>> >> Cheers!
>>>>> >>
>>>>> >> ----- Original Message -----
>>>>> >> From: Ken  <mailto:whistler@xxxxxxxxxxxxx> Perry
>>>>> >> To: programmingblind@xxxxxxxxxxxxx
>>>>> >> Sent: Monday, November 19, 2007 2:09 PM
>>>>> >> Subject: FruitBasket-MFC
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> You ask for it you got it.  Here it is the one the only 
>>>>> >> FruitBasket in MFC.
>>>>> >> The hardest part of writing this was using the resource editor.
>>>>> >> It was like being back in Visual studio 6.  Why they didn't 
>>>>> >> just make the current dialog editor work for the old resources 
>>>>> >> I don't know.  I doubt they will fix this in 2008 but we can all
pray.
>>>>> >> Jamal have you tried the MFC resource editor and do you think 
>>>>> >> it could be made to be accessible like the forms editor?
>>>>> >>
>>>>> >> Anyway even with the problems I was able to make the 
>>>>> >> FruitBasket program in little to no time so here it is.  Note 
>>>>> >> most of the guts of the program is in FruitBasketDlg.cpp and 
>>>>> >> FruitBasketDlg.h I am going to try to make a minimalist version 
>>>>> >> of this but the trouble I had with a single source version of 
>>>>> >> this was the command line options.  Microsoft has not made it 
>>>>> >> easy to just compile an MFC application.  Further more a single 
>>>>> >> cpp file would need all the controls done dynamically rather 
>>>>> >> than in a resource
>> file.
>>>>> >> While that would get around the problems I had with the 
>>>>> >> resource editor, I find fighting with the resource files easier 
>>>>> >> than writing all the code to create the controls dynamically.  
>>>>> >> This doesn't mean I won't make a minimalist version of the MFC 
>>>>> >> FruitBasket it just means it is not done yet.
>>>>> >> I will most likely make it when I re make the win32 version I lost.
>>>>> >>
>>>>> >> OK here is the link to the two archives of the MFC version.  I 
>>>>> >> made two because some people on this list like .rar and some 
>>>>> >> like .zip.
>>>>> >> Inthane
>>>>> >> use
>>>>> >> which ever you want to on the page it is the same file.  The 
>>>>> >> executable is under the release directory.
>>>>> >>
>>>>> >> .rar:
>>>>> >>  <http://www.blinksoft.com/~whistler/FruitBasket-MFC.rar>
>>>>> >> http://www.blinksoft.com/~whistler/FruitBasket-MFC.rar
>>>>> >> .zip
>>>>> >>  <http://www.blinksoft.com/~whistler/FruitBasket-MFC.zip>
>>>>> >> http://www.blinksoft.com/~whistler/FruitBasket-MFC.zip
>>>>> >>
>>>>> >> Ken
>>>>> >>
>>>>> >>
>>>>> > __________
>>>>> > View the list's information and change your settings at 
>>>>> > //www.freelists.org/list/programmingblind
>>>>> >
>>>>>
>>>>> __________
>>>>> View the list's information and change your settings at 
>>>>> //www.freelists.org/list/programmingblind
>>>>>
>>>> __________
>>>> View the list's information and change your settings at 
>>>> //www.freelists.org/list/programmingblind
>>>>
>>>
>>> __________
>>> View the list's information and change your settings at 
>>> //www.freelists.org/list/programmingblind
>>>
>>> __________
>>> View the list's information and change your settings at 
>>> //www.freelists.org/list/programmingblind
>>>
>>
>> __________
>> View the list's information and change your settings at 
>> //www.freelists.org/list/programmingblind
>>
>> __________
>> View the list's information and change your settings at 
>> //www.freelists.org/list/programmingblind
>>
>
> __________
> View the list's information and change your settings at 
> //www.freelists.org/list/programmingblind
> 

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: