|
Good afternoon,
I want to make a simple VC++ software with
MFC Visual Studio 2017 classes permitting
to draw one or several lines in a Single Document
interface. How can I process?
Thank you very much for your help.
All my best regards,
|
|
|
|
|
|
Hi Richard,
Thank you for your help which is welcome.
Best regards,
|
|
|
|
|
Hello Richard,
The link you submit me to follow is very interesting
but a little hard to understand.
Otherwise, thank you very much for your help.
Best regards,
|
|
|
|
|
Member 14494772 wrote: a little hard to understand. Yes, I am afraid that is a common complaint with MFC.
|
|
|
|
|
i have been trying to create setup file through setup and deployment template in vs2010. so now i have successfully added all files,folders,shortcuts and dlls etc.. but i have strucked at adding prerequisites to my setup application.i researched and found many articles but those all are telling to add prerequisites from the same computer,yes i followed and done it successfully, but when i try to install that setup in another computer(which is not installed vs2010 and .Net framework in it) its tending for .Net framework and redistribute components. the client computer installed with win7 32 or 64 bit OS (which will have no internet and not installed vs2010 as well). i just want to distribite my setup file which included prerequisites and redistributable components so that client simply install it and run the application.by the way i am using vs2010 ultimate to build the setup in win7. so is it possible to do that? i have been trying to do it from past three days but i couldn't, so finally i came here. please help me to solve this issue.thanks in advance.
|
|
|
|
|
|
thanks for the reply but i think its not an issue about version of the .Net framework. my project using .Net 4.0 and i selected the same in the prerequisite dialog box, (FYU) i selected the third option like "download prerequisite from the following location" but after giving successful path and built the setup. when i install the setup in another computer its searching for .net framework from the web.this is what i can't understand. please suggest any link with detailed procedure (i am trying with MFC application).thank you
|
|
|
|
|
If they don't have access to the internet, then you have to provide the whole .NET framework as part of your installation: it is large and not normally included as it is downloaded as needed when the installer finds the right version isn't installed. Win 7 ships with .NET Framework 3.5.1 so any fresh(ish) installation that you try to add your .NET 4.0 app to will need to install a more recent framework before it gets anywhere else.
No internet? You need to supply it.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
thanks for spending your time for me.
we couldn't able to provide the internet there at workplace. now adding the prerequisites is raising this issue ain't i giving the exact path?
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\vcredist_x86
C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\WindowsInstaller3_1
these are the paths i have tried till now from where to add the prerequisites to my setup,but i think those are not good choice and i tried to install my setup in winXP machine till now, may it cause this?
|
|
|
|
|
You can't just install the DLL's for .NET V4.0, you have to install the whole framework properly. That means following the link I gave you, and including that as a part of your installation. That's because you don't have the internet, which MS usually use to ensure the right version of .NET is installed prior to the main installer starting.
Gawd knows if the V40 framework will work on XP at all: I don't! A quick check with MS says it will, if XP is at SP3 - which if it's not on the internet, it very probably isn't ...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
yes,sorry for the late, i have moved to another bug. so i am using the template "Visual studio installer" on win7 32-bit OS.all prerequisites are added successfully like vc runtime components, my application related dlls, from the prerequisites dialog box i checked "microsoft dotnet 4.0 client,4.5" and "windows installer 3.1" but it couldn't be included in it i think.after built successfully the setup is going to run on winXP, Win7 (32/64) bit Operating systems. now i installed it on XP machine ,its searching for dotnet framework in the web,when i installed it on win7(32-bit) machine its showing the error like msvcp100d.dll is missing. my mfc vc++ application's target framework is dotnet4.0 so that's why i have checked 4.0 version also from prerequisite window,but i got same result as above. so what would be the exact missing in my setup..? thanks for your patience...
|
|
|
|
|
|
HI all,
I have found a source code for detecting new HDD on windows but it show GUI MFC. I want to convert this code to Win32 application, and running silent underground windows always wait when a new HDD plug it show message dialog "Detect new a HDD, do you want format it? Yes or No".
when you click "Yes" it will call diskpart and format new HDD and assign. I'm not a deverploer so I need your help.
link source: HWDetect.rar - Google Drive[^]
please to help me!
Thanks all,
|
|
|
|
|
Sorry, this site does not provide code to order; try freelancer.com.
|
|
|
|
|
I have 3rd party . OCX file. which loads in HTML scripts and do desired work
Below Steps I have used while creating a Wrapper:
1: In visual Studio-> VC++-CLR-ClassLibrary project
2: Project add Reference (.ocx file)
3: Ref: i am abe to see Interop.Filelib.1.0
4: now in Project.h i am trying to use Filelib but not able to create any object or instance.
While i tried to create an Activex project and added .ocx file getting below stuff and i am not able to understand how to use it and create an wrapper for C#.
class CDNXCardReaderX : public CWnd
{
protected:
DECLARE_DYNCREATE(CDNXCardReaderX)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0x222BBB5D, 0xE9FC, 0x4EB6, { 0x9E, 0xD0, 0x41, 0x10, 0x2C, 0x95, 0xC0, 0x3A } };
return clsid;
}
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect, CWnd* pParentWnd, UINT nID,
CCreateContext* pContext = NULL)
{
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID);
}
BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd,
UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE,
BSTR bstrLicKey = NULL)
{
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
pPersist, bStorage, bstrLicKey);
}
// Attributes
public:
// Operations
public:
long OpenSessionSync(long Timeout)
{
long result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x2d, DISPATCH_METHOD, VT_I4, (void*)&result, parms, Timeout);
return result;
}
I am totally clueless on what approach shall i use to create object and call these functions.
|
|
|
|
|
|
You already posted this in the C/C++ forum: please do not repost.
|
|
|
|
|
I have a program that works fine on most machines. Every now and then I find a
computer and the edit boxes are shifted to the right. I have an image of the
shifting here
http://ruthtechnology.com/temp/Untitled2.jpg[^]
In the past, I use to be able to go to display settings and change it from 125% to 100% and reboot and the boxes would line up nicely with the form. But its on a 100% and I dont know why its not lining up.
Any comments or suggestions are greatly appreciated.
|
|
|
|
|
In my C++ application, I have added CLR support((/clr) to use WCF communication.
Everything is working well, but i observed handle leak. When I analyze this with WinDbg(!htrace). Its shows handle leaks in .NET libs as shown below.
Handle = 0x0000000000003300 - OPEN
Thread ID = 0x0000000000004dbc, Process ID = 0x000000000000414c
0x000000007785a30a: ntdll!ZwCreateThreadEx+0x000000000000000a
0x000007fefd37ac73: KERNELBASE!CreateRemoteThreadEx+0x0000000000000163
0x00000000776e57a6: KERNEL32!CreateThread+0x0000000000000036
0x000007fedaf3f0aa: clr!ClrCreateManagedInstance+0x000000000001ae0a
0x000007fedaf3efb8: clr!ClrCreateManagedInstance+0x000000000001ad18
0x000007fedaf3f5e3: clr!ClrCreateManagedInstance+0x000000000001b343
0x000007fedaf3f623: clr!ClrCreateManagedInstance+0x000000000001b383
0x000007fedaeb3b5e: clr!PreBindAssemblyEx+0x0000000000007e5e
0x000007fedae0a05f: clr!LogHelp_LogAssert+0x000000000000525f
0x000007fedae0837c: clr!LogHelp_LogAssert+0x000000000000357c
0x000007fedae08125: clr!LogHelp_LogAssert+0x0000000000003325
--------------------------------------
Handle = 0x00000000000032fc - OPEN
Thread ID = 0x0000000000004dbc, Process ID = 0x000000000000414c
0x0000000077859d0a: ntdll!ZwCreateEvent+0x000000000000000a
0x000007fefd372d15: KERNELBASE!CreateEventExW+0x0000000000000065
0x000007fedaf3db8a: clr!ClrCreateManagedInstance+0x00000000000198ea
0x000007fedaf3dd27: clr!ClrCreateManagedInstance+0x0000000000019a87
0x000007fedaf3f077: clr!ClrCreateManagedInstance+0x000000000001add7
0x000007fedaf3efb8: clr!ClrCreateManagedInstance+0x000000000001ad18
0x000007fedaf3f5e3: clr!ClrCreateManagedInstance+0x000000000001b343
0x000007fedaf3f623: clr!ClrCreateManagedInstance+0x000000000001b383
0x000007fedaeb3b5e: clr!PreBindAssemblyEx+0x0000000000007e5e
0x000007fedae0a05f: clr!LogHelp_LogAssert+0x000000000000525f
0x000007fedae0837c: clr!LogHelp_LogAssert+0x000000000000357c
0x000007fedae08125: clr!LogHelp_LogAssert+0x0000000000003325
0x000007fedaeb5abf: clr!PreBindAssemblyEx+0x0000000000009dbf
0x00000000776e571d: KERNEL32!BaseThreadInitThunk+0x000000000000000d
--------------------------------------
Handle = 0x00000000000032f8 - OPEN
Thread ID = 0x0000000000004dbc, Process ID = 0x000000000000414c
0x0000000077859d0a: ntdll!ZwCreateEvent+0x000000000000000az
0x000007fefd372d15: KERNELBASE!CreateEventExW+0x0000000000000065
0x000007fedaf3db8a: clr!ClrCreateManagedInstance+0x00000000000198ea
0x000007fedaf3dd19: clr!ClrCreateManagedInstance+0x0000000000019a79
0x000007fedaf3f077: clr!ClrCreateManagedInstance+0x000000000001add7
0x000007fedaf3efb8: clr!ClrCreateManagedInstance+0x000000000001ad18
0x000007fedaf3f5e3: clr!ClrCreateManagedInstance+0x000000000001b343
0x000007fedaf3f623: clr!ClrCreateManagedInstance+0x000000000001b383
0x000007fedaeb3b5e: clr!PreBindAssemblyEx+0x0000000000007e5e
0x000007fedae0a05f: clr!LogHelp_LogAssert+0x000000000000525f
0x000007fedae0837c: clr!LogHelp_LogAssert+0x000000000000357c
0x000007fedae08125: clr!LogHelp_LogAssert+0x0000000000003325
0x000007fedaeb5abf: clr!PreBindAssemblyEx+0x0000000000009dbf
0x00000000776e571d: KERNEL32!BaseThreadInitThunk+0x000000000000000d
Am using VS 2015 and .Net version is 4.5.2.
Is this an issue in .NET? Any help and or suggestions you may have would be greatly appreciated, Thanks
Arun Menon
|
|
|
|
|
Hello All.
I'm trying to create a function that can loop through a list of Windows::Forms::Controls (I know there's no loop below, I'm just keeping it simple for sake of testing) and perform a task. Right now I have a function which works properly:
void mCtrlWrap::IsVisible(bool TF, List<Windows::Forms::TextBox^>^ list)
{
if (TF == true)
{
list[0]->Visible = true;
list[0]->BackColor = Color::Azure;
}
else if (TF != true)
{
list[0]->Visible = false;
}
}
but i want to make the List parameter a template so that it take List<windows::forms::combobox^>^ as a parameter or List<windows::forms::label^>^, etc.
I've tried
template<typename T>
void mCtrlWrap::IsVisible(bool TF, System::Collections::Generic::List<T>^ list)
{
if (TF == true)
{
list[0]->Visible = true;
list[0]->BackColor = Color::Azure;
}
else if (TF != true)
{
list[0]->Visible = false;
}
}
which compiles just fine but i get linking errors:
1>MainScreen.obj : error LNK2020: unresolved token (06000001) mCtrlWrap::IsVisible<system::windows::forms::textbox ^="">
can someone please help me figure out what I'm doing wrong?
Thanks
Brennan
|
|
|
|
|
In C# you would handle this by casting each component to a Control object. I assume you can do the same in C++/CLI.
Also, why do you need the else if clause above? TF can only be true or false , if it is not true then you only need a simple else clause for the second block, thus:
if (TF == true) {
}
else
{
}
|
|
|
|
|
You are mixing C++ template and .NET generics. This is OK is you understand what are you doing.
In your specific case, this is classic C++ template problem. To call templated function C++ compiler must see the function implementation, and not only prototype. So, you can instantiate IsVisible function only in the same .cpp file. Or make it inline by moving the function implementation to .h file.
|
|
|
|
|
I used following link:-
ILocation::GetReportStatus | Microsoft Docs[^][^]
Got code for Geolocation:-
at line :-
CoCreateInstance(CLSID_Location, NULL, CLSCTX_INPROC, IID_PPV_ARGS(&pLocation));
I am getting handle = S_OK & showing message "Type information not available in locationApi.dll symbols."
Please help if any idea.
Thanks in advance.
|
|
|
|
|
Where are you getting that message?
|
|
|
|
|