Click here to Skip to main content
15,892,643 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to Read a User/System Environment Variable Using c++ Pin
Michael Schubert27-Apr-09 21:50
Michael Schubert27-Apr-09 21:50 
QuestionHow to clean up an object of CMapStringtoString Pin
V K 227-Apr-09 20:40
V K 227-Apr-09 20:40 
AnswerRe: How to clean up an object of CMapStringtoString Pin
Rajkumar R27-Apr-09 21:30
Rajkumar R27-Apr-09 21:30 
QuestionWinCe Screen shot of windows Pin
vijaywithu27-Apr-09 20:29
vijaywithu27-Apr-09 20:29 
AnswerRe: WinCe Screen shot of windows Pin
V K 227-Apr-09 20:47
V K 227-Apr-09 20:47 
AnswerRe: WinCe Screen shot of windows Pin
Rajkumar R27-Apr-09 20:50
Rajkumar R27-Apr-09 20:50 
QuestionHow to add images in visual C++ Library Files Pin
Sakthi.Gs :-)27-Apr-09 20:04
Sakthi.Gs :-)27-Apr-09 20:04 
AnswerRe: How to add images in visual C++ Library Files Pin
KarstenK27-Apr-09 22:50
mveKarstenK27-Apr-09 22:50 
QuestionHow to get the handles of all the windows opened in wince? Pin
ujjawal kumar27-Apr-09 18:59
ujjawal kumar27-Apr-09 18:59 
AnswerRe: How to get the handles of all the windows opened in wince? Pin
Rajkumar R27-Apr-09 19:43
Rajkumar R27-Apr-09 19:43 
GeneralRe: How to get the handles of all the windows opened in wince? Pin
ujjawal kumar27-Apr-09 21:07
ujjawal kumar27-Apr-09 21:07 
GeneralRe: How to get the handles of all the windows opened in wince? Pin
Rajkumar R28-Apr-09 0:52
Rajkumar R28-Apr-09 0:52 
Questionsscanf: cannot convert parameter 1 'LPTSTR' to 'const char *' Pin
xzing27-Apr-09 13:37
xzing27-Apr-09 13:37 
AnswerRe: sscanf: cannot convert parameter 1 'LPTSTR' to 'const char *' Pin
Stuart Dootson27-Apr-09 13:49
professionalStuart Dootson27-Apr-09 13:49 
AnswerRe: sscanf: cannot convert parameter 1 'LPTSTR' to 'const char *' Pin
CPallini27-Apr-09 22:05
mveCPallini27-Apr-09 22:05 
QuestionDoc-View vs Dialog-based app - Menu Item updates Pin
john john mackey27-Apr-09 11:35
john john mackey27-Apr-09 11:35 
AnswerRe: Doc-View vs Dialog-based app - Menu Item updates Pin
led mike27-Apr-09 11:47
led mike27-Apr-09 11:47 
GeneralRe: Doc-View vs Dialog-based app - Menu Item updates Pin
john john mackey27-Apr-09 12:08
john john mackey27-Apr-09 12:08 
QuestionCalculating the Size of Rich Edit "bottomless" control Pin
ForNow27-Apr-09 9:00
ForNow27-Apr-09 9:00 
AnswerRe: Calculating the Size of Rich Edit "bottomless" control Pin
Stuart Dootson27-Apr-09 14:02
professionalStuart Dootson27-Apr-09 14:02 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow27-Apr-09 16:37
ForNow27-Apr-09 16:37 
First I think I finally Understand from your reply and the sample code in the above mentioned URL why they call RichEdittext bottomless ... cuase the height is always the same for a font while the width of each character varies

thats why in the sample code the author was looking for what particualr height will have the right richedit control

width

I know people here always tell me to do reasearch before asking my questions and this time I thought I did

but tell me what you think of this solution

Cfont* font richedit->GetFont();

LOGFONT lf;

font->GetlogFont(&lf);

now lf.lfwidth * richedit->Linelength(-1); // multiple the avergage width by the number of charcters on a line


In a relasted issue I cann't seem to get the notification handler to kick off, I thought that after issuing

Requestresize()Control would be passed to it, I made a breakpoint in the begining of the method and it was never

invoked???

below is 3 pices of information the 1) the declaration of the method 2) the message map entry 3) the actual method

I think I have them all coded correctly

1) afx_msg void OnRequestResize(NMHDR* pNMHDR, LRESULT* pResult);

2) ON_NOTIFY(EN_REQUESTRESIZE,IDC_RICHEDIT21,OnRequestResize)

3) void Show_storage::OnRequestResize( NMHDR* pNMHDR, LRESULT* pResult )
{
_ASSERT( pNMHDR->code == EN_REQUESTRESIZE );

// Storing the requested sized to be used in the binary search

.
.
.

thankx again
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
Stuart Dootson28-Apr-09 5:12
professionalStuart Dootson28-Apr-09 5:12 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow28-Apr-09 9:10
ForNow28-Apr-09 9:10 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
Stuart Dootson28-Apr-09 10:51
professionalStuart Dootson28-Apr-09 10:51 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow28-Apr-09 11:17
ForNow28-Apr-09 11:17 

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.