|
Actually, I'm working on a minimum kernel build for Windows CE 2.12. The "minkern" build of CE does not include the API's I need (such as bitblt, or stretchblt), so I have to find an alternative.
------- sig starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- sig ends
|
|
|
|
|
Oh! i didnt think of that
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
I am testing my application on different client machines. The application got into an infinate loop when trying to open the database using ODBC. The error message says "Specified driver could not be located due to system error 5...". I am trying to track it down to exit the application when this occurs, but need help figuring out the value at m_nRetCode. There is a bunch of them from MSDN library. I tried
catch(CDBException* e)
{
//exit if not invalid user name and password
if (e->m_nRetCode==AFX_SQL_ERROR_API_CONFORMANCE || e->m_nRetCode == AFX_SQL_ERROR_CONNECT_FAIL
|| e->m_nRetCode == SQL_INVALID_HANDLE || e->m_nRetCode == AFX_SQL_ERROR_ODBC_LOAD_FAILED
|| e->m_nRetCode == AFX_SQL_ERROR_SQL_CONFORMANCE)
{
AfxMessageBox("Database Logon Error - " + e->m_strError);
exit(1);
return NULL;
}
else
AfxMessageBox("Database Logon Error, invalid user name or password - " + e->m_strError);
goto TRY_AGAIN;
}
But none of these is the correct one.
-Elizabeth
Elizabeth
|
|
|
|
|
How about using the reverse approach ?
Take the return code of an 'invalid user name or password' event, fire the messagebox and goto TRY_AGAIN if this code equals the exception's return value. If it does not, fire a message box saying 'unspecified database error' and get the error string like you now do and exit the application. In means of implementation, this is just about reversing the if-clauses.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
But there is no return code m_nRetCode for invalid name and password.
Elizabeth
|
|
|
|
|
For all possible ODBC error codes, you can see the MSDN for ODBC Programmer's Reference Appendix A: ODBC Error Codes.
In order to see the true error caused by your application, catch all return values by type SQL_ERROR and then seeing CDBException::m_strStateNativeOrigin . In this string, the first 'State' string can be found from the ODBC Error Codes list.
From the forementioned list, the state code 08004 means 'Server rejected the connection'. This, by using free intrepretation, can be understood as 'Invalid logon' as well.
There is an ODBC Query Tool around in CodeProject that has a source code attached. If you can't find any other solution, try browsing through this source code and seeing how it handles return values from the ODBC driver manager.
The tool's page can be found from here[^]. Written by George Poulose.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Thank you. Your suggestion works. I got both state codes 28000 and IM006 returned when an invalid user name or password is entered.
Elizabeth
|
|
|
|
|
Does anyone know how to draw a text which has font with outline effect. Like MS word does. I can't find any flag on CFontdialog and LOGFONT structure so we can set. If not, does anyone know what common dialog or control which is provided from MS word formatting font. Thanks.
|
|
|
|
|
Typically, special effects text drawing is accomplished by drawing the text more than once. Examples include shadowed text and sunken text (embossed).
For outlined text, a slightly larger font is created and the text drawn using the larger font prior to the normal text being drawn.
For shadowed text, the text is drawn using a grey color in a rectangle offset down and right by 2x2 or 4x4 (depending on the depth of the shadow) prior to the normal text being drawn.
For embossed text, the text is drawn using a white or grey color in a rectangle offset up and left by 2x2 or 4x4 (depending on the depth of the embossing) prior to the normal text being drawn.
onwards and upwards...
|
|
|
|
|
Hi
How can i increase the 15 days in COleDateTime class?
Thanks Inadvance
Shailesh
|
|
|
|
|
create another COleDateTime of 15 days and add to the one that you want to add to.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
did someone test CHtmlView_Search_demo.zip - a sample about CHtmlView to find text - before?
why does it works fine with debug version but doesn't work with release version?
includeh10
|
|
|
|
|
Why is everyone talking about problems and forgets to describe them!?
Don't try it, just do it!
|
|
|
|
|
To make it more challenging for us to be able to help them. Nothing else makes sense.
PS. They should all be forced to work on a help desk for a while.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
You could have asked the author of the article in his message board about the problem... simplely the article author is using uninitialised variables that gives different result in debug/release build.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
Hi all,
Are there any resources on programming application skin for software
in Visual C++ 6.0 ?
And for the simplest way, how can I change the background image
of a CDialog ?
Thanks
|
|
|
|
|
pyhtang1 wrote:
And for the simplest way, how can I change the background image
of a CDialog ?
While it's not the basis for the article, you can find how to do that here.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
When I remove the WS_THICKFRAME style from my window, I get a 1 pixel wide transparent line around the view (I am using the document/view architecture).
Also I cannot figure out how to remove the gripper from the status bar, I have tried removing the CBRS_GRIPPER value using m_wndStatusBar.ModifyStyle(CBRS_GRIPPER,0) but that doesn't work.
Go to http://a.domaindlx.com/sschilachi/snooker.JPG[^] to see a screenshot of the window
Any help would be greatly appreciated.
Thanks
|
|
|
|
|
Something is definitely odd here. I took an SDI application and removed the WS_THICKFRAME style in CMainFrame::PreCreateWindow() . I compared the result to what it normally shows, and there is no transparent line and the gripper is gone, too.
You might want to create a temporary SDI application to play around with that style some more.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I had actually removed the style in CWinApp::InitInstance() , using m_pMainWnd->ModifyStyle() , so that was what caused it - it worked fine when I used CMainFrame::PreCreateWindow() instead.
Thanks
|
|
|
|
|
Hello,
I'm looking for a software which helps to design my software.
I would prefer freeware.
Who knows a good one?
Greez, Alex
Don't try it, just do it!
|
|
|
|
|
Now i dont like coz you are not asking the name of an api that you dont know..
Eat your words buddy[^]
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
I'm not asking you how to do my whole software, I'm just asking for good tools.
Don't try it, just do it!
|
|
|
|
|
There are very few freeware design tools available, and most of them are outright garbage. I suggest investing on a real tool, such as Rational Rose's UML toolset. While not the best one, it's up for the task of designing many, many types of applications.
Naturally, the very best way to design a software is to use pen & paper. Write, my friend, write down every little detail you can think of your application, what it does, how it does it, how can people use it, what components should it have. Faster than you notice, you have a clear application skeleton to build on.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|