I am working with an MFC Dialog Application built with VS 2010
My application uses CPropertySheet with multiple CPropertyPage's and on one of them I am using a CMFCPropertyGridCtrl. The Dialog associated with that page handles PreTranslateMessage's.
When running this code on a Windows 7 Touch Screen computer, I get the following exception in the PreTranslateMessage handling a WM_MOUSEDOWN for the CMFCPropertyGridCtrl which eventually calls IsDialogMessaag():
mfc100ud.dll!ATL::IAccessibleProxyImpl<ATL::CAccessibleProxy>::get_accParent(IDispatch * * ppdispParent) Line 69 C++
// Delegate to standard helper?
HRESULT CWnd::get_accParent(IDispatch **ppdispParent)
ASSERT(m_pStdObject != NULL);
The problem is that ppdispParent points to a NULL.
I have no idea what should be done to fix this???
Can anyone help explain this?
I am student, taking C programming now.
I have assignment to write function to check if inputed data is numbers. if not - it should write that, and ask to enter number again.
I wrote code, to write error message, but dont know how to make program to work on next input.. should I call the Main function again ?
double hours; //hours worked in a week
double payrate; // hourly salary
double grosspay; //total weekly payment
int k; //number of values read
printf ("Enter number of hours, and hourly pay (or press 0 to exit) \n");
while ((k = scanf ("%lf%lf", &hours, &payrate))==2)
if (isdigit(hours) !=0)
printf ("You entered invalid data, please enter number of hours \n");
if (isdigit(payrate) !=0)
printf ("You entered invalid data, please enter payrate \n");
You cannot use a double parameter as input to the isdigit()[^] function. You should read your numbers in as strings and then apply isdigit() to each character, using a loop. Rather than having all your code in the main() function, you may want to think about writing a helper function that will input the string, validate it and return the converted value.
One of these days I'm going to think of a really clever signature.
int main( )
char n ;
int no = 0 ;
printf("Enter a no " );
while( (n = (char)getche( )) != '\r') //Check for enter key
if( n >= '0' && n <= '9' )
n = n - 48 ;
no = (no * 10) + n ;
printf("\n %d " , no ) ;
return 0 ;
i,m astuedent in university ,and my doctor want from every
student aproject ,and i want code to make from that (requirement,design,and testing)
please send me code by c++ language such as about
how identification digit system works
I think what your teacher wants is for you to develop the project yourself.
Pick a topic.
Read up on it. (Google is a good place to start.)
Get working on it.
If you have some specific problem with some detail, come back here and ask a question.
We are not in the business of writing your project for you.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
When I am designing a dialog box with static text boxes to display numbers can I initialize control variables as arrays through the wizard?
As an example, say I am collecting information in 8 channels and would like to display this information in a 8 separate text boxes. I want to store the information in the variable int m_chan but I don't see the array option in the 'Add Variable...' in VS2010.
The wizard is limited; you should get used to skip the wizard. Many times it's even faster to add something to your code, than using the wizard. What you want is possible (as shown already), but not with the wizard.