|
Check www.opendwg.org[^]. There's a toolkit and a viewkit which put together should help. It's members-only downloads, but thats the most I can think of at the moment. There are a couple of articles here, but they are for writing DXF, not reading it.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I would like to edit a Russian (Cyryllic) string in MFC's Edit/RichEdit box, then DDX it and write it to file... of course to be read again and put into the edit box.
Should I use Unicode (i.e. compile my application for Unicode)? Will it work with Win9x? How do I setup Edit box for cyryllic font?
Regards,
BB
|
|
|
|
|
My inclination would be to use Unicode, but I haven't worked with a non-english version of Windows, so I don't know if it's absolutely necessary. If you want it to work on an english version of Windows, then yes, you'll have to use Unicode. In this case, it won't work with Win9x, unless you link with the Microsoft Layer for Unicode (check the MSDN docs for this). You should be able to use any font that supports cyrillic characters. I think the Arial Unicode font does - you'll have to check, and distribute one with your app if necessary.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Is there a way to get the number of logical processors in a Windows XP system? If I see that the application is running on Windows XP and that hyperthreading is enabled (how do I do that?) I guess I could just divide by two?
Are there any api calls for this? I found something about GetLogicalProcessorInformation , but that didn't seem to be what I need.
Thanks,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
What is the difference between normal CPU and logical CPU? One solution is GetSystemInfo().
Kuphryn
|
|
|
|
|
With Hyperthreading you have physical processors and logical processors. Example, let's say:
I have to physical processors each one is also a logical processor. I then enable hyperthreading on both CPUs. Windows now thinks that I have 4 logical processors, that being each physical processor now represents two logical.
I wish to be able to get the number of physical processors and then also the number of logical processors. The reason for this is that if I were to have 4 real physical processors I might then spin out 8 threads. On the other hand, if I have only two physical processors that each are hyperthreaded I would only spin out 6 threads (logical processors aren't as capable as a physical processor).
Hope this offers some explanation.
-Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
Try GetSystemInfo. I believe that the SYSTEM_INFO.dwNumberOfProcessors returns the number of logical processors (although I could be wrong).
onwards and upwards...
|
|
|
|
|
see answer to kuphryn...
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
I found the answer on Intel's site:
CPU Counting Utility[^]
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
I need 2 structures that have references to eachother. In this situation I need to do some forward declaring. I know how to do this when using a reference (pointer) to the other structure, but I don't want to use pointers so I don't have to create the structure with new and destroying them with delete when I don't need them anymore.
So what my question basically comes down to, is it possible to have circular references without using pointers? e.g. something like:
<br />
typedef std::list<struct TParamValue> TParamValues;<br />
typedef std::list<struct TParamField> TParamFields;<br />
<br />
typedef struct TParamValue<br />
{<br />
CString value;
CString description;
TParamFields fields;
} TParamValue;<br />
<br />
typedef struct TParamField<br />
{<br />
unsigned long index;
unsigned long bits;
CString description;
CString currentValue;
TParamValues values;
} TParamField;<br />
|
|
|
|
|
Brian van der Beek wrote:
So what my question basically comes down to, is it possible to have circular references without using pointers?
No. To fully specify a structure, the compiler has to know the size of every member, which means they have to be fully specified. If you have a circular reference, neither of the structures are fully specified, so neither can be compiled because they rely on the other one.
It's a never-ending loop which the compiler can not sort out. The only way to solve this problem is using pointers or references.
However, your situation may work (I'm not sure what the compiler might complain about). std::list internally uses pointers, so the compiler might accept it. You can try, but don't be surprised if it doesn't work.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan Binns wrote:
It's a never-ending loop which the compiler can not sort out. The only way to solve this problem is using pointers or references.
I was afraid of that.
Ryan Binns wrote:
However, your situation may work (I'm not sure what the compiler might complain about). std::list internally uses pointers, so the compiler might accept it. You can try, but don't be surprised if it doesn't work.
I doesn't work. I do have a question about your remark though. Does std::list use pointers? I always though it just stored the specified type, i.e. <T> instead of <T*> .
|
|
|
|
|
Brian van der Beek wrote:
I do have a question about your remark though. Does std::list use pointers? I always though it just stored the specified type, i.e. <t> instead of <t*>.
I was wrong It stores the object as a member of a private structure - which it stores pointers of. I forgot about that . So no, your situation won't work.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I've searched on how to remove the scrollbars on a CWebbrowser2 component, and the only thing I've found was to modify the HTML file itself by adding scroll=no to the <BODY> tag.
Is there another way that I missed ?
Thanks.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
I am working now on my own shell wich substitutes explorer.exe. Why do I need ths? - For security reasons
I am having problems with language switching in WinXP. When I press Ctrl+Shift, the keyborad language supposed to change, but It does not.
In Win9x/2000 there is no such problems since keyboard indicator is placed automatically into systray, But this does not work in WinXP!
Where can I get info about how to write own keyboard indicator or (even better) find the source code of working sample?
Thanks.
|
|
|
|
|
Hi,
I want to use OnCtlColor message to change the backgroung color of a Dialog. I use it like this :
CBrush m_Brush;<br />
<br />
m_Brush.CreateSolidBrush(RGB(212,212,226));<br />
<br />
HBRUSH MyClass::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) <br />
{<br />
return m_brush;<br />
}
It work, BUT THE BACKGROUNG COLOR OF ALL MY EDIT CONTROL ON THIS DIALOG are paint also by the bush.
Is There any way to keep the back color of an edit control to white by default ?
Thanks in advance
|
|
|
|
|
pWnd points to the control being coloured. Use this to determine whether you want to do the colouring or not.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
check the nCtlColor param.....
|
|
|
|
|
Hi, is there any effective way to know a process is dead?
Qin An
|
|
|
|
|
An easy way is to call GetExitCodeProcess() on the handle of the process you want ot check. If it is still running, the code will be STILL_ACTIVE, otherwise it will be the exit code of the process.
Phil
|
|
|
|
|
I am attempting to send e-mails using SMTP out of an MFC application. I am able to connect to a server just fine, and I receive the opening "greeting" from the server-- 220..... I am using the CSocket class to make my connection to the mail servers, and CArchive classes to pass the information to and from the server. For some reason, after I send the "HELO <server>" message, I am not receiving anything back from the server...which obviously leads me to believe that either I need to send my messages as something different than the CStrings that I am using now, or that I may need to use something other than CArchives to pass my messages. If anybody has had experience using SMTP out of an MFC application and knows what I'm doing wrong, I'd love some help.
Here is the function I am using to pass my HELO greeting to the e-mail servers. arOut and arIn are CArchive objects, and are both pointers that get created when a connection is made to the server. The application is currently waiting forever on the arIn->ReadString( InString ) line, as the server isn't responding to my attempt to pass a string to it.
BOOL SMTP::HELO( )
{
if ( arOut )
{
arOut->WriteString( "HELO SIR" );
arOut->Flush();
if ( arIn )
{
CString InString;
arIn->ReadString( InString );
return TRUE;
}
}
return FALSE;
}
Douglas A. Wright
dawrigh3@kent.edu
|
|
|
|
|
DougwW48 wrote:
the server isn't responding to my attempt to pass a string to it.
Absolutely. With the SMTP protocol, every line must be terminated with a carriage return and line feed. You need to send "HELO SIR\r\n" before it will respond.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Don't use CArchive classes to communicate with standard TCP/IP applications. They work properly only when the other end uses CArchive as well. You should use straight WinSock functions to communicate with a SMTP server.
|
|
|
|
|
Using CArchive::WriteString() and CArchive::ReadString() is fine. The other CArchive member functions (except Read() and Write() ) won't work, as you said.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|