From: Arpit on
Hi experts,
I m preparing Excel kind of thing using SDI application.

I m using CEdit object for entering text. I have kept the size of CEdit
as the size of my cell(D5 etc..) What i see is that inside my edit Box
the text are displayed in bold letters. I dont want this. Moreever
after reaching the limit of edit box i should dynamically increase the
edit box's size while typing, as needed. See Microsoft Office Excel
2007 (Beta) for further checking.. Can any one of u guide me to how to
do this????
Thanks

From: Ajay Kalra on
To get rid of bold font, you should change the font to whatever you want(use
SetFont). For sizing the control, you can use SetWindowPos.

--
Ajay Kalra [MVP - VC++]
ajaykalra(a)yahoo.com


"Arpit" <arpitpmehta(a)gmail.com> wrote in message
news:1157032306.851318.94590(a)h48g2000cwc.googlegroups.com...
> Hi experts,
> I m preparing Excel kind of thing using SDI application.
>
> I m using CEdit object for entering text. I have kept the size of CEdit
> as the size of my cell(D5 etc..) What i see is that inside my edit Box
> the text are displayed in bold letters. I dont want this. Moreever
> after reaching the limit of edit box i should dynamically increase the
> edit box's size while typing, as needed. See Microsoft Office Excel
> 2007 (Beta) for further checking.. Can any one of u guide me to how to
> do this????
> Thanks
>


From: Tom Serface on
You may find this control to be useful as well:

http://www.codeproject.com/miscctrl/gridctrl.asp

Tom

"Arpit" <arpitpmehta(a)gmail.com> wrote in message
news:1157032306.851318.94590(a)h48g2000cwc.googlegroups.com...
> Hi experts,
> I m preparing Excel kind of thing using SDI application.
>
> I m using CEdit object for entering text. I have kept the size of CEdit
> as the size of my cell(D5 etc..) What i see is that inside my edit Box
> the text are displayed in bold letters. I dont want this. Moreever
> after reaching the limit of edit box i should dynamically increase the
> edit box's size while typing, as needed. See Microsoft Office Excel
> 2007 (Beta) for further checking.. Can any one of u guide me to how to
> do this????
> Thanks
>


From: Arpit on
> To get rid of bold font, you should change the font to whatever you want(use
> SetFont).

QUESTION
---------------

i do not get any effect of setfont. here is my code for that:-

***********************************************************************************************
//my rect area of editbox
CRect
rectEdit(m_stShape[nIEdited][nJEdited].pointTopLeft.x-m_nWidthOffset+1,m_stShape[nIEdited][nJEdited].pointTopLeft.y-m_nHeightOffset+1,m_stShape[nIEdited][nJEdited].pointBottomRight.x-m_nWidthOffset-1,m_stShape[nIEdited][nJEdited].pointBottomRight.y-m_nHeightOffset-1);

m_editCell.Create(ES_LEFT | WS_VISIBLE |
ES_AUTOVSCROLL,rectEdit,this,1);
m_editCell.SetLimitText(50); // limit the text that can be entered
m_editCell.SetFocus(); // set the focus in edit box

CFont fontEdit; // font while typing
fontEdit.CreateFont(17,0,0,0,FW_REGULAR,FALSE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH
| FF_SWISS,"Calibri");

m_editCell.SetFont(&fontEdit);
************************************************************************************************
Is it that i have to use some another flag instead of FW_REGULAR for
not getting BOLD characters

####################################################################

>For sizing the control, you can use SetWindowPos.

QUESTION
----------------
Yes, but my problem i dont seem to be finding how can i come to know
that text has reached the limit of editbox size.

Thanks for replying..

From: Arpit on
> To get rid of bold font, you should change the font to whatever you want(use
> SetFont).

QUESTION
---------------

i do not get any effect of setfont. here is my code for that:-

***********************************************************************************************
//my rect area of editbox
CRect
rectEdit(m_stShape[nIEdited][nJEdited].pointTopLeft.x-m_nWidthOffset+1,m_stShape[nIEdited][nJEdited].pointTopLeft.y-m_nHeightOffset+1,m_stShape[nIEdited][nJEdited].pointBottomRight.x-m_nWidthOffset-1,m_stShape[nIEdited][nJEdited].pointBottomRight.y-m_nHeightOffset-1);

m_editCell.Create(ES_LEFT | WS_VISIBLE |
ES_AUTOVSCROLL,rectEdit,this,1);
m_editCell.SetLimitText(50); // limit the text that can be entered
m_editCell.SetFocus(); // set the focus in edit box

CFont fontEdit; // font while typing
fontEdit.CreateFont(17,0,0,0,FW_REGULAR,FALSE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH
| FF_SWISS,"Calibri");

m_editCell.SetFont(&fontEdit);
************************************************************************************************
Is it that i have to use some another flag instead of FW_REGULAR for
not getting BOLD characters

####################################################################

>For sizing the control, you can use SetWindowPos.

QUESTION
----------------
Yes, but my problem i dont seem to be finding how can i come to know
that text has reached the limit of editbox size.

Thanks for replying..

 |  Next  |  Last
Pages: 1 2 3
Prev: IPicture problem
Next: Great news