|
oren frenkel wrote:
This is the exact kind of tip that i cannot get in the MSDN.
I found this out the hard way. I have an application that digitizes mamograms. A case of 4 images can be as much as 256MB. The digitizer only has a buffer to hold about 1/2 of an image so if you don't read the data in a 20 to 30 second period it will overflow. Well if the user pressed the minimize button the whole application thrashed for atleast that time and we got an overflow of the buffer and the pc had 512 MB of memory with almost atleast 150MB free. This was tested on NT4 and I believe Win2k but I have not tested it recently. Anyways this was because when the application minimizes the working set is trimmed. I did verify that was indeed what was happening on these operating systems.
oren frenkel wrote:
if the window is in the background (not in focus - another application is in focus) - does the same thing happen?
No. Only when the application is minimized. My solution was to not let the application minimize only during digitization.
oren frenkel wrote:
More important - if i set the working set to 64 MB, and allocated a 64 MB buffer and locked it, and only AFTERWARDS the user minimizes the window - does this also happen?
Yes. It would happen there too.
John
|
|
|
|
|
John - thanks for your time and effort!
Since my application has to record data in an extremely high speed from USB 2 (only graphics are the progress bar and status window) - I migh bypass the problem by running the engine on a different process (it now runs on a different thread). At the worst case - I will not enable the user to minimize the window during recording.
Thanks again,
Oren.
|
|
|
|
|
oren frenkel wrote:
I migh bypass the problem by running the engine on a different process (it now runs on a different thread).
If you run it in a service or other application that does not have a window you will not experience this problem.
John
|
|
|
|
|
Hello everybody,
I'm new to the entire world of microsoft technologies . Can anyone suggest a start up? the right book...to start my journey to Programming in windows environment VC++/COM/ATL/.NET....I know C,C++.
bye,
East
|
|
|
|
|
What do you want to use MFC or raw win32 API?
MFC:
Introduction to MFC Programming with Visual C++ by Richard M. Jones
Programming Windows With MFC by Jeff Prosise
Win32 API:
Programming Windows by Charles Petzold
COM/ATL:
Inside COM (Programming Series) by Dale Rogerson
Developer's Workshop to COM and ATL 3.0 by Andrew Troelsen
Kuphryn
|
|
|
|
|
Thanks for ur intrest...I will try to explain the problem...i happen to come across.... codes in VC++ environment with strange looking macros...concepts like dll,and others not a part of core c++....i'm not sure they are there for winAPI or vc++ concept....i'm facing all kinds of microsoft technologies as com/mfc/atl/.net all of a sudden.. ..i don't know where to start learning and how to proceed....
|
|
|
|
|
Hi,
I'm no expert on VC++ but the books I've found most usefull are 'Practical C++ 6' By Bates & Tompkins (this has some nice example to get you started and some detail too.
And 'Programming Windows with MFC' by Jeff Prosise, this is my main reference and if I could only have one book on VC++ this would be it. It gives you lots of detail and explains things really well.
(I've just thought - I am using VC++ 6 which is fairly old now, anyway they are the books I use what I use for what its worth.)
If you already know C++ then you've got a good start Good luck
Ali
|
|
|
|
|
Alison Pentland wrote:
'Programming Windows with MFC' by Jeff Prosise
I guess this has been updated since I bought my copy of Programming Windows95 with MFC.
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
Don't forget Dennis Ritchie
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
Hi everyone,
In my code while debugging,
after user breakpoint is called after
this line pops up in debug output line.
I have some doubts that this may be happened
by not cleaning a _bstr_t type variable.
How do i allocate and free this type of variable?
Thank you very much.
Ugur Ozkan
|
|
|
|
|
well...that's kinda of the advantage of _bstr_t, you shouldn't have to allocate or free memory, because it does that all for you.
Er zit een korstje op mijn aars.
|
|
|
|
|
UOzkan wrote:
free this type of variable?
Let it go out of scope or set it to NULL.
John
|
|
|
|
|
hi everybody,
i am facing some matlab c++ problems. i am looking for some solutions for them. anybody can help me?
thank you very much.
p/s: thank you Jwood for your information.
Problem 1:
MATLAB SOURCE CODE: [features, targets] = improved_DA1(x, [cluster,0.95]);
MATLAB C++ CONVERSION:
mwArray cluster ;
improved_DA(x, empty(cluster,0.95));
after compiling,……
D:\others\im\me.cpp(116) : error C2660: 'empty' : function does not take 2 parameters
Problem 2:
MATLAB C++ CONVERSION:
I3=uint8(I2);
After compiling,…….
D:\others\im\me.cpp(137) : error C2065: 'uint8' : undeclared identifier
Problem 3:
MATLAB SOURCE CODE:
Smu=zeros(1,Nmu);
for i=1:Ncent,
Smu(i) = sum(std(train_features(:,find(label == i))'));
MATLAB C++ CONVERSION:
Smu = zeros(1,Nmu);
for (i = 1 ; i<=Ncent ; i++)
{
/*232*/ Smu(i) = sum(std(train_features(:,find(label == i))'));
}
after compiling,…..
D:\others\im\me.cpp(232) : error C2001: newline in constant
Problem 4:
MATLAB C++:
……………
double Tmin;
mwArray T;
Nmu = params(1);
epsi = params(2);
/*167*/ T= 3*max(eig(cov(train_features',1)')); //Initial temperature
Tmin = 0.01;
………….
After compiling…….
D:\others\im\me.cpp(167) : fatal error C1057: unexpected end of file in macro expansion
vincent sim
|
|
|
|
|
Hi all,
Wondering if someone could point me in the right direction for a very basic tutorial for using Tab Controls in Visual C++. Been struggling to implement my own for a while now...
Thanks in advance
|
|
|
|
|
try searching this site and it'll give enough info to get you started.
Er zit een korstje op mijn aars.
|
|
|
|
|
Hi,
I am trying compile a source code, now i am getting this error:
error C2065: 'DDX_Time' : undeclared identifier
I am using VC++6.0. Could any one tell me why is it so?
Regards
Neha
|
|
|
|
|
|
Where can i get specification for GDI+ images encoders/decoders?
|
|
|
|
|
look for the CxImage-Library - found on sourceforge.net - i think its here on codeproject too! realy nice code, load/save all graphic-formats you need. i hope thats what you asked for ;o)
|
|
|
|
|
Hi Friends,
Can any one please tell me how to create Dialog without resource dynamically.
Thanks,
Live and Let live
|
|
|
|
|
take a look at CreateDialogIndirect in MSDN.
|
|
|
|
|
Thankyou for the answer.
Is there any way in which I can create Modal Dialog Box Dynamically without using resource.
Thanks,
Salman
Live and Let live
|
|
|
|
|
You can override the OnCreate member function, and create controls dynamically there. And handle the command BN_CLICKED of the Ok button and put there your own DDX ....etc. etc.
I think this seems complicated and useless. What do you want dynamic dialog box for? Could you not create the dialog box in resource editor and only make the specific controls visible/invisible at runtime?
Robert-Antonio
|
|
|
|
|
Thanks for your reply,
But I have to create OCX of my Dialog so, I want to create DialogBOx without Resource. Any how I got answer and will post this artical on codeproject as soon as possible. But the real problem is even I am able to create DialogBox Dynamically. I am not able to attach the controls to it dynamically. Once I get this answer I will post it as soon as possible.
Thanks,
Salman
Live and Let live
|
|
|
|
|
I have a web control inside a modeless dialog in view/doc application. The dialog is implemented as a child of the mainframe. The problem is, when something changes in the web control (navigate2() is called), the dialog steals the focus from the mainframe and view.
Is there any way to prevent this, or restore focus back to the previous window who had it?
Have no fear of perfection - You will never reach it
|
|
|
|