|
I have developed an application in VS 2005.
It is giving the following error when i click a button on the form.
An Unhandled Win32 exception occured in abc.exe[2572]
with the title "Visual Studio Just-In-Time Debugger"
What may be the problem? What does the number 2572 signify?
Thanks
|
|
|
|
|
The problem is likely a programming error. Let the debugger attach to the process so you can see where the problem is.
The number after the executable is the Process ID (PID) for the running process.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> 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! See DeleteFXPFiles
|
|
|
|
|
The best way to find the problem instead of guessing what might happen is simply to debug your application. Start your debugger (press F5) and see where the crash occurs. You can also check the call stack to track the problem.
You should really learn to use your debugger. It is a very powerful tool and it is much more accurate and faster than asking such a question on a forum.
|
|
|
|
|
Thank you so much.
But the problem is only with the release version and not the debug version.
|
|
|
|
|
Turn on the highest warning level (always a good idea, anyway), and look for things like uninitialized variables, and pay particular attention to any buffers used - ensure that the buffer's length is always being respected.
Debug builds often "pad" allocated heap and stack memory to look for overruns. You should run a debug build to completion (exit the process normally, do not stop it in the debugger) to see if you notice any buffer-related issues.
Another possibility is mixing of debug and release builds of any libraries and/or DLLs. This is sometimes a good reason to suffix the name of any debug binaries with something like D , so MyDLL.dll becomes MyDLLD.dll , so that this is harder to have happen.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> 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! See DeleteFXPFiles
|
|
|
|
|
anyone know objectuve c
i have to draw the application window ie our user interface control dilaog to full screen. i dont know how to write this.
anyone who knows please help me.
thanx in advance
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
What platform/compiler are you using ? I don't think Microsoft support Objective C in any of their IDE and compiler.
Is it a Mac/OSX application ? something on Linux ?
|
|
|
|
|
how can i display the bmp, jpg, png image files as a thumbnails on MyListView.
this is my code in ListView class:
HANDLE hFile;
hFile = CreateFile( "C:\\Documents and Settings\\B.Srinivas\\My Documents\\My Pictures\\SkinDlg.bmp",
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL );
if( hFile == INVALID_HANDLE_VALUE )
{
MessageBox( "Invalid Handle", "ERROR", MB_ICONERROR);
}
else
{
// MessageBox( "File Opened successfully");
BYTE *Buffer;
DWORD p=SetFilePointer( hFile, 0x003, NULL, FILE_BEGIN );
Buffer = new BYTE [2359350];
//LPDWORD lpNumberOfBytesRead = NULL;
DWORD pp;
bitmap.bmType=0;
bitmap.bmWidth=1024;
bitmap.bmHeight=768;
bitmap.bmWidthBytes=1024;
bitmap.bmPlanes=1;
bitmap.bmBitsPixel=1;
bitmap.bmBits=(LPSTR)Buffer;
Bitmap image((WCHAR*)Buffer ,0);
Bitmap *bmPhoto = NULL;
CBitmap Bmp1;
Bmp1.SetBitmapBits(&bitmap,Buffer)
bmPhoto = new Bitmap( THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT, PixelFormat24bppRGB );
// bmPhoto->SetResolution( 100,100);//image.GetHorizontalResolution(), image.GetVerticalResolution() );
//bmPhoto->SetResolution()
hBmp=CreateBitmapIndirect((BITMAP FAR*)&bitmap);
CDC *cdc=GetDC();
CDC *pMemDC=new CDC;
pMemDC->CreateCompatibleDC(cdc);
CBitmap *pOldBitmap=((CBitmap*)pMemDC->SelectObject(hBmp));
cdc->BitBlt(0,0,1024,768,pMemDC,0,0,SRCINVERT);
pMemDC->SelectObject(&pOldBitmap);
delete pMemDC;
}
please help me..
Regards,
Srinivas
|
|
|
|
|
I had to do this with an older reporting application I worked on - it dynamically loaded images from a database in the background and rendered them as thumbnails into a ListView control.
The way I did it was to use custom draw with the ListView control, combined with a ImageList control. The ImageList control was used to pre-create (pre-allocate) and manage a very large bitmap, and the thumbnails were dynamically copied into it by loading the images and drawing them into the individual "icon cells" in the ImageList control.
The ImageList control was then used to do indirect drawing directly into the ListView control using Custom Draw.
I was able to get a pretty large amount of Thumbnails to work this way.
I cannot release the code for it, but the concept for it is not patented!
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> 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! See DeleteFXPFiles
|
|
|
|
|
vasu_sri wrote: hFile = CreateFile( "C:\\Documents and Settings\\B.Srinivas\\My Documents\\My Pictures\\SkinDlg.bmp",
you needn't to directly read the bitmap from file. use LoadImage() image function to load a bitmap from file. This function will return u a handle of HBITMAP.
And to Load JPG or GIF, you need to use the GDI+ class Image.
nave
|
|
|
|
|
Do you have a special intention for use of this code to open and load bmp file?
|
|
|
|
|
i need some information. let me tell u exactly what i am doing. i am working on a project in which i have addresses of the starting sector and ending sector of an image file. Using those two sector addresses of the hard disk, I have to display that image as a thumbnail preview on a list pane just like windows thumbnail view. i want to know how I can resolve this query progrmatically in VC++ without using any third party tool. can u please help me on this?
thanks in advance.
Regards,
Srinivas
|
|
|
|
|
You have two addresses of start and end of a file on the harddisk and you want to make a bmp file(thumbnail)of them ,right?
|
|
|
|
|
yes. i am even able to create the file using that data (by using CreateFile() function). but, before saving that data, i want to show the preview of that image. how can i do it?
Regards,
Srinivas
|
|
|
|
|
|
Hi
I need to add a context menu handler to a file type like .xyz so when I right click on any .xyz file it will show my private menu. I know how to add a simple menu in the registry, but I need to add a managed context menu in a DLL. I know all things about registry Using HKEY_CLASSES_ROOT, but I miss the DLL declaration. I read about it in MSDN page but I couldn't understand to solve my problem.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_extending/extensionhandlers/contextmenuhandlers.asp
this page contain exactly what what I need, but I couldn't understand correctly. so I need a simple example.
I want to add a group of menu having the name: "MyGroup" and having 2 sub menu: "Menu1" and "Menu2"
if I click on Menu1 it will call: "C:\MyProgram.exe /1" and if I click on Menu2 it will call: "C:\MyProgram.exe /2"
I need a small example, because I couldn't understand the general example in Msdn page.
OmarMallat
|
|
|
|
|
There is a complete series about writing shell extension on code project. See here[^] for the first (I think there are 9 articles in total).
Maybe you'll find some usefull information there.
|
|
|
|
|
Hi everybody,
i used a customizated CEdit from out CodeProject :
void MyCEdit::OnKillFocus(CWnd* pNewWnd)
{
CEdit::OnKillFocus(pNewWnd);
SetBkColor(RGB(255,255,255));
}
void MyCEdit::OnSetFocus(CWnd* pOldWnd)
{
CEdit::OnSetFocus(pOldWnd);
SetBkColor(RGB(0,216,255));
}
void MyCEdit::SetBkColor(COLORREF crColor)
{
m_crBkColor = crColor; // Passing the value passed by the dialog to the member variable for Backgound Color
m_brBkgnd.DeleteObject(); // Deleting any Previous Brush Colors if any existed.
m_brBkgnd.CreateSolidBrush(crColor); // Creating the Brush Color For the Edit Box Background
RedrawWindow();
}
switching between the textboxes displays the current textbox with the focus a blue background.
Switching with the TAB-Key works nice, but with the mouse provokes a strange effect.
If i'm on textbox A and switch to B, B gets the blue background BUT a keeps a small frame at the extern sides
If i pass (not click) with the mouse over the textbox, the small frame disappears and the textbox
is in the correct displaying mode ( without background )
My question : How can i provoke programmaticly a "mouse over a control" ?
I tried already :
UpdateWindow();
Invalidate();
RedrawWindow();
but no effect, only if i pass the mouse over it
Thanks a lot
|
|
|
|
|
Can you show , how MyCEdit::OnPaint looks like ?
|
|
|
|
|
It's the standard OnPaint-Handler
Thanks for help
|
|
|
|
|
Have a look at http://www.codeproject.com/editctrl/enhfocusedit.asp[^], which does a custom background with focus, and have seemed to work correctly so far...
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> 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! See DeleteFXPFiles
|
|
|
|
|
Ok, i see the problem
it's not a problem of MFC or something else, it's at new a BCGSoft-Problem
With standard-textboxes it works great... But with the BCGSoft-Librairy it sucks
so, i think i can't resolve the problem
|
|
|
|
|
I used to use BGCSoft - you can see my posts on their forum.
I do not use them anymore, though...!
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> 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! See DeleteFXPFiles
|
|
|
|
|
I must excuse me by BCGSoft, it wasn't a BCGSoft Problem.
RedrawWindow(NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_FRAME);
resolves the Problem
Sorry & thanks BCGSoft
|
|
|
|
|
Hi,
I have a Client-Server Application.
I am trying to get the IP address of the machine on which the client is running on at the Server Side.
I want to store the IP address at the Server side and use it for future processing.
How to get the IP address of the client machine at the Server Side.
I am using VC++ 6.0
Thanks n regards
|
|
|
|