|
Can you post some example of what exactly do you want to achieve.
Alternatively, you can store the data from the edit control into a char* and then make changes to the string. Later when you are done with this you can update the edit control to show the new string. I hope that I understood you.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think the following message will help u
EM_SETSEL and EM_REPLACESEL
Select the string that u want to replace using EM_SETSEL. Now replace that with the new text using the EM_REPLACESEL message.
-- modified at 6:43 Tuesday 30th January, 2007
nave
|
|
|
|
|
asp.netProgrammer wrote: All i need to do is place the exact string representation of an int into the edit control.
See this class for that part Convert Integers to Their Textual Description[^]
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Wow, thnkx guys. This really helps. And also, the first response was right, I could also just convert my int to string representation using itoa( int, char*, int radix ). Seriously, u guys saved me from late project, thnkx!
|
|
|
|
|
There's also SetDlgItemInt()
|
|
|
|
|
Hi guys,
I am currently trying to get a MFC-application underway. The whole system is compilable and runs smoothly on any computer with VS2005 Pro and Intel Visual Fortran 9.1.
I am having some trouble debugging, though. The app contains several data structures (see below).
<br />
struct one{<br />
double d11, double d12, double d13, ...};<br />
struct two{<br />
double d21, double d22, double d23, ...};<br />
...<br />
struct main{<br />
one onearray[FIRST_CONSTANT],<br />
two twoarray[SECOND_CONSTANT]...<br />
}<br />
Whenever I try to debug, I can get anything from the onearray, but instead of display twoarray, I get an error CXX0033.
I tried everything that came into my mind, from disabling PCH (a very old cause of this error that should be fixed) to cleaning all intermediate files automatically/by hand and rebuilding the application.
Any suggestions?
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Quick feedback:
Visual Studio with integrated VF seems to be sharing debugging information between the two systems. I found out that there were some fortran records with the same names. As soon as I changed the names of the C-structs from name to name_c, debugging started to work.
Additionally, this only seems to be a problem with structures that are passed along as pointers (e.g. a parameter to a function).
So:
void func(main* myP) is a problem (unable to view myP contents), but void func(main myP) seems to work as expected.
GNARGH!
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Hello all,
My application consists of a few processes spawned at startup using CreateProcess . Each of these processes reads a substantial portion of binary data from disk at startup. The CPU and memory are not very much stressed during that operation, but the hard disk is working very intensely (and loud), and I noticed that a loading time is perhaps even longer than a sum of individual startup times for all processes when they are run standalone.
Would it be reasonable to use a mutex to assure that multiple processes do not load data simulateneously? Or, might you have some other suggestions?
|
|
|
|
|
Bartosz Bien wrote: hard disk is working very intensely (and loud),
Change your hard disk.
|
|
|
|
|
Hi,
Nibu babu thomas wrote: Change your hard disk.
I knew someone would say that!
My question was more coding-oriented, but OK - I was thinking about updating the hardware too. I currently own this disk[^]. It is generally loud, but working well and usually quite fast. What would you suggest as a noticeably faster replacement?
|
|
|
|
|
Bartosz Bien wrote: Would it be reasonable to use a mutex to assure that multiple processes do not load data simulateneously?
I gather that the processes aren't reading the same parts of the file. If that's true, then it's likely that the disk is thrashing because the file isn't in cache, so none of the processes' reads can be satisfied from the cache. Try the mutex and redo your measurements, and see if that helps.
|
|
|
|
|
I would guess that the load times are increased because the drive is having to jump back and forth on the disk to find un-cached data.
Depending on the size of the data, if it is the same data or different data for each process, and the type of reading going on (sequential vs. random), some of the following might work:
1: Use a memory mapped file (MMF) - this eliminates the secondary memory buffer (and possibly "chunking") normally used to read data from disk. Internally, file data is also paged-in in the most efficient manner. Multiple processes can even use the same memory mapped object (if it is named), reducing the overhead of creating and destroying the file object within each object.
2: You can also use a MMF to create a private cache for the file data. You can create a pagefile-based MMF, which is basically a shared memory implementation, copy the file-based data into the MMF's memory, and then share it across all of the processes. While there will be some paging taking place, it should still be much less than that involved for hitting the disk for the pagefile and the on-disk data each time.
3: Regardless of going the MMF route or not, if reading sequentially use the appropriate flags when calling ::CreateFile(...) to improve read performance.
4: If not using a MMF solution, having each process read that file one-at-a-time sequentially from beginning to end, should offer a performance benefit as well.
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
|
|
|
|
|
how to write program "Auto View CD"
|
|
|
|
|
First think about the logic and what your requirement really is and then ask specific questions that relate to some problem...
It's already mentioned in Forum rules:
2. Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Do you wan to show autocad files?
|
|
|
|
|
hoa_nguyen wrote: how to write program "Auto View CD"
Very carefully.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: > how to write program "Auto View CD"
Very carefully.
Bah! I say extreme programming! Type what springs to your mind and then refactor!
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
|
are you talking about "autorun" ?
|
|
|
|
|
Hello,
i like to set my own cursor during selection in grid, something like hourglass or other,
what i have to do?
For that i make my own as "mycursor.gif" file and included it in my project as resource!
What function is to use, LoadCursorFromFile() or something else?
thanks
break;
|
|
|
|
|
See SetCursor():
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
You can use of Add Resource for insert or import your cursor and use of LoadImage or LoadCursor for load it or also you can use of CreateCursor to create a cursor and in the end use of SetCursor
|
|
|
|
|
I am a relative newbie to Visual Studio and C++. I have a C++/MFC/SDI application that is about 1/2 finished and so far so good. Ultimately I wish to statically link any required DLL's and distribute a single stand-alone application (without also distributing separate DLL files). I am having trouble with that.
In fact, I can't create a new project (C++/MFC/SDI) skeleton with static linking using the App Wizard that will compile without also setting the /MDd (debug version) option in the Properties/C++/CodeGeneration section. When I do that, it will compile fine, but the resulting executable requires the DLL's. It doesn't seem to make any difference whether the configuration is for a Debug or a Release build, the DLL's are still required.
Is this simply not possible?
I feel that I must be missing something, because I believe that I did something similar several years ago and it worked fine.
Thanks, Stan
|
|
|
|
|
Which version of visual C++?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|