|
We're making an add-in .dll to inventor.
After a user select some features, for example a circle or some lines, in the whole 2D sketch,we want to show only the selected ones in a dialog at once.
For the selected features may overlap with others ,what we can do to the selected features?
Appreciate for any info
|
|
|
|
|
I foegot to mention that all we do is the development of inventor-a 3D drawing software similar to AutoCAD.
We just use its API to achieve the select function.But don't know about the display thing.
|
|
|
|
|
I have no idea what inventor is. Either way, I'd suggest finding a forum dedicated to coding for it, so you're talking to people who are on the same page as you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a class A, which is a dialog having a CEdit box with CString
variable "m_Edit".
I have another class B having a CString variable "str" declared in it.
Now i want to make a call like this,
CString str = m_Edit;
This is to be done inside class B. How can i get the Edit box value in
class A to class B CString "str".
I tried a few things but couldn't make it work properly.
Can anyone got any suggestions.
Thanks in advance
|
|
|
|
|
easiest way is to define a function in ClassB which accepts a pointer to a CEdit
i.e
<br />
void CClassB::FixEdit(CEdit* pEdit)<br />
Then in that function you can set the text to the string
i.e.
<br />
<br />
void CClassB::FixEdit(CEdit* pEdit)<br />
{<br />
pEdit->SetWindowText(m_str);<br />
}<br />
How you call this up to you - but for example in the contructor of ClassA you could do the following
<br />
CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT1); <br />
<br />
CClassB* cb = new CClassB();<br />
cb->FixEdit(pEdit);<br />
You could make the function static then you would not need to instantiate the CClassB but that's up to you - likewise you could create a function which would take a CEdit pointer and you could then read the contents of the Edit Box instead
|
|
|
|
|
I think your m_Edit variable declared as public. otherwise make it public.
then you should create an object for class A, inside class B.
Like this
A objA;
then do the assignment statement...
CString str = objA.m_Edit;
regards
Vallikumar A
|
|
|
|
|
I making a program that should print a file (.html) when the user presses a button.Which functions or controls do I use,and how do I implement them?
Tnanx
|
|
|
|
|
I think the easiest way would be to load it up in MSHTML and get it to print it.
Steve
-- modified at 18:26 Monday 16th January, 2006
ADDED:
Look up the IDM_PRINT command and IOleCommandTarget .
|
|
|
|
|
Have you considered ShellExecute() with the "print" verb?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
I stand corrected - Your way is much easier.
Steve
|
|
|
|
|
nice one .
0x0400:
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|
|
Need a help to finish this programme
It needs and IF and Do/while Loop
The program will simulate the calculation of an employee’s net wage
The calculation is based on wage amount and tax code
Request the following:
Employee Name
ID Number
Wage
Tax Code
The Valid tax code are S and C. S for self-employed and C for company employed. If incorrect code is entered, the program should ask again.
Tax is calculated is following. Self-employed >27,000=25%
between 27, 000 & 20,000 = 23%
<20,000, = 20%
Company Employed
>29,000>24%
between 29,000 & 18,000 = 22%
<18, 000, =10%
finally, the programme should print a report detailing the employee's name ID and net wage.
Any help would be gratefully accepted
|
|
|
|
|
If you need help to finish it you should have STARTED.
What have you done so far?
What specific problems have you encountered?
Why didn't you pay attention in class?
Why do you expect busy developers to do your homework for you?
;P;P
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
I have the first bit written. it was stupid of me to write all of that. Just lost on the tax bit at the end.
Never, under any circumstances, take a sleeping pill and a laxative on the same night.
|
|
|
|
|
Hi,
Assuming I want to read the data that goes into a file w/o actually accessing the file on the disk. Could that be done if I know the name if the process which is writing the files and the file name ?
Basically, I want to look for some keywords in the file but I want to catch them while they are written w/o the need to access the file the regular way and search it.
Sounds strange , I know
Shay
|
|
|
|
|
Seems like it should be possible, but it is obviously not a trivial task. At a minimum, a device driver would need to be created.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Thx,
I figured out is would be something that "sniffed" the hardware buffers.
Shay
|
|
|
|
|
I seem to be hitting an OS limitation on the number of threads I can create yet I'm only at 1G of 4G RAM usage according to task manager's performance tab.
I'm writting a small app for stress testing which spawns a bunch of job threads. Each job uses up two threads to do its dirty work. Is there a soft limit on the number of threads I can create? A registry setting perhaps?
Todd Smith
|
|
|
|
|
Hey Todd
The issue is that, since a process has only 2 GB of memory, and since each thread attempts to create a 1 MB stack by default, you are limited to about 2000 threads (maximum) per process.
Use the /STACK linker option to reduce the default thread stack size, and you'll be able to create a bigger number of threads.
Regards,
Nish
-- modified at 14:45 Monday 16th January, 2006
|
|
|
|
|
Nishant Sivakumar wrote: The issue is that, since a process has only 2 GB of memory, and since each thread attempts to create a 1 MB stack by default, you are limited to about 2000 threads (maximum) per process.
Use the /STACK linker option to reduce the default thread stack size, and you'll be able to create a bigger number of threads.
Ah that's it. Decreasing the stack sized helped. I guess I'll have to run multiple processes to get more threads.
thx
Todd Smith
|
|
|
|
|
Todd Smith wrote: Ah that's it. Decreasing the stack sized helped. I guess I'll have to run multiple processes to get more threads.
Yes, and if you are on an OS that supports the /3GB boot.ini option, use that as well.
Regards,
Nish
|
|
|
|
|
If you're running out of memory because of too many threads, you've probably got too many threads. You could consider using a thread pool - Look up the QueueUserWorkItem Win32 API.
Steve
|
|
|
|
|
Stephen Hewitt wrote: If you're running out of memory because of too many threads, you've probably got too many threads. You could consider using a thread pool - Look up the QueueUserWorkItem Win32 API.
His intention is to do a stress test on some app (probably teir company product). Almost attempting to DOS attack their app
I guess it'd be simpler for him to run more processes, each spawning as many threads as possible.
Regards,
Nish
|
|
|
|
|
I didn't catch on to the fact that he was trying to do a stress test first time around (I should read the question more carefully before answering) - I guess he succeeded then!
Steve
|
|
|
|
|
Hi!
I have this software package I am maintaining and I have run into a small glitch because of the way CRecordView handles moves.
Imagine an entry window where you enter and update people. The key is an integer. If you enter a number in the key field the corresponding person is displayed. Now assume that you have a person on-screen and then change the number, but instead of leaving the field (which would trigger a lookup) you hit "PreviousRecord". This triggers an OnMove and that will do a save before the move and presto! You have changed the number of that person which was probably not what you intended.
The workaround which I have dreamed up on sleepless nights is to add a boolean to the class that all fields inherit from and check that in DoDataExchange, ie the field is normally FALSE, but TRUE for key fields.
In the DDX function I check if(pField->m_bKeyField && pDX->m_bSaveAndValidate) and only allow the DDX if m_bAddMode is true. For non-key fields I just do the DDX.
This will prevent updating the key field unless we are adding a new record.
How does this sound? Totally bad? Is there a better way?
|
|
|
|