|
I don't want keep on asking so many questions, so is here has something like faq which has already collect most question asked here and answer. that would be great.
|
|
|
|
|
The FAQ link is just above this post, on the right hand side, in the orange bar.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
http://www.codeproject.com/useritems/cppforumfaq.asp
Copy/paste that into Start-Run
Nish
Bow wow wow,
Yippee yo yippee yay,
My miniputt high,
Is now 30 yay.
|
|
|
|
|
there are some misunderstand, the faq on the top is talk about how to deal with this message board. i just want a faq that collect the question&answers on this message board about vc programming.
|
|
|
|
|
Gosh! Scroll down man...
It is titled " Mike Dunn's C++ FAQ ".
You seriously dont think that he'd name it that if it was a FAQ about the Lounge.
Nish
Bow wow wow,
Yippee yo yippee yay,
My miniputt high,
Is now 30 yay.
|
|
|
|
|
Hi,
I want to teach myself COM, I'm an experience Visual C++/MFC progammer, can anyone recommend a book?
Thanks,
Stuart
|
|
|
|
|
Well there are two approaches:
COM is a model or a paradigm, and the developers that I have met that have read and understand the theory, go alot farther, and are able to do alot more with COM. Therefore I would recommend Don Box's book on Essential COM for theory.
You are notreally going to absorb it until you practice it. I do not have any books that explain COM in MFC, except Jeff Prosise's Programming Windows with MFC, however, it only glosses over the topics.
If you are interested in ATL, which I think is a cleaner way of programming with COM since that is what it was conceived to do, then I would recommend Brett Rector's and Chris Sells' ATL Internals.
With these two books and all of the examples in MSDN, I have had no problem learning anything that I wanted to do in COM.
|
|
|
|
|
Hi guys
when i execute this code
void main ()
{
float x=3/2;
cout<
|
|
|
|
|
Mohe wrote:
float x=3/2;
A computer is only smart enough to operate on two items at a time. If you break your statement in question down into its simplest parts, 3 is an integer, and 2 is an integer. When the compiler performs an operation on these two numbers, it does integer division which results in 1.
In order to fix this, make one or both of the parameters floats like this:
float x=3.0 / 2;
float x=3 / 2.0;
float x=3.0 / 2.0;
Then you will get the result that you expect.
|
|
|
|
|
How can I modify an environment variable such that the changes are made to the registry, so that they are propagated to others when system restarts or some new application starts? The SetEnvironmentVariable API updates the environment for the current process only.
Thanks,
Krishnan
|
|
|
|
|
Hello Krishnan,
I have a suggestion for you : on a Windows NT machine, you can try modifying the following registry entry :
"HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Search for the environment variable you want to modify and make the necessary changes.
Best Regards,
Bio.
|
|
|
|
|
Hi,
I have a worker thread for some file processing, the status of which I wanna display on a Progress dialog.
I took advantage of the built in progress dialog in Add To Project/Components and Controls.
I create and manipulate the Progress dlg in the worker thread using the pointer to CProgressDlg passed from AfxBeginThread's 2 parameter to the worker thread.
Problem: the Progress dialog has very slow responsiveness to buttonclicks as if there were no threads involved at all.
What's wrong?
Thanks
Bunburry
|
|
|
|
|
Each thread should have it's own message loop. Maybe your implementation does not?
Todd Smith
CPUA 0x007 ... shaken not stirred
|
|
|
|
|
the built-in progress dialog has its own message pump which is automatically called by every StepIt or SetPos.
ASSERT(m_hWnd!=NULL);
MSG msg;
while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
if(!IsDialogMessage(&msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
This is meant...
Bunburry
|
|
|
|
|
Case solved.
I will always remember to call
if (pProgressDlg->CheckCancelButton)
pProgressDlg->DestroyWindow();
in the loop of my worker thread.
Thanks anyway for your help.
Bunburry
|
|
|
|
|
Hi,
I'm beginner for thread process. Does anyone know any good and easy tutorial about thread (or multi-thread???).
Actually, I need to do write a program to simulate the Locking System in DBMS. Just simulate and no SQL or DBMS required. And I think i need to use thread to implement it. But I know nothing about thread....
Can anyone help me????
THANKS A LOT!!!!!!!!!!!!!!!!
|
|
|
|
|
This CP article may help.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
As a starter, you might want to take a look at CP Threads, Processes & IPC section. There are a couple of tutorials on multithreading there.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi everyone:
My C++ application ran perfetly when complied with Visual Studio 5.00 and MSVCRT.DLL version (5.00.7022).
However, when I re-compiled the application with Visual Studio 6.00 and ran with MSVCRT.DLL ver 6.00.8797, it oftenly had set-sbh-threashold problem when allocate memory and bad node in heap. Eventually, it threw Dr Watson. (Switching back to MSVCRT.DLL v. 5.00.7022 at RUN-TIME seemed to fixed this heap problem.)
Do you know why my application has this problem ? And should I re-compile the application with different option if using MSVCRT.DLL version 6.00 ???
(I am currently compling with -WIN32, WIN32 options)
Thanks a lot.
Hoang Le
|
|
|
|
|
Are you using some DLL (apart from those of the system)? If so, is your program by chance allocating/freeing memory freed/allocated by some of these DLLs?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks for your reply.
My application is CORBA based application, sure it uses CORBA DLLs (Expersoft) and Rogue DLLs, which also use to MSVCRT.DLL to allocate/free memory.
When the application crashed, the Dr Watson dump showed access violation or exception un-handling in a CORBA dll (e.g mtcor.dll).
However, when I used heapchk() function to check for heap status, the "bad node in heap" indicator showed the problem had begun initially somewhere in my own code.
Thanks again.
(i am using option -WINT32, WIN32,...)
Hoang Le
|
|
|
|
|
Take a look at this MS article about an update to MSVCRT.DLL as shipped with VC++ 6.0 to prevent some heap compatibility problems of the C run-time library. Maybe this could fix your problem.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
i am working with tiffs and need help on one part.
i can get the pointer to the header.
ImageHdr = (LPSTR)::GlobalLock((HGLOBAL) hTif2);
my problem is getting the pointer to the raw image.
the following works if i know what the bytesoffset should be.
i can access it using tif tags (273) the first time. but after the image is manipulated (dialated, rotated, etc) i can not find the pointer to the raw image(the image offset changes).
pImage=(unsigned char*)ImageHdr+BytesOffset;
is there a function that can give me the pointer to the raw image without using tif tags?
thank you.
|
|
|
|
|
It looks like AOL 7.0 supports some MAPI functionality in AOL 7.0.
Does anyone know if it is possible to write a subject, and the message text? It looks like these fields are being ignored, and only the recipients email is being accepted.
If not, does anyone know of a different way (other than MAPI) to create an email in a C++ program for AOL? I don't need it to actually send, just set an email up with the recipient addr, subject, and message text.
Thank you.
|
|
|
|
|
Hi.
Anyone knows how to implement Xp style progress dialog which runs from one side to the other (i.e. in the find files dialog) ?
|
|
|
|