|
George_George wrote: I mean in some situation, the value 100 for variable foo is correct (not causing errors) in a complex system, but later, the value 100 for variable 100 is in-correct (causing errors). It is highly dependent on other threads running at the same time. Have I made myself understood?
I think I understand your problem, but there is no real easy way to debug it.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Thank you Zac,
Do you mean the best solution I could use is to debug some codes to manually dump the values of the variables I am interested to somewhere, and to monitor/analyze them later when error occurs?
regards,
George
|
|
|
|
|
how to bind data from database to adrotator control in .NET. and need code for horizontal sliding.
Please help me in this...
Thanks & Regards
Sandeep.k
.NET Programmer
sandeep chowdary.k
|
|
|
|
|
hi, all:
I've developed a bho plugin for internet explorer. It simply receive the DISPID_BEFORENAVIGATE2 event and change the address in the address bar. It's event-driven and I think it will not cost too much cpu. But to my surprise when it's loaded into IE, the cpu usage turns to be 100% and I can do nothing else.
Why it costs so much cpu and how to resolve this problem?
Thank you very much!
harald
|
|
|
|
|
what is the Difference between C++ and VC++ ?
|
|
|
|
|
This has been asked several times before. In short, VC++ is Microsoft's version of the C++ language.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Then can u give me links of it
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
My understanding is that DOS C++ is for Console based applications. Once you get into Visual C++, you can develop Windows-like applications - applications containing menus, buttons, dialog boxes and many more features.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
you can create console based application using visual C++.
-Prakash
|
|
|
|
|
Mr.Prakash wrote: you can create console based application using visual C++.
That's backward compatibility.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
you can create console application with win32 support
-Prakash
|
|
|
|
|
|
As was said before, VC++ is the Microsoft version of C++. It contains several extensions to the official C++ standard, many of wich i find quite compeling. Microsoft makes a habit of "extending" broadly accepted standards. I don't like it most of the time, but i think that in this case, they did a good job (if you disregard the heap if compatibility issues even between their own different compiler versions).
If you read your way through th MSDN-Library VC++ articles, you will stumble upon paragraphs marked "Microsoft specific" once in a while. That's where the difference is.
|
|
|
|
|
Mr.Brainley wrote: if you disregard the heap if compatibility issues even between their own different compiler versions
I know this isn't what you were getting at, but just a note that the VS.Net2005 compiler is something like 98.5% compliant with the C++ standard, which was a lot higher than any other compiler available.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
i am doing an application where i need to load a bitmap from a file like C:\MyFolder where my bitmaps are stored. i don't want use bitmap as resource to add bitmaps to my application. Now the problem is when i run the application using LoadImage() function it is showing my bitmap in scratched or crushed format(bad format). i want to show it as it is i.e. in actual size. i have attached the code snippet i m using. please help me immediately.
thanks to everyone..
void CPictureBox::ShowBitmap(CPaintDC *pdc)
{
//Create a device context to load the bitmap into
CDC dcMem; dcMem.CreateCompatibleDC(pdc);
//Get the Display area available
CRect lRect;
GetClientRect(lRect);
lRect.NormalizeRect();
//select the bitmap into compatible device context
CBitmap* pOldBitmap = (CBitmap*)dcMem.SelectObject(&m_bmpBitmap);
//m_bmpBitmap.SetBitmapDimension(lRect.Width(),lRect.Height());
//copy & resize the window to the dialog window
int bmw, bmh ;
m_bmpBitmap.GetBitmap(&bm);
bmw = bm.bmWidth;
bmh = bm.bmHeight;
int xo=0, yo=0;
pdc->BitBlt (xo, yo, lRect.Width(),
lRect.Height(), &dcMem,
0, 0, SRCCOPY);
pdc->StretchBlt(0,0,lRect.Width(),lRect.Height(),&dcMem,0,0,bmw,bmh,SRCCOPY);
dcMem.SelectObject(pOldBitmap);
}
void CPictureBox::OnPaint()
{
CPaintDC dc(this);
// device context for painting
RECT rect;
GetClientRect(&rect);
dc.FillSolidRect(&rect, RGB(255,255,255));
if(m_sBitmap!="")
ShowBitmap(&dc);
}
void CPictureBox::SetBitmap(CString strBitmap)
{
m_sBitmap = strBitmap;
HBITMAP hBitmap = (HBITMAP) ::LoadImage(AfxGetInstanceHandle(),
m_sBitmap, IMAGE_BITMAP, 0, 0,
LR_LOADFROMFILE | LR_CREATEDIBSECTION );
// Do we have a valid handle for the loaded image?
if (hBitmap)
{
// Delete the current bitmap
if (m_bmpBitmap.DeleteObject())
m_bmpBitmap.Detach(); // If there was a bitmap, detach it
// Attach the currently loaded bitmap to the bitmap object
m_bmpBitmap.Attach(hBitmap);
}
m_bmpBitmap.GetBitmap(&bm); //Get Bitmap Structure
Invalidate();
jIteen
|
|
|
|
|
Whats wrong in your code?
|
|
|
|
|
http://www.codeproject.com/tools/imageviewer.asp[^]
I wrote this tool to help solve problems like you are having. With this tool I could check that LoadImage() actually loaded the image the way I wanted it loaded, I could check every bitmap manipulation immediately after it was done etc.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
yes your article But I think its a good article well done Arends
|
|
|
|
|
First of all i dont understand why are you using a BitBlt and StretchBlt in your drwing code.. shouldn't you be using one of them. Anyways your logic.
By the way if you only want to display the bitmap on the dialog try removing the LR_CREATEDIBSECTION flag from LoadImage call. This will create a DDB compatible with your Display and u dont have to worry about the palette and other petty issues :P.. just select it and BitBlt or StretchBlt it
Peace!
|
|
|
|
|
|
hi
can anyone please tell me how can we override the expansion and collapsing of the tree control when we double click an item in a tree
my basic aim is to display the tree contents below a parent tree item whenever the parent item is double clicked.
regards
partho
|
|
|
|
|
partho5 wrote: expansion and collapsing of the tree control when we double click an item in a tree
Subclassing is a possible solution to this problem. You can Derive a class from CTreeCtrl and then override the methods in the derived class.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanks for the reply anshuman
i have already derived a class mytree from ctreectrl ..but i need to disable the expand and collapsing of the tree item whenever i double click a parent item.
so for example whenever i double click a root, the root should never collapse untill i click on the button (+ left of the node)
|
|
|
|
|
I've developed a bho.dll and it works fine with internet explorer.
I know maxthon/myie are also IE-cored browser and the bho.dll should be loaded into them automatically.
But to my surprise they don't load it at all.
How to solve this problem?
thanks!
|
|
|
|