Click here to Skip to main content
15,918,471 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: right to left layout Pin
23-Mar-02 2:11
suss23-Mar-02 2:11 
GeneralRe: right to left layout Pin
24-Mar-02 9:35
suss24-Mar-02 9:35 
Generalsetfocus Pin
23-Mar-02 0:25
suss23-Mar-02 0:25 
GeneralRe: setfocus Pin
Nish Nishant23-Mar-02 2:48
sitebuilderNish Nishant23-Mar-02 2:48 
QuestionDAO problem using "%"or bug ? Pin
Wizard_0122-Mar-02 23:27
Wizard_0122-Mar-02 23:27 
Generalident lookup(rfc 931/1413) Pin
22-Mar-02 23:25
suss22-Mar-02 23:25 
GeneralClasswizard / add member function Pin
moliate22-Mar-02 21:42
moliate22-Mar-02 21:42 
GeneralRe: Classwizard / add member function Pin
Ben Burnett23-Mar-02 6:35
Ben Burnett23-Mar-02 6:35 
You should consider beatifying your macro, because modifying the class wizard to do your bidding won’t work. I tried doing something similar a few years back, and I ran into several problems:

1) The resource used to write the function implementation is the same one used to write the declaration. Meaning that you would get duplicates of any additions you make, one in the *.h file and the same in the *.cpp file. Also the one added to the *.h will have to be manually removed, as it messes with the class wizards parser.

2) The resource ‘script’ parser is not very advanced. It simply grabs the stuff out of the reswource string line-by-line without doing any validation. Take for example the following WM_SIZE handler resource;

1: OnSize
2: void
3: UINT nType, int cx, int cy
4: %1::%2(nType, cx, cy);
5:
6: %4 Add your message handler code here

Line 1 is used to name the handler, and as the display string in the class wizard.
Line 2 is the return type
Line 3 is the handler’s parameter list
Line 4 generates code that calls the handler’s base class
Line 5 adds a blank line to the code
Line 6 is that stupid comment you delete instantly

So, you could add your comment into line 2, but you’d have to enter it all on the one line. Then once you used the class wizard to inserted it, you’d have to delete the comment out of the *.h (so that you don’t confuse the class wizard’s parser) and then format the comment in the *.cpp.

If your still interested in taking a look at all of this stuff just look for the MFCCLWZ.DLL file in your Visual Studio installation directory under “Common\MSDev98\Bin”. It’s all in there, under the "STRINGARRAY" resource type.


cheers,
-Ben
GeneralRe: Classwizard / add member function Pin
moliate23-Mar-02 8:15
moliate23-Mar-02 8:15 
GeneralModaless dialog Pin
RichardWdy22-Mar-02 21:31
RichardWdy22-Mar-02 21:31 
GeneralRe: Modaless dialog Pin
Nish Nishant22-Mar-02 21:41
sitebuilderNish Nishant22-Mar-02 21:41 
GeneralRe: Modaless dialog Pin
RichardWdy22-Mar-02 22:03
RichardWdy22-Mar-02 22:03 
GeneralRe: Modaless dialog Pin
Nish Nishant22-Mar-02 22:12
sitebuilderNish Nishant22-Mar-02 22:12 
GeneralRe: Modaless dialog Pin
RichardWdy22-Mar-02 22:47
RichardWdy22-Mar-02 22:47 
GeneralEdit control focus... Pin
Neha22-Mar-02 21:19
Neha22-Mar-02 21:19 
QuestionHow to run the services MMC ? Pin
22-Mar-02 20:19
suss22-Mar-02 20:19 
AnswerRe: How to run the services MMC ? Pin
Nish Nishant22-Mar-02 20:38
sitebuilderNish Nishant22-Mar-02 20:38 
GeneralRe: How to run the services MMC ? Pin
22-Mar-02 20:46
suss22-Mar-02 20:46 
GeneralRe: How to run the services MMC ? Pin
Nish Nishant22-Mar-02 20:58
sitebuilderNish Nishant22-Mar-02 20:58 
GeneralRe: How to run the services MMC ? Pin
adara22-Mar-02 20:59
adara22-Mar-02 20:59 
GeneralRe: How to run the services MMC ? Pin
Nish Nishant22-Mar-02 21:16
sitebuilderNish Nishant22-Mar-02 21:16 
AnswerRe: How to run the services MMC ? Pin
David Wengier22-Mar-02 21:06
David Wengier22-Mar-02 21:06 
GeneralRe: How to run the services MMC ? Pin
Nish Nishant22-Mar-02 21:20
sitebuilderNish Nishant22-Mar-02 21:20 
GeneralRe: How to run the services MMC ? Pin
David Wengier22-Mar-02 21:21
David Wengier22-Mar-02 21:21 
GeneralRe: How to run the services MMC ? Pin
Nish Nishant22-Mar-02 21:28
sitebuilderNish Nishant22-Mar-02 21:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.