Click here to Skip to main content
15,901,122 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTransparent dialog problem Pin
xinyue54327-Mar-09 23:11
xinyue54327-Mar-09 23:11 
AnswerRe: Transparent dialog problem Pin
Code-o-mat27-Mar-09 23:55
Code-o-mat27-Mar-09 23:55 
AnswerRe: Transparent dialog problem Pin
Stuart Dootson27-Mar-09 23:55
professionalStuart Dootson27-Mar-09 23:55 
AnswerRe: Transparent dialog problem Pin
ganesh.dp28-Mar-09 2:03
ganesh.dp28-Mar-09 2:03 
QuestionHow to transform 2D image to 3D image? Pin
polomsd27-Mar-09 22:29
polomsd27-Mar-09 22:29 
AnswerRe: How to transform 2D image to 3D image? Pin
Stuart Dootson27-Mar-09 23:48
professionalStuart Dootson27-Mar-09 23:48 
GeneralRe: How to transform 2D image to 3D image? Pin
polomsd28-Mar-09 2:48
polomsd28-Mar-09 2:48 
QuestionGetting Tray Icon Details Pin
ganesh.dp27-Mar-09 21:07
ganesh.dp27-Mar-09 21:07 
AnswerRe: Getting Tray Icon Details Pin
Stuart Dootson27-Mar-09 23:05
professionalStuart Dootson27-Mar-09 23:05 
AnswerRe: Getting Tray Icon Details Pin
Rajesh R Subramanian28-Mar-09 1:50
professionalRajesh R Subramanian28-Mar-09 1:50 
QuestionHandling KeyDown even on Dialog. Pin
grassrootkit27-Mar-09 18:49
grassrootkit27-Mar-09 18:49 
AnswerRe: Handling KeyDown even on Dialog. Pin
Stuart Dootson27-Mar-09 23:41
professionalStuart Dootson27-Mar-09 23:41 
GeneralRe: Handling KeyDown even on Dialog. Pin
grassrootkit28-Mar-09 4:46
grassrootkit28-Mar-09 4:46 
GeneralRe: Handling KeyDown even on Dialog. Pin
Stuart Dootson28-Mar-09 4:59
professionalStuart Dootson28-Mar-09 4:59 
GeneralRe: Handling KeyDown even on Dialog. Pin
grassrootkit28-Mar-09 5:39
grassrootkit28-Mar-09 5:39 
Questionvs2008proeditiongodaytrialedition Pin
samuellhu27-Mar-09 17:09
samuellhu27-Mar-09 17:09 
AnswerRe: vs2008proeditiongodaytrialedition Pin
grassrootkit27-Mar-09 18:50
grassrootkit27-Mar-09 18:50 
QuestionAnnoying RegEnumKeyEx Problem Pin
Baltoro27-Mar-09 6:49
Baltoro27-Mar-09 6:49 
QuestionRe: Annoying RegEnumKeyEx Problem Pin
David Crow27-Mar-09 8:10
David Crow27-Mar-09 8:10 
AnswerRe: Annoying RegEnumKeyEx Problem Pin
Baltoro27-Mar-09 11:37
Baltoro27-Mar-09 11:37 
The for loop that enumerates the HKEY_CLASSES_ROOT\CLSID key is as follows:

	DWORD dwRetVal = 0 ;    
//  ERROR_SUCCESS = 0              ERROR_MORE_DATA = 234       
//  There is an error at number 1488. The CLSID entry is missing an integer.   
//  The following loop fails to write GUIDs after that point. Reason unknown.     

	for (DWORD dwClsidIndx = 1 ; dwClsidIndx <= 1488 ; dwClsidIndx++)    
	{    
	TCHAR ComClssGuid [128] ;    
	ZeroMemory (&ComClssGuid, 128) ;     
	LPTSTR pComClsid = ComClssGuid ;    
	dwRetVal = RegEnumKeyEx (hRootKey, dwClsidIndx, ComClssGuid, &dwSize, NULL, NULL, NULL, &ftLastWrtTime) ;       
	if ((dwRetVal != ERROR_SUCCESS) && (dwRetVal != ERROR_MORE_DATA))    
	{    
    dwRetErrorVal = dwRetVal ;    
	dwErrNumClsid = dwClsidIndx ;    
	dwClsidErrors++ ;    
	TCHAR ErrorMessage [192] ;   
	wsprintf (ErrorMessage, TEXT("    ERROR: Number of Errors: %lu. ERROR: CLSID %lu. Error Code: %lu"), dwClsidErrors, dwErrNumClsid, dwRetErrorVal) ;    
    SetStatusMessage (ErrorMessage) ;    
	return FALSE ;    
	}    
    WriteClsidNodesAlpha (ClsidDomDoc, pDocRtElment, pComClsid, dwClsidIndx) ;     
	}    


Explanation: dwRetErrorVal, dwErrNumClsid, and dwClsidErrors, are all DWORD variables declared outside of the function, used just to store the error code, CLSID subkey number, and the total number of such errors.
WriteClsidNodesAlpha is the function that writes the data to a Node in an XML file.
...and SetStatusMessage merely displays text in the application's status bar.
GeneralRe: Annoying RegEnumKeyEx Problem Pin
Baltoro27-Mar-09 12:02
Baltoro27-Mar-09 12:02 
GeneralSorry, all the text is running off the page display. Pin
Baltoro27-Mar-09 12:37
Baltoro27-Mar-09 12:37 
GeneralRe: Sorry, all the text is running off the page display. Pin
David Crow30-Mar-09 2:50
David Crow30-Mar-09 2:50 
GeneralRe: Annoying RegEnumKeyEx Problem Pin
krmed28-Mar-09 3:41
krmed28-Mar-09 3:41 
GeneralThanks! [modified] Pin
Baltoro28-Mar-09 11:11
Baltoro28-Mar-09 11:11 

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.