|
Toyota!
led mike
|
|
|
|
|
Any Ideas, the only difference between the two is the supposed child form stays on top, but it has no
restrictions like it would if it was an API/MDI script, and I would like to avoid MDI scripts if i could.
|
|
|
|
|
What's an MDI script?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
MDI - Multiple Document Interface
(Parent window with lots of windows inside it)
you can program them in API with certain functions etc and a group of functions or methods is generally called a script
additionally MDI is generally used for MFC based applications and can be done straight away by the wizzard on set up.
|
|
|
|
|
Sarriss wrote: a group of functions or methods is generally called a script
With a compiled language like C++, I'm pretty sure most of us
call that source code, not a script.
Also, these are windows, not forms.
Just making sure we're talking about the same thing.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
yeah sorry before this i spent about 7 years doing web programming
lots of scripts in that lol, apologies and thnx for the help
|
|
|
|
|
|
I did some real programming before the web programming
had a hand in assembler and prolog lol
|
|
|
|
|
Maybe you are good at web programming but c++ itself is other world with lot of detaily.
|
|
|
|
|
I can agree to that
But im getting the hang of it
its taken me two days to get this far in API and OOP, and it took me 3 days to pretty much get the hang of MFC so
give it another week and i will atleast be getting somewhere
|
|
|
|
|
How can I track application memory usage from application itself? For instance I want to know memory usage before and after the function call. I suspect there is a memory leak and want to track it down. Application is MFC-based
|
|
|
|
|
Have a look at GlobalMemoryStatus().
|
|
|
|
|
This is not what I am looking for. Global memory can be used by any other processes running on this PC. I cannot rely on this function to estimate memory usage for the particular application.
|
|
|
|
|
When your app is shutdown, MFC will print out objects that have not been deleted.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Try the CMemoryState class. It will work only in debug build.
You can also use the GetProcessMemoryInfo() API before and after the function.
|
|
|
|
|
Windows has the nasty habit of naming (over USB connected) camera drives with the name of the camera rather then giving them a drive letter. The camera drive will open readily in a file explorer window and a drag/drop to other file explorer windows works. However that is the end of it, drag and drop to any kind of program does not work out of the camera drive unless you copy to harddisk or a "normal" USB drive first.
The documented Drag...() functions in the Windows API accept a drap/drop from a harddisk directory but not from a camera drive.
My questions are:
How to access a camera drive over the windows API
How to accept dropped files from a camera drive.
|
|
|
|
|
Hey all, first year CS 1 student here and i am having some problems with my latest project
purpose of project: create 100 random numbers and display them in txtLog
i'm trying to change this for loop to a while... loop:
private: System::Void btnCreate_Click(System::Object^ sender, System::EventArgs^ e) {
int items;
double thick;
Int32::TryParse(txtItems->Text, items);
for (int i = 0; i<items;>{
thick = randomNumGen->Next(0,1000)/100.00;
strLog += "Chump " + i + ":\t" + thick + " mm\r\n";
}
txtLog->Text = strLog;
what i've come up with is this:
private: System::Void btnCreate_Click(System::Object^ sender, System::EventArgs^ e) {
double thick;
int i = 0;
int items = 0;
while (items > 1000);
{
thick = randomNumGen->Next(0,1000)/100.00;
strLog += "Chump " + i + ":\t" + thick + " mm\r\n";
}
txtLog->Text = strLog;
It seems to work, i get no errors, but when running and clicking btnCreate, it only lists 1 random number "Chump 0 - random number" instead of 100 random numbers in txtLog "Chump 0 - random number, chump 1, chump 2, up to 99 etc". I think that i went completely wrong when i changed it, do i need to assign i = 0 or items = 0 etc. ?
Sorry if i did this wrong! i've only been programming for a month now!
if you need more info just ask!
|
|
|
|
|
Mghand wrote: Hey all, first year CS 1 student here
I can't believe that a CS first year course is teaching managed C++ rather than native C++. What school are you attending?
Look at your code. You are setting items to Zero and then testing for items to be greater than 1000.
Mghand wrote: int items = 0;
while (items > 1000);
Use the debugger to step through the code to see what is happening. That will be much faster than posting questions on the internet.
led mike
|
|
|
|
|
1. wrong forum. this is native C++ forum, not Managed C++.
2. here is the "translation":
for (initialization; condition; incrementation) {
instructions;
}
-----
initialization;
while (condition) {
instructions;
incrementation;
}
if you can't figure out your problem with this, and with your supposed level of studies, then you're on the wrong way, and should certainly consider change your career now
|
|
|
|
|
Thanks, that translation is exactly what i was looking for,
and although depressing, i hope i'm not that bad off lol! i have no idea the difference between native/ managed c++, this is my 5th week in college now taking Computer Science 1, only working with Visual C++ (Visual Studios '08)
Using that translation my program is working just fine with the while loop, thanks alot! and sorry for any confusion! i will look for a more appropriate forum next time for these questions
|
|
|
|
|
Mghand wrote: while (items > 1000);
Study this statement.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
Hi,
in my app I'm using CListCtrl (owner data) not enabling full row select.
How can I hilite cell (subitem) on which user clicked?
Is this requiring for owner drawn fixed, or this can be achieved without it?
If you can point the way...
Thanks!
|
|
|
|
|
josip cagalj wrote: Is this requiring for owner drawn
I believe owner draw would be the way to do that
led mike
|
|
|
|
|