|
At what point is the Clear() method getting called?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
At the time of OnInitialUpdate() member function. I had used CFormView class where I am having the OnSize() member function also. What I observed is If I include the OnSize() member function then the beep is coming otherwise the beep won't come. But Main problem is that OnSize() member function is also required.
|
|
|
|
|
I'm not able to reproduce this problem. In a new SDI project with the view derived from CFormView , I added a rich edit control to the dialog template. Running the program produces no beep. What else do I need in order for the beep to occur?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
After creating the SDI, Add OnSize() member function, OnPaint() member function don't do anything in these functions and I require these member function also. Then the beep will come.
|
|
|
|
|
OnSize() and OnPaint() methods were added. As I suspected, no beep occurred.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi,
i am a vc++ programmer and i come across memory leak problem many times thus i want to know if any good software available that can check the pogram and tell me how many bytes the program is leacking memory on a perticular event, or can tell me exectly how much memory a process is tacking at runtime,
wisdoys taskmanger also tell us memoy usage in kbs but i will prefer if any softwre tels us in bytes + i dont think task manager is as reiable as i want cause when i use it, it gives different data for different occurence of same event or callin same function at different times
thanks
|
|
|
|
|
|
(assuming you are using Visual Studio )
before running of to buy a software, use what's available from VC++, first, be sure to run in debug mode, then, use the predefined macro DEBUG_NEW to replace new , and _malloc_dbg to replace malloc .
those 2 things will help you get a better view at what's going on with memory allocation.
If you really want to go deeper and find other potential problems, try either purify or boundschecker , both work well.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
As somebody else already mentioned, the MFC is a good enough for most purposes. By default an MFC app will show leaks when your application exists, but if you want to track memory leaks over a shorter period, you can use the CMemoryState MFC class - which is the what the default behaviour employs.
HTH
Martin
|
|
|
|
|
Hi,
I am building a project (where multiple dsp's Debug Info is set as Program Database for Edit & Continue) using VC++ editor.At the time of linking I am getting a linker error (LNK1201)
LINK : fatal error LNK1201: error writing to program database "prj.pdb" ; check for insufficient disk space
I found the root cause of the problem as below.
" There is a limit of 4096 modules (.obj files) in a PDB file. The file also has a total size limit of approximately 64 MB - From MSDN"
Here my prj.pdb file size exceeds 64 MB. Now my query is, Is there any way to increase the size of this file? Or I have to set the Debug Info as Line Numbers only for some DSP's. So that the size of the file will be decreased.
Thanks in Advance.
Regards,
Pearl
|
|
|
|
|
clean and rebuild the project
or delete pdb file and buld
|
|
|
|
|
Hello,
is it possible to create GDI+ Bitmap objects in an array? Everywhere else are code examples like this one:
Bitmap myPNG(L"gfx/spiral.png");
graphics.DrawImage(&myPNG, 150, 200);
How can myPNG be an array?
Bitmap myPNG[10];
This will produce an error C2512: no appropriate default constructor available.
Any ideas?
Thanks in advance!
|
|
|
|
|
|
rh005 wrote:
How can myPNG be an array?
Use an array of pointers and new each of them separately. Make sure you delete them afterwards though.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I am writing a simple, dialog-based application. I thought to use OnInitDialog to create all the image objects and be able to use them in OnPaint.
This will not work because the objects are discarded at the end of OnInitDialog.
What can I do? (Looks more like a C++ problem and not a GDI+ issue
|
|
|
|
|
rh005 wrote:
What can I do?
Exactly what I said before - use an array of pointers to Bitmap s. Call new on each one of them separately in OnInitDialog() if that's where you want to create them. Just don't delete them until the dialog destructor or something like that.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Sorry, to bother again, but this does not seem to work:
Bitmap *myimages[2];
LPWSTR image_filenames[] = {L"gfx/c01.png", L"gfx/c02.png"};
BOOL CMyDlg::OnInitDialog()
{
...
myimages[0] = new Bitmap(image_filenames[0]);
myimages[1] = new Bitmap(image_filenames[1]);
...
}
void CMyDlg::OnPaint()
{
...
Graphics graphics(dc);
graphics.DrawImage(myimages[0],10,10);
graphics.DrawImage(myimages[1],60,10);
...
}
The images are not drawn. When I put myimages = ... into OnPaint, it works. What am I missing?
|
|
|
|
|
Ok, now I feel really stupid: I did not initialize GDI+ :/ Now it works.
|
|
|
|
|
i am having a problem with displaying a text in editbox in a edit box in a dilog basaed applicatiopn in vc++
ihtesham
|
|
|
|
|
|
There must be a IDENTIFIER for you edit Box like IDR_EDIT1 .
In WIN32 based API
just call this API for setting text in Edit Box
SetDlgItemText(Dialog Handle, Identifier as I told you above, Text to display);
IN MFC
Just add the CString variable for Edit box.
Way to add variable ->
Right Click on Edit Box (in resource view) ->class wizard->member variable
Add a m_str variable from add variable Button.
Now in function where you want to put data into the Edit Box
//first Fill the Variable
m_str="amirzeb";
//this function call will put value in dialog
UpdateData(FALSE);
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
if ur application is dialog based then u may used
GetDlgItem(ID_UR_EDIT)->SetWindowText("what u want to diaplay");
here this function reduces number of varialble declaration and UpdateData() is need not call to refresh ur app.
urs
kiran.s
kiran kumar.s
|
|
|
|
|
HI frnz,
I am beginner.I am in process of doing a Reminder tool in VC++,can anyone help me reg System tray apps..I am able to retrive and Delete a Specific reminder entered but i need that app to keep on running..so i need info reg system tray app..or anyone could help me with Reminder source code as i can understand more
waiting for ur earliest reply
|
|
|
|
|
|