|
I am going to develop apps for autocadd. I have some ?'s.
Some customers only have AutoCad2004 or above.
I would like to use c# for all dev, but I want my screens to appear like they are part of the Autocad application. Some will be extremely complicated. Speed is an issue also
It must be compatible with 2004 or above. I cannot expect customers to use any energy at all to use my products
With those in mind, what version and should I go for MFC or .NET and, if .NET can it be c# or am I forcerd to use c++.net?
Can you give advice. Obviously I woulkd prefer c# for ease of use.
thanks,
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
What does Autocad expose to allow you to write plug ins ? Is it COM based ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
yes its com based. But I answered my question. Because to modify you must wrap the ADS library so its easier to do MFC.
thanks for helping though
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
If you're targeting AutoCAD 2004, then you'll be forced to use c++. The .NET framework is only supported in AutoCAD 2005 and 2006. Also note, with c++ you'll be forced to use Microsoft Developer Studio 2002, NOT 2003 and AutoCAD itself is based on that version.
If you need more questions answered, please feel free. My company (http://www.cadfx.com) does this all day as we specialize in AutoCAD developement (but not limited to).
--
Joel Lucsy
|
|
|
|
|
I am new in Visual C++. I created MDI application, and I want to disable some menu for certain function. For example, I want to disable menu with ID_MENU00 ID, when doDisableMenu() is invoked
void doDisableMenu() {
CMenu menu;
menu.EnableMenuItem(ID_MENU00, MF_GRAYED);
}
but the result is an error of 'debug assertion failed'
what should I do to disable a menu?
thank you in advance
|
|
|
|
|
It doesn't work that way. When you have a menu item selected in the IDE, there are two messages you can catch. One is the click event, the other is called just before a menu item is shown. You keep a bool in your app to tell you if a menu item is disabled, and in that method, you take the menu item ( which is passed in from memory, as a pointer ), and you set if it's enabled or not using that boolean value. The same goes for check marks, etc. Any change to a menu items state happens in this event handler.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
houari_id wrote:
I want to disable some menu for certain function
The preferred method for this is in the ON_UPDATE_COMMAND_UI() handler.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
WHEN I TRY TO COMPIL, I HAVE THE NEXT MESSAGE
DEBUG WIN32
COMPILING
stdafx.cpp
C:\Program files .....\include\winnt.h(1092) error C2146: Syntax error: missing ';' before identifier 'KSPIN_LOCK'
C:\Program files .....\include\winnt.h(1092) fatal error C1004: unexpected end of file found
im working with winMe and, in some case i try to use direct x (#include <ddraw.h>)
so... help me !!!
|
|
|
|
|
It would help if you gave us the line in question, but the second error usually means that you have precompiled headers turned on, and you've not included stdafx.h
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
but the second error usually means that you have precompiled headers turned on, and you've not included stdafx.h
Won't that lead to a part of the message like: "... while looking for precompiled header."?
I also got the blogging virus..[^]
|
|
|
|
|
mikelon wrote:
C:\Program files .....\include\winnt.h(1092) fatal error C1004: unexpected end of file found
Check for a missing parenthesis, brace, comment, semicolon, or #endif. The file must also end with a carriage return–linefeed pair.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Could you tell me how can I get system menu by API ?
hmenu = GetSystemMenu(hWnd,1);
hmenu_options_thread1 = GetSubMenu(hmenu,1);
UINT uIDCheckItem;
uIDCheckItem = GetMenuItemID(hmenu_options_thread1,1);
smenu = new TCHAR[21];
GetMenuString(hmenu_options_thread1,uIDCheckItem,smenu,20,MF_BYCOMMAND);
MessageBox(hWnd, smenu,"Menu",MB_OK);
Thank you.
|
|
|
|
|
microsoftcertificate wrote:
Could you tell me how can I get system menu by API ?
hmenu = GetSystemMenu(hWnd,1);
This is how. What's the problem?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I want to get menu string but those lines could not give me a menu string.
Thank you.
|
|
|
|
|
This works fine for me:
char szBuffer[64];
HMENU hMenu = GetSystemMenu(hWnd, FALSE);
GetMenuString(hMenu, 0, szBuffer, sizeof(szBuffer), MF_BYPOSITION);
GetMenuString(hMenu, 1, szBuffer, sizeof(szBuffer), MF_BYPOSITION);
GetMenuString(hMenu, 2, szBuffer, sizeof(szBuffer), MF_BYPOSITION);
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Dear all,
How to detect what kind of browser is running and its version? For example, Netscape or IE; IE 5.0 or IE 6.0, ect.
Best regards,
|
|
|
|
|
Your question cannot be answered in its current form (as more than one browser can be installed at any given time). If you want to know the default browser, simply use FindExecutable() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
So, can we detect IE version?
BRs,
|
|
|
|
|
|
Yes, just use GetFileVersionInfo() and VerQueryValue() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
Hiya
I know this may be a VERY stupid question... but I have tried to find a way to toggle on the line numbering in MS Visual C++ 6.0... no success... anyone?
Thanks!
|
|
|
|
|
No such option exists. The only way to know what line the cursor is on is by the Line/Col indicator down in the lower right corner next to the keyboard status indicators.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
well... that sucks...
thanks anyway!
|
|
|
|
|
Hi everybody,
I have created an PopUp Menu in a CDialog...it works OK.
Now I want to create a PopUp Menu inside an ActiveX every time I click Button RIGHT of the mouse...
I have copied the code inside the function WM_RBUTTONDOWN...The problem is that it shows the Menu but it is DISABLED (it is shown but I can not select an option).
How can I do it to solve it...to make it enable?
Thanks
Here the code :
HMENU hMenu = ::CreatePopupMenu();
if (NULL != hMenu)
{
// add a few test items
::AppendMenu(hMenu, MF_ENABLED | MF_STRING & !MF_GRAYED, 1, "Change Color");
::AppendMenu(hMenu, MF_ENABLED | MF_STRING & !MF_GRAYED, 2, "Hide");
::AppendMenu(hMenu, MF_ENABLED | MF_STRING & !MF_GRAYED, 3, "Item 3-");
ClientToScreen(&point);
int sel = ::TrackPopupMenuEx(hMenu,
TPM_CENTERALIGN | TPM_RETURNCMD,
point.x,
point.y,
m_hWnd,
NULL);
CString s;
s.Format("The selected item is %d", sel);
TRACE(s);
:estroyMenu(hMenu);
|
|
|
|