Click here to Skip to main content
15,849,678 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Owner Button Width Pin
Maximilien19-Dec-10 2:40
Maximilien19-Dec-10 2:40 
Question890927 - Invalid Input Format exception in sscanf_s Pin
ilostmyid218-Dec-10 2:48
professionalilostmyid218-Dec-10 2:48 
AnswerRe: 890927 - Invalid Input Format exception in sscanf_s Pin
ALLERSLIT18-Dec-10 3:59
ALLERSLIT18-Dec-10 3:59 
GeneralRe: 890927 - Invalid Input Format exception in sscanf_s Pin
ilostmyid218-Dec-10 4:19
professionalilostmyid218-Dec-10 4:19 
AnswerRe: 890927 - Invalid Input Format exception in sscanf_s Pin
Richard MacCutchan18-Dec-10 5:57
mveRichard MacCutchan18-Dec-10 5:57 
GeneralRe: 890927 - Invalid Input Format exception in sscanf_s Pin
ilostmyid218-Dec-10 8:53
professionalilostmyid218-Dec-10 8:53 
GeneralRe: 890927 - Invalid Input Format exception in sscanf_s Pin
Richard MacCutchan18-Dec-10 11:34
mveRichard MacCutchan18-Dec-10 11:34 
GeneralRe: 890927 - Invalid Input Format exception in sscanf_s Pin
ilostmyid218-Dec-10 19:52
professionalilostmyid218-Dec-10 19:52 
thank u for the description. the problem is that format strings for sprintf_s and sscanf_s differ. for sscanf_s including a . in format causes Invalid Input Format exception in anyway. as u mentioned, the input string is read by the number of bytes specified in the format b4 f and the chunk string is processed to be converted into a float. while in sprintf_s . has meaning. %4.2f for example means that the output string must contain at least 4 characters and exactly 2 digits after decimal point. if it be needed this may increase, eg. %2.2f or even %1.2f lead to the same output 0.02 or even 123456789.00.
this is while we has only one format for a grid ctrl, not two separate formats, one for sprintf_s and one for sscanf_s. as i said b4 it's stored in CMFCPropertyGridProperty::m_strFormatFloat or CMFCPropertyGridProperty::m_strFormatDouble. this uniqueness in the source of the problem.
now what's ur suggestion?
i've also another problem. spin ctrls are designated for integral fields. i need to attach a spin ctrl to a field of type float. for example when i've 12.34 in the field it may get 11.34 or 13.34 with up and down arrows. if i specify it to limit to 20, after 19.34 it gets 20.00 with arrow up. when i specify low limit of zero it gets 0.00 after 0.34 with arrow down. the spin ctrl doesn't expect the input field to be a float while it doesn't contrast with its behavior.
so the summary of the two problems are:
1. how can i overcome the uniqueness of floating point fields format in a grid ctrl which is both used for showing and inputting?
2. how can i have a spin ctrl for a floating point input field?
thx
GeneralRe: 890927 - Invalid Input Format exception in sscanf_s Pin
Richard MacCutchan18-Dec-10 22:37
mveRichard MacCutchan18-Dec-10 22:37 
GeneralRe: 890927 - Invalid Input Format exception in sscanf_s Pin
ilostmyid219-Dec-10 1:29
professionalilostmyid219-Dec-10 1:29 
GeneralRe: 890927 - Invalid Input Format exception in sscanf_s Pin
Richard MacCutchan19-Dec-10 1:39
mveRichard MacCutchan19-Dec-10 1:39 
GeneralRe: 890927 - Invalid Input Format exception in sscanf_s Pin
ilostmyid219-Dec-10 1:49
professionalilostmyid219-Dec-10 1:49 
GeneralRe: 890927 - Invalid Input Format exception in sscanf_s Pin
jschell19-Dec-10 10:50
jschell19-Dec-10 10:50 
GeneralRe: 890927 - Invalid Input Format exception in sscanf_s Pin
ilostmyid222-Dec-10 20:42
professionalilostmyid222-Dec-10 20:42 
Question'Fake' the freespace of a hdd Pin
ALLERSLIT18-Dec-10 0:54
ALLERSLIT18-Dec-10 0:54 
AnswerRe: 'Fake' the freespace of a hdd Pin
Richard MacCutchan18-Dec-10 5:43
mveRichard MacCutchan18-Dec-10 5:43 
QuestionRe: 'Fake' the freespace of a hdd Pin
David Crow20-Dec-10 4:19
David Crow20-Dec-10 4:19 
QuestionFor Loop & Array Issue. Pin
Mike Certini17-Dec-10 11:48
Mike Certini17-Dec-10 11:48 
AnswerRe: For Loop & Array Issue. Pin
User 742933817-Dec-10 12:01
professionalUser 742933817-Dec-10 12:01 
QuestionMFC CArray vs Vectors [modified] Pin
Software200717-Dec-10 7:54
Software200717-Dec-10 7:54 
AnswerRe: MFC CArray vs Vectors Pin
«_Superman_»17-Dec-10 8:15
professional«_Superman_»17-Dec-10 8:15 
AnswerRe: MFC CArray vs Vectors Pin
Maximilien17-Dec-10 9:01
Maximilien17-Dec-10 9:01 
AnswerRe: MFC CArray vs Vectors Pin
CPallini17-Dec-10 10:38
mveCPallini17-Dec-10 10:38 
QuestionDT_CALCRECT Pin
john563217-Dec-10 6:48
john563217-Dec-10 6:48 
AnswerRe: DT_CALCRECT Pin
Maximilien17-Dec-10 7:40
Maximilien17-Dec-10 7:40 

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.