|
Shah Satish wrote: 1. How can I insert my all .dwg ( autocad drawing)..I.e. which method or class should i used for insert the drawing in my application.
Does AutoCAD have some sort of ActiveX control? If not, you'll need to convert the drawings to something that Windows can recognize (e.g., GIF, BMP, JPEG) natively.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for mail.. but How its possible..Because its not possible to convert .dwg to .bmp..Do u have any ideaa ?? Its possible to convert in .sld (slide ) format but then could window recognize it ??
Shah
|
|
|
|
|
I tried but could not found thats why i asked question in this forum..Do u have any bit idea about it ?
|
|
|
|
|
Yeh..It is possible to convert from .dwg to .bmp..But then it is possible to make preview ?? if yes then please suggest me how.. if u have any code then please send it.
Thanks
|
|
|
|
|
Shah Satish wrote: But then it is possible to make preview ??
There are several ways of displaying a .bmp file on a dialog. For example, use a static control with the SS_BITMAP style.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
But it is possible to display no of .bmp file ??( I have appr more than 100 .dwg file)ie if i will convert it from .dwg to .bmp then i have more than 100 BMP file..
|
|
|
|
|
If you needed to show more than one at a time, you could use a list box with the LBS_OWNERDRAWFIXED style.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
In order to read AutoCAD Dwg files you need a library, DWG files must be analysed in order to write a reader and it should work for different versions (Since it is not documented). You can export drawings as DXF and read it. DXF Format is documented and there are libraries that you can use (DICE, one in OpenSceneGraph)or you can write on your own. However, there is also a library which does that for you (but you gotta get a license) searh for dwg library on Internet.
By the way, Autocad can export bitmap with bmpout command.
As suggested earlier, you may use ActiveX, i dont have much experience on this, however that might be possible, Autocad provides libraries and controls for .NET VB/VC++ applications, search for ARX but your AutoCAD and Visual Studio versions must be compatible. (For example Autocad 2007 needs VS2005)
Hope this helps.
Bekir.
|
|
|
|
|
Hi !!!
Thanks for your mail..Let see..
|
|
|
|
|
Hi,
I need to get the content of the current playlist playing in WMP9.0. However, I am not being able to use functions as get_count and get_item provided.Please help.
|
|
|
|
|
Hey.
This seemed like the most relevant forum but sorry if it isnt.
I am using Visual Studio 2003.NET and would like to know how can I get it to compile files written in x86 assembler code alongside my project.
I have tried adding "E:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\ml.exe" /c /Cx /coff $(inputpath) as a custom build step with the output set to $(InputName).obj. But every time i build i get unresolved external.
At the top of my C++ file i have extern asmfunction.
Any one spot any beginners pitfalls I may have stumbled blindly into.
Cheers.
Dan.
|
|
|
|
|
Why are you using the command line ?
Build the asm to a lib using a separate project, and then bind all projects in the workspace.
|
|
|
|
|
Hey.
Thanks for the help but that is the problem - i am unsure how to compile the asm code.
Thanks for any help.
Dan
|
|
|
|
|
DanB1983 wrote: But every time i build i get unresolved external.
Regarding what (e.g., functions in your .asm files, or in your .cpp files)? Are your .asm files being compiled into .obj files?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hey thanks for the reply.
The problem is that I have an asm function that writes to video memory called ClearRectangle(BYTE left, BYTE top, BYTE right, BYTE bottom, BYTE colour).
I attempt to compile this with ml.exe (as per the build step i talked about in my first post).
I also have a cpp file that simplified looks like this:
typedef char BYTE;
extern ClearRectangle(BYTE left, BYTE top, BYTE right, BYTE bottom, BYTE character, BYTE colour);
int main(void)
{
ClearRectangle(0, 0, 80, 25, 0xDB, 0x1);
}
When i compile this i get ASM error LNK2019: unresolved external symbol "void __cdecl ClearRectangle(char left, char top, char right, char bottom, char character, char colour)"
|
|
|
|
|
DanB1983 wrote: The problem is that I have an asm function that writes to video memory called ClearRectangle...
Have you considered doing this via Win32? I'm not sure how it compares speed-wise, but you would get past this compiler/linker roadblock.
DanB1983 wrote: When i compile this i get ASM error LNK2019: unresolved external symbol "void __cdecl ClearRectangle(char left, char top, char right, char bottom, char character, char colour)"
Which indicates that the ASM's .obj file is not being linked. You'll need to make that change.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
Win32 isnt really an option I am doing this as an exercise in asm.
How do i link in the obj file? I have looked at additional dependancies etc but am still not sure.
Thanks
Dan
|
|
|
|
|
DanB1983 wrote: How do i link in the obj file?
Project Settings (Alt+F7)
--> Link tab
--> Object/library modules
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DanB1983 wrote: The problem is that I have an asm function that writes to video memory called ClearRectangle(BYTE left, BYTE top, BYTE right, BYTE bottom, BYTE colour).
This is a little OT, but is this from an older (256-color) DOS-based application? You cannot (easily) write directly to video memory from a normal Win32 application, so I am not sure that this will work correctly even after you resolve the linking problem. We have come a long way from the days of ModeX programming.
It looks like a character-based operation, but I figured I would make sure - given that the function takes no parameter to indicate which console window to use, or what address to write to...
Also, BYTE is normally typedef ed to unsigned char .
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
|
|
|
|
|
Hi.
Thanks for the typedef suggestion.
I am porting some functions I wrote using Borland Compiler 4.0 (C/C++) (16bit).
They worked under windows 2k and windows XP. The screen memory location is within the function:- b800h that is then used along with an offset and simple maths to write chars at the correct positions.
I have quite a few asm screen related functions that need porting - this is just a practice so I think I will just continue to use BC v4.0
Thanks for every ones help.
Dan
|
|
|
|
|
Heh - I remember B800 quite well!
I am surprised that things are working correctly writing directly to that address actually does anything under Windows, unless running in a DOS prompt, but now that I think about it, you are using character locations, so that actually makes a bit of sense... :/
Good luck to you...! - If sticking with character operations, it might be worth investigating the Console functions. They are a bit of a pain in the ass to use, especially if doing anything in color, but they are the Win32 way of doing things...
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
|
|
|
|
|
Hi !!
How can I set Jpeg image as a dialog background ???
I know how to set the Bmp as a dialog background.But, I don't know how to set a Jpeg image.
Can anyone please give me the solution for this.
Thanks & Regrads,
klvin.
|
|
|
|
|
klvin wrote: How can I set Jpeg image as a dialog background ???
Hi,If you are using VC8 see the CImage Class in MSDN.Using that you can get the Handle of JPEG and use it as BMP to display the image.
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
CImage m_Image;
m_Image.Load(yourfile);
m_Image.BitBlt(...);
Or you can use of GDI+
|
|
|
|
|