|
|
it consumes more memory, but it doesn't leak the memory...
|
|
|
|
|
Please see the initial question posted
""When I run my prog the size visible in the task manager goes up by about 5mb each second. ""
This can happen without memory leaks too. using STL
Hence the guess.
Did it help?
Arti Gujare
|
|
|
|
|
i had read && understood his question.
what he desscribes looks really like a memory leak because if it was a huge allocation, it would happen depending on what he does thru the application, and it would certainly allocate a big memory block once, and stop then.
what you answered is not a solution to fix memory leaks, even using STL AFAIK.
it's much a good habit to use when dealing with big objects as function parameters (and not only STL containers).
and it's not because he changes his functions signatures by using references that his memory won't increase that fast... (maybe less each second at least, but that's all).
|
|
|
|
|
Hi,
how can I enable an right mouse click eventhandler for a CStatic icon control?
THX
|
|
|
|
|
MyDialog.h
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
MyDialog.cpp
BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
ON_WM_CONTEXTMENU()
END_MESSAGE_MAP()
void CMyDialog::OnContextMenu(CWnd* pWnd, CPoint point)
{
// TODO: Add your message handler code here
CMenu menu;
VERIFY(menu.LoadMenu(IDR_POPUP_MENU));
CMenu* pPopup = menu.GetSubMenu(0);
ASSERT(pPopup != NULL);
pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, AfxGetMainWnd());
}
----------------------------------------------------------------------------
I Belive that this would be helpfull to u
JAYARAJ
|
|
|
|
|
Hi,
thank you very much !!!
Thats exactly what I searched !
|
|
|
|
|
OK..
i need to acess mysql from remote system?
do u know how to do it?
myconnection string
_T("Driver={MySQL ODBC 3.51 Driver};Server=61.247.251.95;Port=3306;Database=ist_encoder;User=root;Password=isakura;Option=4");
can u help me to solve this problem.
JAYARAJ
|
|
|
|
|
when you have to post some code, use the <pre></pre> tags instead of bolding the text...
|
|
|
|
|
Hi there !!
Ok ! now this may sound little wild but what is the exact tecnical diffrence betwwen the language C and C++.
|
|
|
|
|
C is a quite old language, and don't know at all about all the OOP stuff...
C++ is OOP however, but as it was build/based upon the C language, it kept much of the functionnalities... so, many beginner confuse both languages.
|
|
|
|
|
I think the big difference reside in how you use the language also. You can use C++ language and still write C code, using the C++ standard doesn't mean that you write C++ code.
The way to view C programs is more procedural, which means that you have a sequence of instructions to execute (that can be in separate functions).
C++ is more object oriented (if you start with that idea in mind of course, otherwise you can still write procedural programs): it is more an interaction between objects, how they are used and how they interact with each other.
|
|
|
|
|
|
keep in mind:
C is a procedural language.
C++ serves the OO design
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
I have to make server which should be able to serve about 6 TCP connections per minute in every minute in one day. Clients establish TCP connections with server via GPRS tehnology. Amount of data which server and client exchange in one connection is about 100kB. I need advice about technology which I should use for server: Microsoft tecnology(MFC sockets, API, I/O completion ports) or java technology. Can java meet requested performance for server? Does anybody have experience with this problem? Thanks.
|
|
|
|
|
I don't know answer, the reply is about java.
in windows (possible the same in UNIX), C++ is always better than java in performance because JVM relies on C++, except something else such as easier in programming or platform independent.
if java can do something, C++ can do either and better.
but vice versa is not true.
so in your case, u should not try java.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
Hi, can anyone point me out some source codes on sending/receiving emails to/from an WebOutlook server.
Are there any clients (with source code) available on the web? Thanks in advance for your answers.
|
|
|
|
|
Hi all,
I was Reading "Interprocess communication" articles. and I was wondering if I could share some of my variables (for example:CWindowDC).
I mean:
When we declare CWindowDC , this variable assigns to a place in memory.
and its values will be written in that place. So how can I share that place for another computer to easily use this place and use it as a variable, just like it is in that computer???
(Sharing a variable for another computer in a network)
Please help me about this...
Thanks.
Every new thing you learn,Gives you a new personality.
-- modified at 3:46 Tuesday 4th April, 2006
|
|
|
|
|
Geez !! You stay with your idea even if thousands of people already told you that sharing a CDC or CWindowDC is a very bad idea. A DC is relative to the context in which it is used, so, you cannot just send it to another computer and use it there. It is a really really bad design idea.
Explain your problem (not what you think that it may be a solution): what do you want to do exactly by sending this CWindowDC. You told me already it was for sharing pictures. But that's crazy ! In that case why not just send the file in which the picture is, this is far more elegant (and less complicated).
|
|
|
|
|
but I think it is a good way to make a remote desktop...
I don't like sending pictures.
If there is any better way that is FAST without sending files. please tell me.
I looked at VNC source files too, but that way is so slow too.
I am confused...
Please help me...I'm not standing on my Idea...
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
You can not, I repeat CAN NOT share a DC across a thread boundry, process boundry, and heaven forbid, machine boundry.
VNC works by communicating bitmaps, Remote Desktop shares data at a much lower level, but writing your own would proably require many man-years worth of work. I suggest you stick with VNC as it is as much an industry standard as you'll likely to get.
|
|
|
|
|
I want to draw a virtual v-bar and virtual h-bar when dialog sizing,and resize its all control when mouse up,How to implement? I want to avoid flicking when changing dialog size because of too many control changing size and position.
My dialog is made up three child dialog,and all controls are on child dialog. So I want to redraw all controls only when releasing left mouse button. How to implement?
Can any one provide me with sample code or links?
Thank in anvance.
-- modified at 5:15 Tuesday 4th April, 2006
|
|
|
|
|
chybin wrote: I want to avoid flicking when changing dialog size because of too many control changing size.
Have you tried SetRedraw . Another option to avoid flickering of child controls is to set WS_CLIPCHILDREN and WS_CLIPSIBLINGS on.
Nibu thomas
Software Developer
|
|
|
|
|
|
if both have been tried and you still get flickering, then there must be something you are doing wrong??
piece of code:
SetRedraw (FALSE);
SetRedraw (TRUE);
RedrawWindow (NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW |
RDW_ERASE | RDW_ALLCHILDREN);
GetDesktopWindow ()->RedrawWindow (rectOld, NULL, RDW_INVALIDATE | RDW_UPDATENOW |
RDW_ERASE | RDW_ALLCHILDREN);
hope this helps
add on:
if your dialog contains 3 child dialog, try to set the flags (clip children & siblings) on each dialog....
Ask not what your application can do for you,
Ask what you can do for your application
-- modified at 10:28 Tuesday 4th April, 2006
|
|
|
|