Click here to Skip to main content
15,881,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
ForNow wrote:
If I want a certian number of characters to fix in the line of a rich edit control
wouldn't I want to know the Font of The Dialogbox/Richeditcontrol


That might well work for a mono-space font like Courier or Courier New. But what about proportional fonts like Arial or Times New Roman? With a font like that, the number of characters you can fit into a particular width depends on the characters you're displaying - 'W' is a lot wider than 'l'!!


ForNow wrote:
would that mean instantating of CDC object
Doing a SlectObject getting the Logfont Structure


In a word yes. And then use GetTextExtentPoint32[^] to get the size of a string you specify or GetTextMetrics[^] (to get font metrics including average character width).

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow27-Apr-09 16:37
ForNow27-Apr-09 16:37 
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 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow28-Apr-09 18:20
ForNow28-Apr-09 18:20 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
Stuart Dootson28-Apr-09 18:58
professionalStuart Dootson28-Apr-09 18:58 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow28-Apr-09 22:47
ForNow28-Apr-09 22:47 
QuestionWriteProcessMemory error 5 Pin
Snoepie27-Apr-09 6:48
Snoepie27-Apr-09 6:48 
QuestionRe: WriteProcessMemory error 5 Pin
CPallini27-Apr-09 7:13
mveCPallini27-Apr-09 7:13 
AnswerRe: WriteProcessMemory error 5 Pin
Snoepie27-Apr-09 8:28
Snoepie27-Apr-09 8:28 
AnswerRe: WriteProcessMemory error 5 Pin
Luc Pattyn27-Apr-09 8:17
sitebuilderLuc Pattyn27-Apr-09 8:17 
GeneralRe: WriteProcessMemory error 5 Pin
Snoepie27-Apr-09 8:29
Snoepie27-Apr-09 8:29 
GeneralRe: WriteProcessMemory error 5 Pin
Luc Pattyn27-Apr-09 8:50
sitebuilderLuc Pattyn27-Apr-09 8:50 
GeneralRe: WriteProcessMemory error 5 Pin
CPallini27-Apr-09 22:36
mveCPallini27-Apr-09 22:36 
RantRe: WriteProcessMemory error 5 Pin
Snoepie29-Apr-09 5:50
Snoepie29-Apr-09 5:50 
GeneralRe: WriteProcessMemory error 5 Pin
CPallini29-Apr-09 6:33
mveCPallini29-Apr-09 6:33 

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.