Click here to Skip to main content
15,914,323 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalproblem with a dll Pin
Anonymous28-Aug-03 8:18
Anonymous28-Aug-03 8:18 
GeneralRe: problem with a dll Pin
User 665828-Aug-03 8:36
User 665828-Aug-03 8:36 
GeneralRe: problem with a dll Pin
David Crow28-Aug-03 10:23
David Crow28-Aug-03 10:23 
Generalsolution! Pin
Alexander M.,28-Aug-03 11:00
Alexander M.,28-Aug-03 11:00 
GeneralRe: solution! Pin
Anonymous28-Aug-03 11:30
Anonymous28-Aug-03 11:30 
GeneralRe: solution! Pin
Alexander M.,28-Aug-03 12:42
Alexander M.,28-Aug-03 12:42 
GeneralRe: solution! Pin
Antti Keskinen29-Aug-03 9:13
Antti Keskinen29-Aug-03 9:13 
GeneralRepositioning cursor in an edit box Pin
Vikram A Punathambekar28-Aug-03 8:14
Vikram A Punathambekar28-Aug-03 8:14 
[EDIT]I'm using VS6[/EDIT]
This is an obscure problem: I'm using an edit control labeled IDC_EDIT2 in a dialog-based app. To restrict the length of the content to 8, I use the following function that is called whenever the content changes:

void CFileCryptDlg::OnChangeEdit2() 
{
    char strPassword[10];
    if(GetDlgItemText(IDC_EDIT2,strPassword,10)>8)
    {
        strPassword[8]='\0';
        SetDlgItemText(IDC_EDIT2,strPassword);
    }
}


It works fine, except for one small problem: till I type the 8th character, everything's as expected. But when the 9th character is typed, the cursor moves back to the first location in the edit box. How do I retain the cursor position?

Thanks,

Vikram.


The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.- Dijkstra

KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames.

pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.
GeneralRe: Repositioning cursor in an edit box Pin
User 665828-Aug-03 8:41
User 665828-Aug-03 8:41 
GeneralRe: Repositioning cursor in an edit box Pin
Vikram A Punathambekar28-Aug-03 8:59
Vikram A Punathambekar28-Aug-03 8:59 
GeneralRe: Repositioning cursor in an edit box Pin
David Crow28-Aug-03 9:11
David Crow28-Aug-03 9:11 
GeneralRe: Repositioning cursor in an edit box Pin
User 665828-Aug-03 9:31
User 665828-Aug-03 9:31 
GeneralRe: Repositioning cursor in an edit box Pin
David Crow28-Aug-03 8:45
David Crow28-Aug-03 8:45 
GeneralRe: Repositioning cursor in an edit box Pin
Vikram A Punathambekar28-Aug-03 9:04
Vikram A Punathambekar28-Aug-03 9:04 
GeneralCOleSafeArray::PutElement Pin
act_x28-Aug-03 6:27
act_x28-Aug-03 6:27 
GeneralRe: COleSafeArray::PutElement Pin
Steve S29-Aug-03 2:18
Steve S29-Aug-03 2:18 
GeneralCreating CRichEditCtrl Version 2.0/3.0 Pin
Larry J. Siddens28-Aug-03 6:03
Larry J. Siddens28-Aug-03 6:03 
GeneralRe: Creating CRichEditCtrl Version 2.0/3.0 Pin
David Crow28-Aug-03 7:02
David Crow28-Aug-03 7:02 
GeneralRe: Creating CRichEditCtrl Version 2.0/3.0 Pin
Steve S28-Aug-03 7:08
Steve S28-Aug-03 7:08 
GeneralRe: Creating CRichEditCtrl Version 2.0/3.0 Pin
Larry J. Siddens28-Aug-03 7:41
Larry J. Siddens28-Aug-03 7:41 
GeneralRe: Creating CRichEditCtrl Version 2.0/3.0 Pin
David Crow28-Aug-03 8:00
David Crow28-Aug-03 8:00 
GeneralRe: Creating CRichEditCtrl Version 2.0/3.0 Pin
Larry J. Siddens28-Aug-03 8:06
Larry J. Siddens28-Aug-03 8:06 
GeneralRe: Creating CRichEditCtrl Version 2.0/3.0 Pin
David Crow28-Aug-03 8:41
David Crow28-Aug-03 8:41 
GeneralRe: Creating CRichEditCtrl Version 2.0/3.0 Pin
Larry J. Siddens28-Aug-03 8:44
Larry J. Siddens28-Aug-03 8:44 
GeneralRe: Creating CRichEditCtrl Version 2.0/3.0 Pin
David Crow28-Aug-03 8:56
David Crow28-Aug-03 8:56 

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.