|
This is another class pointer and i have already check it before entering the function. It is not null. And i have also replaced with with a constant too like
uniqueCalUIDs.insert((unsigned)11);
but it is still throwing the exception
|
|
|
|
|
and the exception is... ?
where does it happen also ?
|
|
|
|
|
Actually it is throwing the exception on that line. I ccouldn;t get the exception type
I caught it with catch(...)
But i have finally get around with this problem when i changed my variable
from set <unsigned> to set<int>
and type-cast the argument i am passing to it
if (m_uniqueCalUIDs.size() &&
m_uniqueCalUIDs.find((int)pCal->GetUID()) == m_uniqueCalUIDs.end() &&
m_nMode != MM_LINE)
return -1;
m_uniqueCalUIDs.insert((int)pCal->GetUID());
But this is really wierd to me. Any idea why is it behaving like that?
-- modified at 9:01 Monday 13th March, 2006
|
|
|
|
|
Farhat Aisha wrote: This is another class pointer and i have already check it before entering the function. It is not null.
Not NULL does not necessarily mean valid. You might want to see if the exception is being raised before you call into the STL class, when you dereference the pointer (by accessing a member off of it).
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I replaced it with a constant value like insert((unsigned) 11) and it still crashed
|
|
|
|
|
case WM_PAINT:
hdc = BeginPaint (hwnd, &ps) ;
hdcMem = CreateCompatibleDC (hdc) ;
SelectObject (hdcMem, hBitmap) ;
BitBlt (hdc, 0, 0, cx , cy, hdcMem, 0, 0, SRCCOPY) ;
DeleteDC (hdcMem) ;
EndPaint (hwnd, &ps) ;
return 0 ;
it is a way,but how to paint without memory device context?
but SelectObject (hdc, hBitmap) does not put bitmap on screen.
|
|
|
|
|
derek7 wrote: but how to paint without memory device context?
if you can get your image as a DIB, you can use StretchDIBits (and related functions). but if you have an HBITMAP/CBitmap, you'll need to use a memory DC.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Hi derek7,
CImage m_Image;
m_Image.Load("c:\\picture.bmp");
void CAnswerView::OnPaint()
{
CPaintDC dc(this); // device context for painting
m_Image.BitBlt(dc.m_hDC,CRect(0,0,800,600),CPoint(0,0));
}
-- modified at 9:04 Monday 13th March, 2006
|
|
|
|
|
-Although you do NOT want to keep on loading the image file each time you get a paint message...
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
|
HI,
Does someone knows about the compatibility to have on the same computer, Visual C++ Express 2005 and Visual C++ 6.0 ?
Moreover, where to get Visual C++ Express 2005 in english and the most stable and reliable version?
Thanks a lot!
Regards!
|
|
|
|
|
|
Thanks Kevin,
So, to tell you the truth I have had to cancel quickly Visual C++ Express 2005 and get back my initial projects -some with over 20 files- written with VC++ 6. It was a real mess!!!!!!!
So a question,
what is exactly:
Visual C++ Express 2005 ( language based on C# )?
what are studio 7.0?
studio 7.1
and version 8?
thanks but indeed......I am lost now!
Regards
|
|
|
|
|
haow i can get any information to identify my motherboard with visual c++ programmes
am
|
|
|
|
|
You could try the WMI class Win32_MotherboardDevice .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
i want set size of dialog when an event fire how it is possible.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
SetWindowPos() , MoveWindow()
|
|
|
|
|
|
Hi Bankey Khandelwal,
MoveWindow for change size and I suggestion use MoveWindow in the WM_SIZE
|
|
|
|
|
hello sir,
actully i want to maximize the dialog but i have to change width only not height of the dialog and also change the icon of miximize .
when i use movewindow method then it differs from monitor size so what i have to do to maximize the dialog according to monitor size i.e. width is equal to monitor width but according to me.
how it is possible .
Bankey Khandelwal
Software Engineer
|
|
|
|
|
use GetDeviceCaps with the parameter HORZRES to get the width of desktop.
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
you can to hold current dimensions (GetWindowRect ) in the Rect variable
and then use in the movewindow
|
|
|
|
|
Bankey Khandelwal wrote: actully i want to maximize the dialog...
So just use ShowWindow(SW_MAXIMIZE) .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I suggest u separate VC to 2 or more forums, by levels or topics.
personally, I don't like current styles even u get more posts, because I focus what I am interested - I think some of users have same feeling also - separating the forum to make things easier.
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
Please post suggestions appropiate forum Suggestions[^]
It goes directly to webmaster's(Chris) mail
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|