I have a MFC SDI app which has a single view with a bunch of controls. As an enhancement, there is a suggestion to add splitter pane to divide the existing view into 2 horizontal parts so that user can adjust panes to view according to their requirement. So, my splitter would be of 2 rows and 1 col. But problem which I am facing is - all implementation which I have seen till now for CSplitterWnd create a new Wnd or View or store each "pane" in the view. But in my case, there's a single view which has already been created(and there's already huge business logic written in Child View class) and it would be a pain to actually partition that view into 2 views and then add the relevant code. Is there any way I can use same view to add a horizontal static splitter with 2 panes so that 2 panes will actually contain diff controls but part of just 1 view file. Thanks Amit
User 5695619
Posts
-
Want to add a static horizontal splitter to an already created view in sdi app -
Is there any native WPF Multiselect combobox available ?Even 3rd party one will do. Thanks Amit
-
How to return array of custom objects from native C++ class to cpp/CLI class.Okay, but I wanted to convey that nativeC++ DLL and Cpp/CLI DLL are in diff projects. Not sure if it is a nice idea to return a ptr from unmanaged project to managed cpp/cli project.
N a v a n e e t h wrote:
What is the exact error message?
An unhandled exception of type 'System.AccessViolationException' occurred in CLIConsole.exe Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Thanks Amit
-
How to return array of custom objects from native C++ class to cpp/CLI class.Hi, I have a C++ library app which talks to a C++ server and I am creating a vectorje of my custom class objects. But my Cpp/CLI app(which interacts with native C++ ), throws a memory violation error when I try to return my custom class obj vector. Code Sample - In my native C++ class - std::vector GetStuff(int x) { -- do stuff std::vector vec; A a; vec.push_back(a); --- push more A objs return vec; } In my Cpp/CLI class public void doStuff() { std::vector vec; vec = m_nativeCpp->GetStuff(4); // where nativeCpp is a dynamically allocated class in nativecpp DLL, the app throws up a memory violation error here! } Anything I am missing here ?What should be the ideal way to return such an array - Regards Amit
-
Linker Error in CLR library file while linking to native C++ application.I have a CLR Application where I am trying to write a .NET wrapper over calls made to native C++ Library. I am using VS 2008 but libraries are compiled in VS2003 or 2005. I am getting some linker errors on linking. Strangely, every error is 1 of these 3 unresolved external symbol ones - 1. std::locale::facet::_Register 2. std::ctype&::_Getcat 3. std::strstream::strstream Details of the errors - error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::strstream::~strstream(void)" (__imp_??1strstream@std@@UAE@XZ) error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ) error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ) error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z) error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z) error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z) error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z) error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::strstream::strstream(char *,int,int)" (__imp_??0strstream@std@@QAE@PADHH@Z) Thanks a lot for the help. Amit
-
Getting Linker Errors when I compile a CLR Library which uses Native C++ LibraryI have a CLR Application where I am trying to write a .NET wrapper over calls made to native C++ Library. I am using VS 2008 but libraries are compiled in VS2003 or 2005. I am getting some linker errors on linking. Strangely, every error is 1 of these 3 unresolved external symbol ones - 1. std::locale::facet::_Register 2. std::ctype&::_Getcat 3. std::strstream::strstream Details of the errors - error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::strstream::~strstream(void)" (__imp_??1strstream@std@@UAE@XZ) error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ) error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ) error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z) error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z) error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z) error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z) error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::strstream::strstream(char *,int,int)" (__imp_??0strstream@std@@QAE@PADHH@Z) Thanks a lot for the help. Amit
-
Design for VC++ network applicationHi All, I am currently making a VC++(MFC) app which will act as additional login screen. It will come up when user logs in to Windows XP machine and user has to use a username/pwd combination which will be given to him. The business idea is for a Cyber Cafe where users login with their account details, and they can browse till they have "browsing time" in their accounts. Once they logout or their "browse time" is over, the login screen again appears facilitating the next user to login with his credentials. I have created the MFC login screen(starting it as a windows service) and when user logs in successfully, I am placing the MFC program in the systray where user can login and see his remaining time, etc. What I wanted from community is couple of design suggestions - Q1. Is the idea of placing the app in the systray appropriate ? Can you advise some other approach which could come handy ? Q2. Also, I am looking forward to have the authentication being done via a machine(a server) - which has all authentication info as well as browse time information stored in it. I was looking fwd to use Winsock API for this purpose. The client application(installed on all machines) will contact server app in following cases - 1) while logging in - to get authentication info, browse time info. 2) while logging out - to record time spent in browsing. Is this network design appropriate - using client/server architecture and winsock API or can their be any improvements in the design ? Thanks for the help! Regards Cage