Hi!! I want to do some sort of certification in Microsoft VC++ 6.0. Can any1 pls let me know what kinds of certification exist and where I may find info reg. the same? I have been working on VC++ since the past 2 years and I have no Knowledge of .Net? Can some1 pls provide an update?? Thanks! Mahadevan.
mahade1
Posts
-
Certification -
Overriding mouse events in Win32 Console applicationHi, Well, I have a console based application which keeps printing to the console for every second or so. The problem that I am facing is when some user clicks on the console, the application is just hanging because of the "printf()" function. The thread resumes operation only after the user presses the right click button. Any clues as to how I can over ride the mouse events in a console application? (this seems to be the only solution to me, any other solutions are more than welcome). I have heard something about "GetConsoleWindow()" etc. which provides an alternative to printf()...any1 can please update me on this?? Thanks a lot folks. Regards, Mahadevan.
-
Remove Unused Resource Id'sI think in the VC++ Editor itself, you have this functionality in View->Resource Symbols, where u can find all the IDS which are not used by ur application and remove them. Regards, Mahadevan.
-
Float/Double rounding offHi, Instead of associating a double variable with the edit control, use a CString variable. Before calling UpdateData(FALSE) use something like this strFloat.Format("%.2f", fFloatVal); where fFloatVal contains ur decimal value. Regards, Mahadevan
-
How to find Memory Over Flow ?Hi Mahesh.. I am not sure about the code part, but I am sure that if you can patiently go through your code, then 80% of your problem will be solved. Just remember that every time you use malloc, make sure that you are using calloc somewhere for that particular pointer. Regards Mahadevan
-
windows serviceHi, Why dont you use the App Wizard to create a new ATL COM AppWizard and from the list select Service(EXE). The AppWizard handles all the interface with the Service Control Manager. All that you need to do is add code in the Run() function. Hope this helps you. Regards, Mahadevan.
-
Strange Error during executionHi, The problem is pretty straight forward. You are declaring UniqueId[16] and in memset you are using 24. Change it to memset(UniqueID, 0, 16); That should solve the problem. Regards, Mahadevan
-
Roll the diceThe fflush() function flushes the console input before u use getchar().
-
Roll the diceHi, Try doing this: void showone(); void showtwo(); void showthree(); void showfour(); void showfive(); void showsix(); char getans(); void printlines(int n); void main() { int r; char ans; srand( (unsigned)time( NULL ) ); ans = getans(); while(ans== 'y') { r = rand()%6 + 1; printlines(2); if (r==1) showone(); if (r==2) showtwo(); if (r==3) showthree(); if (r==4) showfour(); if (r==5) showfive(); if (r==6) showsix(); printlines(2); ans = getans(); } printlines(2); } char getans() { int ans; fflush(stdin ); printf("Throw y/n ?"); ans = -1; while (ans == -1) { ans=getchar(); } return ans; } void printlines(int n) { int i; for(i=1 ; i<=n ; i++) printf("\n"); } void showone() { printf("\n * \n"); } void showtwo() { printf(" * \n\n"); printf(" * \n"); } void showthree() { printf(" * \n"); printf(" * \n"); printf(" *\n"); } void showfour() { printf(" * * \n\n"); printf(" * * \n"); } void showfive() { printf(" * * \n"); printf(" * \n"); printf(" * * \n"); } void showsix() { int i; for(i=1 ; i<=3 ; i++) printf(" * * \n"); } Regards, Mahadevan
-
CSocket Data lostHi, Why dont u try using out an acknowledgement mechanism. That is whenever the client is sending data to the server, the server should send acknowledgement for the data. In case the client does not receive the acknowledgement for a certain period of time, then the client resends the same data. Let me know if this helps you. Regards, Mahadevan.
-
How to Get Desk Top rectangle (RECT)Try using GetSystemMetrics(SM_CXFULLSCREEN) Regards, Mahadevan.
-
Problem with enumYour header file seems fine. I think the problem is in the implementation of your GetAppState(); (your cpp file). If you dont believe me, try commenting the source within GetAppState(). you wont get any errors. Try checking that function instead. Regards, Maha
-
HDC to BitBlt (Visual C)I think this should do the trick.... CDC dcMem; CPaintDC dc(this); //create a compatible dc dcMem.CreateCompatibleDC(&dc); // Select the bitmap into the in-memory DC dcMem.SelectObject(CBitmap::FromHandle(m_hBitmap)); dcMem.DeleteDC(); Then in Bitblt u can use dcMem.m_hDC
-
Array of VariablesActually, if u r setting myDB.data[0][0][0] to a short integer (as the name says), then it would be wiser to use (short int *)myDB.data[0][0][0] in your format.
-
Serial Communication and Picture Display in MFCwell, I sure dont have the answer to ur questions, but have a suggestion to make. Why dont u try organising ur huge question into paragraphs, so that will improve its readability!!! Also I didnt get what u meant by the following: JeremieJ wrote: The picture display examples I have seen all want you to already have the pictures and none of them show you how to open a picture from a file or just automatically display the picture from a pre-defined location. Good Luck with ur project. Mahadevan.
-
Connection objects in multithreaded appliationsThanks for your help. I still have a small query, What do you generally prefer for connecting to Database, I use the CDatabase object to connect with the SQL server and I am just not able to avoid the deadlocks in both cases, that is single connection object or multiple connection objects. I seem to be getting this problem when a thread is executing a query and the SQL server goes down. Any suggestions? Thanks a lot, Mahadevan.
-
CInternetSession Debug assertation errorHi, Just initialize the CInternetSession Variable with a name. For example, CInternetSession x("MY APPLICATION"); That should solve your problem. Regards, Mahadevan.
-
Connection objects in multithreaded appliationsWell, In all the threads, the database connection is opened and closed only once and the threads are alive as long as the application is alive. In this case, will my application work faster than an application which has only a single database connection object? I am asking this because in order to serialize a single database connection between the multiple threads would require mutex (correct me if I am wrong) which may degrade the performance? Do you foresee any problem (esp. performance degradation) in case I use multiple connection objects? Regds, Maha
-
posting dataHi, From what I understand you want to send data to an asp page through the query string from a C++ application, right? If that is the case then use the class CInternetSession. You will find the OpenURL() method of this class useful in sending the data to the asp page through the query string. Regards, Mahadevan.
-
Connection objects in multithreaded appliationsHi, I am presently working on a multithreaded VC++ application which consists of 3 threads each accessing the same database. Would it be more efficient to use 3 different connection objects or just a single connection object in this case? Looking forward to your reply.. Thanks, Mahadevan