Click here to Skip to main content
15,891,529 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Renaming a file Pin
Nish Nishant13-Feb-02 2:18
sitebuilderNish Nishant13-Feb-02 2:18 
GeneralCommand Line and GUI Pin
13-Feb-02 1:46
suss13-Feb-02 1:46 
GeneralRe: Command Line and GUI Pin
alex.barylski13-Feb-02 2:02
alex.barylski13-Feb-02 2:02 
GeneralRe: Command Line and GUI Pin
Josh Knox (disabled)13-Feb-02 6:43
Josh Knox (disabled)13-Feb-02 6:43 
General::OpenPrinter() - Help !!! Pin
13-Feb-02 1:09
suss13-Feb-02 1:09 
GeneralRe: ::OpenPrinter() - Help !!! Pin
Shog913-Feb-02 7:16
sitebuilderShog913-Feb-02 7:16 
GeneralRe: ::OpenPrinter() - Help !!! Pin
13-Feb-02 21:36
suss13-Feb-02 21:36 
GeneralProblem getting to Event Procedure for a SubClassed Control Pin
MJ_Karas12-Feb-02 19:47
MJ_Karas12-Feb-02 19:47 
I have made a smart edit control class called CStringEdit that is subclassed off the CEdit class. This control works very nicely for me when I include it as a member variable control in a Dialog class. The purpose of this control is to let me have a lot more run time control over a users data entry in a dialog edit box.

The CStringEdit class has interfaces to perform these functions:

void SetFixedLen(BOOL bFixedLen) ... used to set the string to fixed length padded if necessary to the right at the call to GetText(). Defaults to FALSE.

void SetMaxLength(int nMax) ... used to set the maximum string length. The default value of zero means no length restriction and FixedWidth feature is ignored.

void SetLegal(LPCSTR lpszLegal) ... used to enter a string of characters that are legal in the edit box. Defaults to NULL string which means that all characters are legal.

void SetIllegal(LPCSTR lpszIllegal) ... used to put in a string of characters that are specifically illegal in the editbox. Defaults a NULL string such that there are no illegal characters.

void SetText(LPCSTR lpszText) ... used to send intial text to the edit box.

void GetText(CString& strText) ... used to get back out the edited text string.

This control class uses a connection that I setup with the ClassWizard on the OnUpdate() message to validate the edit box contents at each instance that the control thinks there has been a change to the text content and it thinks it is time to re-display the control contents. In this event routine I do the validation to limit the string length and verify if the string contents are valid. It works just dandy!!! Smile | :)

NOW FOR MY PROBLEM.......

I have a particular instance of this control in a dialog where there needs to be some additional real time validation of the edit box content that is dependent upon other things on that same dialog. I have tried to connect the specific instance of this edit control member variable to its own OnUpdate() procedure in the dialog class. Once again this cinnection was mapped using the Class Wizard. My problem is that the event procedure is never being invoked. Confused | :confused:

Can anyone help me figure out why this does not work?? I can send the whole class source code plugged into a simple demo app if my write-up here is not complete enough....

Thanks from a new VC++ 6 user.
Mike


GeneralRe: Problem getting to Event Procedure for a SubClassed Control Pin
Kashif Manzoor12-Feb-02 22:33
Kashif Manzoor12-Feb-02 22:33 
GeneralRe: Problem getting to Event Procedure for a SubClassed Control Pin
Joaquín M López Muñoz12-Feb-02 23:20
Joaquín M López Muñoz12-Feb-02 23:20 
GeneralRe: Problem getting to Event Procedure for a SubClassed Control Pin
13-Feb-02 3:26
suss13-Feb-02 3:26 
GeneralRe: Problem getting to Event Procedure for a SubClassed Control Pin
Joaquín M López Muñoz13-Feb-02 3:39
Joaquín M López Muñoz13-Feb-02 3:39 
GeneralRe: Problem getting to Event Procedure for a SubClassed Control Pin
MJ_Karas13-Feb-02 4:11
MJ_Karas13-Feb-02 4:11 
GeneralRe: Problem getting to Event Procedure for a SubClassed Control Pin
MJ_Karas13-Feb-02 4:25
MJ_Karas13-Feb-02 4:25 
GeneralRe: Problem getting to Event Procedure for a SubClassed Control Pin
Joaquín M López Muñoz13-Feb-02 5:32
Joaquín M López Muñoz13-Feb-02 5:32 
GeneralDC Problem.. Pin
Neha12-Feb-02 19:37
Neha12-Feb-02 19:37 
GeneralRe: DC Problem.. Pin
Bernhard12-Feb-02 20:00
Bernhard12-Feb-02 20:00 
GeneralRe: DC Problem.. Pin
Neha12-Feb-02 20:54
Neha12-Feb-02 20:54 
GeneralRe: DC Problem.. Pin
Bernhard12-Feb-02 21:18
Bernhard12-Feb-02 21:18 
GeneralRe: DC Problem.. Pin
Neha12-Feb-02 21:55
Neha12-Feb-02 21:55 
GeneralRe: DC Problem.. Pin
alex.barylski12-Feb-02 22:01
alex.barylski12-Feb-02 22:01 
GeneralRe: DC Problem.. Pin
Neha13-Feb-02 0:25
Neha13-Feb-02 0:25 
GeneralRe: DC Problem.. Pin
alex.barylski13-Feb-02 0:50
alex.barylski13-Feb-02 0:50 
GeneralRe: DC Problem.. Pin
alex.barylski13-Feb-02 1:21
alex.barylski13-Feb-02 1:21 
GeneralRe: DC Problem.. Pin
Christian Graus13-Feb-02 1:27
protectorChristian Graus13-Feb-02 1:27 

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.