Click here to Skip to main content
15,889,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: my two cents Pin
Software_Developer28-Oct-11 0:00
Software_Developer28-Oct-11 0:00 
AnswerRe: C# code: Creating icon in taskbar Pin
Goto_Label_28-Oct-11 0:08
Goto_Label_28-Oct-11 0:08 
QuestionQuickWin Compile Errors in Visual Studio 2008 Pin
oldbritthumper27-Oct-11 11:40
oldbritthumper27-Oct-11 11:40 
AnswerRe: QuickWin Compile Errors in Visual Studio 2008 Pin
«_Superman_»27-Oct-11 16:47
professional«_Superman_»27-Oct-11 16:47 
GeneralRe: QuickWin Compile Errors in Visual Studio 2008 Pin
Albert Holguin28-Oct-11 4:54
professionalAlbert Holguin28-Oct-11 4:54 
QuestionSanity Check on Registry Value REG_MULTI_SZ - format value Pin
jkirkerx27-Oct-11 9:14
professionaljkirkerx27-Oct-11 9:14 
AnswerI'm going with it, it produces the results I need. Pin
jkirkerx27-Oct-11 10:33
professionaljkirkerx27-Oct-11 10:33 
AnswerRe: Sanity Check on Registry Value REG_MULTI_SZ - format value Pin
Adorjáni Alpár27-Oct-11 10:50
Adorjáni Alpár27-Oct-11 10:50 
if statement is very wrong
'\0\0\0' quote will be used as a single '\0' character
and the ! sign not the equation modifies to != , it will be a bool negation of rgValue[i] character and gives true when rgValue[i] is '\0' and false otherwise and this bool value will be compared to the '\0\0\0' value what is false as bool type

I recommend this:

C++
ndx = 0;
szRgVal = sizeof(rgValue);
 
for(int i=0; i < szRgVal; i++) {
  if (rgValue[i] == '\0' && rgValue[i+1] == '\0' && rgValue[i+2] == '\0' && rgValue[i+3] == '\0') {
    szInstance[ndx++] = '\0'; //very end
    break;
  }
  else {
    if (rgValue[i] == '\0' && rgValue[i+1] == '\0' && rgValue[i+2] == '\0') {
      szInstance[ndx++] = ';'; //word end
      i++;
    }
  else
    szInstance[ndx++] = rgValue[i];
  i++;
}

GeneralRe: Sanity Check on Registry Value REG_MULTI_SZ - format value Pin
jkirkerx27-Oct-11 11:48
professionaljkirkerx27-Oct-11 11:48 
GeneralRe: Sanity Check on Registry Value REG_MULTI_SZ - format value Pin
jkirkerx27-Oct-11 13:28
professionaljkirkerx27-Oct-11 13:28 
AnswerRe: Sanity Check on Registry Value REG_MULTI_SZ - format value Pin
Peter_in_278027-Oct-11 13:39
professionalPeter_in_278027-Oct-11 13:39 
GeneralRe: Sanity Check on Registry Value REG_MULTI_SZ - format value Pin
jkirkerx28-Oct-11 6:24
professionaljkirkerx28-Oct-11 6:24 
AnswerRe: Sanity Check on Registry Value REG_MULTI_SZ - format value Pin
Richard MacCutchan27-Oct-11 21:59
mveRichard MacCutchan27-Oct-11 21:59 
GeneralRe: Sanity Check on Registry Value REG_MULTI_SZ - format value Pin
jkirkerx28-Oct-11 6:41
professionaljkirkerx28-Oct-11 6:41 
GeneralRe: Sanity Check on Registry Value REG_MULTI_SZ - format value Pin
Richard MacCutchan28-Oct-11 6:57
mveRichard MacCutchan28-Oct-11 6:57 
GeneralRe: Sanity Check on Registry Value REG_MULTI_SZ - format value Pin
jkirkerx28-Oct-11 7:17
professionaljkirkerx28-Oct-11 7:17 
AnswerI rewrote the my function for WCHAR Pin
jkirkerx28-Oct-11 8:22
professionaljkirkerx28-Oct-11 8:22 
AnswerRe: I rewrote the my function for WCHAR Pin
Richard MacCutchan28-Oct-11 23:13
mveRichard MacCutchan28-Oct-11 23:13 
GeneralRe: I rewrote the my function for WCHAR Pin
jkirkerx29-Oct-11 7:39
professionaljkirkerx29-Oct-11 7:39 
GeneralRe: I rewrote the my function for WCHAR Pin
jkirkerx29-Oct-11 8:20
professionaljkirkerx29-Oct-11 8:20 
GeneralRe: I rewrote the my function for WCHAR Pin
Richard MacCutchan29-Oct-11 22:21
mveRichard MacCutchan29-Oct-11 22:21 
GeneralRe: I rewrote the my function for WCHAR Pin
jkirkerx30-Oct-11 6:32
professionaljkirkerx30-Oct-11 6:32 
GeneralRe: I rewrote the my function for WCHAR Pin
Richard MacCutchan30-Oct-11 7:16
mveRichard MacCutchan30-Oct-11 7:16 
GeneralRe: I rewrote the my function for WCHAR - grovel Pin
Richard MacCutchan29-Oct-11 23:19
mveRichard MacCutchan29-Oct-11 23:19 
QuestionRegistry usage in MFC Doc/ View - opinions / commentary wanted Pin
Vaclav_27-Oct-11 5:18
Vaclav_27-Oct-11 5:18 

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.