|
maybe he doesn't need to keep the 16bits compatibility; only rebuild the application with a modern compiler.
I can't help since I never coded win 3. applications.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote: maybe he doesn't need to keep the 16bits compatibility
Windows 3.1 == 16-bit applications only, unless you use the Win32s add-on that Microsoft came out with near the end of Windows 3's lifespan. I understand that Win32s programming has, um, issues.
|
|
|
|
|
Gordon Brandly wrote: I understand that Win32s programming has, um, issues.
Yes, I remember this from doing technical support on mathematical software products such as Mathsoft's Mathcad about 12 years ago.
Kevin
|
|
|
|
|
No, VC 1.5 was the last VC that made 16-bit binaries. Your other option is to use VC 4.0 and make a Win32s app, then install Win32s on the Win 3.1 machine. (I forget when Win32s support was removed, it was either VC 4.1 or 4.2)
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I am trying to add an interface to my CFormView and CRecordView classes but not getting the results I would expect. Some code snippets...
// MainFrm.cpp
void CMainFrame::SelectView(UINT ViewID) {
...
TRACE("-1-\n");
((CViewControl*)pNewActiveView)->activate(); // <-- not working
//((CMasterView*)pNewActiveView)->activate(); // <-- this does work
TRACE("-2-\n");
}
// ViewControl.h
#pragma once
#include "StdAfx.h"
class CViewControl
{
public:
CViewControl();
~CViewControl();
virtual void activate();
};
// ViewControl.cpp
#include "StdAfx.h"
#include "viewcontrol.h"
CViewControl::CViewControl()
{
}
CViewControl::~CViewControl()
{
}
void CViewControl::activate()
{
TRACE("-----CViewControl::activate()\n");
}
// and here is one of the view clases that use it...
// MasterView.h
class CMasterView : public CRecordView, public CViewControl
{
...
public:
virtual void activate();
...
// MasterView.cpp
void CViewControl::activate()
{
TRACE("-----CMasterView::activate()\n");
}
..with the following output:
-1-
-2-
...expected:
-1-
-----CMasterView::activate()
-2-
A side note: If I make ~CViewControl() virtual, I get the following output:
...
-1-
Warning: calling DestroyWindow in CWnd::~CWnd; OnDestroy or PostNcDestroy in derived class will not be called.
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
Now I know there are different ways of doing the same thing, Create my on CMyRecordView and CMyFormView classes, but would like to know why the above code is not working like it should.
Any insight would be appreciated.
Chris
|
|
|
|
|
I am very new to mfc and i have a basic question, can anyone tell me how to get the local drives like C:, D:, E:,.....etc inside the tree control in mfc...
Thanks in Advance;)
With Regards
raja
Raja Bose
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
is there compiler options for compiling executable to use both processors in double core architecture under VC2003
9ine
|
|
|
|
|
nope, design your program to be multithreaded...
|
|
|
|
|
Are you wanting the compiler to use both processors to compile your program, or are you wanting your program, when running, to use both processors?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
|
While the previous posters are correct, there is a code generation option that you need to select to enable multi-threading and link with the correct run-time libraries.
|
|
|
|
|
Dear all,
I want to make a windows service in vc++ 6.0 so that i don't have to double-click the executable at every bootup. probably, it is feasible in VC.NET but i want to do the same in vc 6.0
To be clear, for eg. I want to make a timer that would start automatically when windows starts up; runs in background and alerts at every 5 seconds. I would want to be able to control its behaiour from windows services or msconfig.
please help me
prajwol
|
|
|
|
|
prajwolkumar wrote: I want to make a windows service in vc++ 6.0 so that i don't have to double-click the executable at every bootup.
You do not have to create a service to get this functionality. You can add a "regular" program to the following registry key:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Do events return values or are they always void in nature?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
An event is something that happens. You can have functions that respond to those events, however.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
If you mean "events" as a callback interface in COM, this is no different from other interfaces, i.e. all methods return a HRESULT.
If you mean "events" as an ActiveX source interface, the function can return any type that is compatible with automation and can be represented within a VARIANT.
If you mean "event" as a message, since windows is event-driven, all message handlers return a LRESULT.
Have I missed some interpretation of "event"?
Hope this helps
--
Roger
It's suppose to be hard, otherwise anybody could do it!
|
|
|
|
|
Roger Stoltz wrote: If you mean "events" as a callback interface in COM, this is no different from other interfaces, i.e. all methods return a HRESULT.
Exactly what I mean. Can you tell me what is the VARIANT equivalent of HRESULT and also the VARIANT equivalent of BSTR ?
Thanks...
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
Regarding HRESULT:
You won't need it since HRESULT is usually only needed as a return type for methods defined in interfaces that are not dispatch interfaces, i.e. doesn't inherit from IDispatch.
HRESULT cannot be represented within a VARIANT, there's no need.
Regarding VARIANT:
This is a union used to represent different data types such as short, BSTR and many more. Look it up in MSDN.
To be able to know which data type it represents, there is a member in the VARAINT struct called "vt" which is a bitfield.
Regarding BSTR in VARIANTs:
The easiest way to do this is to use the MFC implementation of the VARIANT structure/union, COleVariant. One its constructors takes an LPCTSTR as argument which will make the internal VARIANT hold a BSTR.
If you like to use the raw VARIANT type, you set the "vt" member equal to VT_BSTR and set the pbstr member equal to the return value of CString::AllocSysString().
Hope this helps
--
Roger
It's suppose to be hard, otherwise anybody could do it!
|
|
|
|
|
Hi,
I want know how to add contents to Help Document .
Can anyone please tell me how to add pictures and documentation notes to project Help File [F1] under different topics.
Regards,
Parichay B.P
|
|
|
|
|
hi,
i want to display a message when i doubleclick the RichEditBox control.there is a message called NM_DBLCLK but iam unable to use that.please help me.
sathish
|
|
|
|
|
|
Hi........
it show error login failure.
CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.
i didnt yet use crystal report.
i download the demo code and run.
where i fill this , how i know which table field r used for filling report?
i change only
crReportDocument.SetDatabaseLogon("sa", "sa", "user","analysis")
help me plz
with regards
sumi
reply soon
|
|
|
|
|
COleDateTime is an MFC class so you can not use it in an IDL file. Use a DATE* instead.
Steve
|
|
|
|
|
Hello
Recently I have been disturbed by the window message "WM_GETTEXT" and the function GetWindowText(). By sending message "WM_GETTEXT" I can get the content of the edit control in the other process while failed by using "GetWindowText".
I can not find any difference between sending "WM_GETTEXT" and using "GetWindowText()".
Can you tell me why
wanglei
|
|
|
|