Hello Bryan Thanks for sharing the link as well. I commented the import statement, and it worked fine. I have checked the functionality of the classes though. Thanks Sujay
SujayG
Posts
-
#imports for MS Office2013 -
#imports for MS Office2013The steps are correct and it worked fine in Office 2000. I had worked on Word automation in C++ / Office 2000 . Yes, I could reproduce the errors. Probably we need to make some changes, for working on C++ / Office. Have a look at [^] ; the steps in which the author makes a change to import. Also check the Word automation using C++ [^] - specially the Solution1.h/cpp and Solution1.h/cpp to view how imports are changed. Let us know if it helps. Sujay
-
DATABASE PROBLEM"
When I run the debbuger, it show message like this:
"incompatible data type in criteria expression" Exactly in which line does show By the naming convention
m_tabOnglet
looks like a member variable of a tabcontrol.
-
#imports for MS Office2013I think if you generate files from a tlb the paths should automatically come up. This is of Office 2010 #import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE12\\MSO.DLL" no_namespace A suggestion : Having developed several Office addins, and if you are also doing so, I shall strongly suggest you to use C# .
-
Passing a C# string to C++/CLI does not show up from a CPP programThanks for the link. I have created the manged DLL , without errors. I want to call this DLL from native C++ applicaton . Please help me with a step by step process how can I do it .
-
Passing a C# string to C++/CLI does not show up from a CPP programI want to call a C# function from C++ ; and I am using C++?CLI as the bridge . I had developed a CLI wrapper - for calling C++ function from C# ,but this was my attempt to do the reverse.
-
Passing a C# string to C++/CLI does not show up from a CPP programWhat if I dont use String^ and use std::string as the preferred parameter .
-
Passing a C# string to C++/CLI does not show up from a CPP programHi , I was following the example at Using managed code in an unmanaged application[^] It seeemed strange that the function signature with String^ throws the error, but std::string does not.
-
Passing a C# string to C++/CLI does not show up from a CPP programThat's just the conversion part . I don't think that's the reason for the string not getting displayed.
-
Passing a C# string to C++/CLI does not show up from a CPP programHi There , I want to call a C# function from C++ , via CLI/C++. C# code
private string _text = "";
public void setText(string text)
{
// _text = text;
_text = "HI World";
Console.WriteLine("C# settext - {0}", _text);
}public string getText()
{
return _text;
}C++/CLI code Header :
//virtual void setText(System::String^ text);
//virtual System::String^ getText();virtual void setText(std::string text);
virtual std::string getText();CPP file
std::string CStringBridge::getText()
{
_managedObject = gcnew Bridge();
return (marshal_asstd::string(_managedObject->getText()));
}void CStringBridge::setText(std::string text)
{
_managedObject = gcnew Bridge();
_managedObject->setText(gcnew System::String(text.c_str()));
}Note : When I use the following code
virtual void setText(System::String^ text);
virtual System::String^ getText();I get the following error 3395
__declspec(dllexport) cannot be applied to a function with the __clrcall calling convention
, and so I stuck to std::string When I use the library from the C++/CLI code, and call from my C++ program, "Hi World" should be printed ; instead nothing gets printed C++ console application
IStringBridgeWrapper *pBridge = IStringBridgeWrapper::CreateInstance();
pBridge->setText(std::string("I am here"));try{
pBridge->getText();
}
catch(exception& e)
{
cout << e.what() << endl;
}I think the string is not being properly passed . Any ideas to solve it shall be appreicated.
-
What is the CLI/C++ equivalent to the C# using statementI think there is a specific keyword in CLI/C++ , which is the equivalent to the using keyword in C#. http://stackoverflow.com/q/338950[^] Can someone please help ?
-
MFC and printingNormally for printing the mapping mode is set to MM_TWIPS . Is that the practice you are looking for?
-
MFC architectureMFC Internals would be too much for him. Right now , he is trying to understand the MFC architecture . ;)
-
MFC architectureHi There , MFC architecture is too big to be discussed on a forum . I would suggest you go through the book of Jeff Prosise, to understand it better .
Sujay Ghosh Blog : http://sujay-ghosh.blogspot.com
-
Which window has the focus [modified]HI , GetFocus does return me the correct window handle also. I had tried with GetFoucs,GetActiveWindow, none of them are working
-
Which window has the focus [modified]I have to return the path of the selected file , EITHER in the Desktop or in the Windows Explorer. I can get the path of the selected file both on the Windows Explorer and the desktop My problem is that I am unable to find which window has the current focus 1) The user has selected a file on the desktop 2) The user has selected a file in the Windows explorer. ( So this has the focus now ) How do I programatically find that out I am using the following code HWND hWndDesktop = GetDesktopHandle(); // Gets the handle of the SyslistView32 window DWORD dwThread = ::GetWindowThreadProcessId(hWndDesktop, NULL); GUITHREADINFO gtf ; gtf.cbSize = sizeof(GUITHREADINFO); BOOL b = GetGUIThreadInfo(dwThread, >f); if(hWndDesktop == gtf.hwndFocus) { // this window currently has the focus } But I am getting different handles for hWndDesktop and gtf.hwndFocus . Please let me know if I am missing something EDIT I am trying to get the Window handle across processes . Thanks Sujay
modified on Friday, December 4, 2009 12:40 AM
-
How to access the Windows Explorer ( right hand pane ) in Windows 7I want to find out which item has been selected . If it was a SysListview32 , I could have SendMessage and used the HWND of the SyslistView32 . But as it is a DirectUIHWND, I dont see how to get the list view out of that. There is no documentation of DirectUIHWND . One way maybe to get the COM interface, I am thinking of that way. Any help would be appreciated. Thanks, Sujay
-
How to access the Windows Explorer ( right hand pane ) in Windows 7Hello , I can access the right pane of the Windows Explorer in XP ( 32 bit ) , by getting the handle to the "SysListView32" . But in Windows 7 , the window class for the right hand side of the Windows Explorer is DirectUIHWND. I have used Spy++ to see the child windows, but I only find ControlNotifySink . Any idea how do I get the list view . Thanks in advance Sujay
-
Getting the dekstop window handleAny idea how can I get the handle to that I guess I need to use FindWindow or FindWinodwEx, but on what. If you can help me with the code or at least the logic, I can try
-
Getting the dekstop window handleHello Ian, Yes the name is a bit confusing. The desktop handle is the main WIndow on top of which all Windows are painted . But it does not return the handle of the Window ( SysListView32 ) - which is the WIndows desktop . This can be checked with Spy++ There is another function, GetShellWindow, which "probably" returns the Windows desktop handle, I am testing that Sujay