|
Hi can anyone solve the following problems:
1.I have created a dll in vb and want to integrate that in vc++, so how can i go about 'referencing' that we do in vb in the vc++ project .(to add the class created).
2.From the main window iam loading a new dialog.in the child dialog iam selecting an image and subsequently drawing that in the main window by getting the pointer to the main window.the problem is the picture gets erased on subsequent window handling like resizing , being overlapped etc.So how can i pass the image id (its being loaded from the resource) and paint them in the WM_PAINT message handler.
Please help me in this regard.
Thanking you.
Satadru
|
|
|
|
|
Hi
Have you built a .h (header file) with all the function,defs,and call in it?
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
are u drawing the image in the OnDraw() or OnPaint() handler?
"there is no spoon" biz stuff about me
|
|
|
|
|
hi , yah iam drawing in OnPaint()
|
|
|
|
|
Hi all,
I have developed a pure MFC Application in VC++ having DLLs. Now I want to port that application on Unix/Linux. Is there any tool available which would make porting easier on linux.
Regards,
T Shah
|
|
|
|
|
goto http://www.mainsoft.com
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
Thanks a lot.
I also found out something called as wxWindows.(www.wxWindows.org)
|
|
|
|
|
iID = atoi(sID)
When I call delete(iID) to
BOOL CPop3Connection::Delete(int nMsg)
{
//Must be connected to perform a delete
ASSERT(m_bConnected);
//if we haven't executed the LIST command then do it now
if (!m_bListRetrieved)
List();
//Send the DELE command along with the message ID
char sBuf[20];
sprintf(sBuf, "DELE %d\r\n", nMsg);
int nCmdLength = strlen(sBuf);
if (!m_Pop.Send(sBuf, nCmdLength))
{
TRACE(_T("Failed to send the DELE command to the POP3 server\n"));
return FALSE;
}
I get the error 10043 Protocol Not Supported.
Seems that I must send a flush to the server to delete the message.
Anyone know how?
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
Hello
Is there a proven way to read all correctly formed email headers?
I understand that the first thing one must do is see the MIME-Version.
Then next extract the Return-Path:
Next the for path:
Next date time Sent/Received.
I do not want to display the email itself, only the header info in listbox link form.
If someone clicks on the displayed info in the listbox open the default email client.
Example Header:
Return-Path: <ez_way@cooper.net>
Received: from [201.225.22.225] (HELO mxsf25.cluster1.cooper.net)
by remt28.cluster1.cooper.net (CommuniGate Pro SMTP 4.0.6)
with SMTP id 35026469 for uploads@cooper.net; Fri, 28 Nov 2003 23:51:40 -0500
Received: from ZA2003 (ts46-01-qdr1528.crsntcty.ca.copper.com [66.118.121.88])
by mxsf25.cluster1.cooper.net (8.12.10/8.12.8) with SMTP id hAT4pRcA060840
for <uploads@cooper.net>; Fri, 28 Nov 2003 23:51:28 -0500 (EST)
(envelope-from ez_way@cooper.net)
Message-ID: <001e01c3b634$722dve60$087e7444@ZV2003>
Reply-To: "EZWAY" <ez_way@cooper.net>
From: "EZWAY" <ez_way@cooper.net>
To: <uploads@cooper.net>
Subject: Fw: test
Date: Fri, 28 Nov 2003 20:51:24 -0800
MIME-Version: 1.0
Content-Type: multipart/signed;
micalg=SHZ1;
Best Wishes and Happy Holiday's,
ez_way
|
|
|
|
|
hi
aswin here,
i need to know how to open a remote computer service ontrol manager.
the remote computer name is james24 and the ip address is
140.140.140.24. i should be able to use ip address or the computer
name.
i give like this
SC_HANDLE hSCM =
OpenSCManager("\\James24",SERVICES_ACTIVE_DATABASE,SC_MANAGER_ALL_ACCES
S);
i get the hscm as null;
your code will be helpful to me.
regards
Aswin
|
|
|
|
|
Hi everybody,
Does anybody know, what the equivalent to VB CreateObject function is in VC++?
I want to create an object on a remote server with VC++ statements.
Regards,
Roozbeh
|
|
|
|
|
|
I've imported an ActiveX component in VC++ program as
#import "INPClnt.ocx"
compiler has generated INPClnt.tlh file as below
----------------------------------------------------------
// Created by Microsoft (R) C/C++ Compiler Version 12.00.8168.0 (73b0260c).
//
// c:\samples\sampleb\debug\INPClnt.tlh
//
// C++ source equivalent of Win32 type library INPClnt.ocx
// compiler-generated file created 11/28/03 at 18:17:12 - DO NOT EDIT!
#pragma once
#pragma pack(push, 8)
#include <comdef.h>
namespace INPCLNTLib {
//
// Forward references and typedefs
//
struct __declspec(uuid("b2878606-c652-11d4-8481-00c04f369af0"))
/* dispinterface */ _DINPClnt;
struct __declspec(uuid("b2878607-c652-11d4-8481-00c04f369af0"))
/* dispinterface */ _DINPClntEvents;
struct /* coclass */ INPClnt;
//
// Smart pointer typedef declarations
//
_COM_SMARTPTR_TYPEDEF(_DINPClnt, __uuidof(IDispatch));
_COM_SMARTPTR_TYPEDEF(_DINPClntEvents, __uuidof(IDispatch));
//
// Type library items
//
struct __declspec(uuid("b2878606-c652-11d4-8481-00c04f369af0"))
_DINPClnt : IDispatch
{
//
// Wrapper methods for error-handling
//
// Methods:
VARIANT_BOOL Startup ( );
VARIANT_BOOL Shutdown ( );
VARIANT_BOOL ProcessBatch (
_bstr_t BatchFilename );
VARIANT_BOOL ProcessImage (
_bstr_t ImageFilename );
_bstr_t GetProperty (
_bstr_t Keyword );
VARIANT_BOOL SetProperty (
_bstr_t Keyword,
_bstr_t Value );
};
struct __declspec(uuid("b2878607-c652-11d4-8481-00c04f369af0"))
_DINPClntEvents : IDispatch
{};
struct __declspec(uuid("b2878608-c652-11d4-8481-00c04f369af0"))
INPClnt;
// [ default ] dispinterface _DINPClnt
// [ default, source ] dispinterface _DINPClntEvents
//
// Wrapper method implementations
//
#include "c:\samples\sampleb\debug\INPClnt.tli"
} // namespace INPCLNTLib
#pragma pack(pop)
----------------------------------------------------------------
and also generated INPClnt.tli
----------------------------------------------------------------
// Created by Microsoft (R) C/C++ Compiler Version 12.00.8168.0 (73b0260c).
//
// c:\samples\sampleb\debug\INPClnt.tli
//
// Wrapper implementations for Win32 type library INPClnt.ocx
// compiler-generated file created 11/28/03 at 18:17:12 - DO NOT EDIT!
#pragma once
//
// dispinterface _DINPClnt wrapper method implementations
//
inline VARIANT_BOOL _DINPClnt::Startup ( ) {
VARIANT_BOOL _result;
_com_dispatch_method(this, 0x7d1, DISPATCH_METHOD, VT_BOOL, (void*)&_result, NULL);
return _result;
}
inline VARIANT_BOOL _DINPClnt::Shutdown ( ) {
VARIANT_BOOL _result;
_com_dispatch_method(this, 0x7d2, DISPATCH_METHOD, VT_BOOL, (void*)&_result, NULL);
return _result;
}
inline VARIANT_BOOL _DINPClnt::ProcessBatch ( _bstr_t BatchFilename ) {
VARIANT_BOOL _result;
_com_dispatch_method(this, 0x7d3, DISPATCH_METHOD, VT_BOOL, (void*)&_result,
L"\x0008", (BSTR)BatchFilename);
return _result;
}
inline VARIANT_BOOL _DINPClnt::ProcessImage ( _bstr_t ImageFilename ) {
VARIANT_BOOL _result;
_com_dispatch_method(this, 0x7d4, DISPATCH_METHOD, VT_BOOL, (void*)&_result,
L"\x0008", (BSTR)ImageFilename);
return _result;
}
inline _bstr_t _DINPClnt::GetProperty ( _bstr_t Keyword ) {
BSTR _result;
_com_dispatch_method(this, 0x7d5, DISPATCH_METHOD, VT_BSTR, (void*)&_result,
L"\x0008", (BSTR)Keyword);
return _bstr_t(_result, false);
}
inline VARIANT_BOOL _DINPClnt::SetProperty ( _bstr_t Keyword, _bstr_t Value ) {
VARIANT_BOOL _result;
_com_dispatch_method(this, 0x7d6, DISPATCH_METHOD, VT_BOOL, (void*)&_result,
L"\x0008\x0008", (BSTR)Keyword, (BSTR)Value);
return _result;
}
---------------------------------------------------------------
now Question is in my main() program how do I call methods.
Could anyone please help me out?
|
|
|
|
|
My c++ program (compiled in release mode) run correctly in some machine. For some machine it crash and runtime error appear. I don't know what's cause the runtime error and how to solve it.
|
|
|
|
|
A message box appear with the following message ...
//////////////////////////////////////////////////////
Microsoft Visual C++ Runtime Library
Runtime Error!
Program: C:\..\?????.exe <- my program path
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
//////////////////////////////////////////////////////
|
|
|
|
|
Reinstall the software and then try to run. Even after u has the same prblem then just check the any of the controls r added to ur app.
And do the process in the sys where ur trying to run.
I hope this two main problem may cause this type of errors.
Shanmuga Sundar.V
|
|
|
|
|
I wanted to import one active X control(.ocx) and start calling methods.
in Visual C++.
I understand we can do it by using #import "myocx.ocx" . Could anyone
please give me complete example to do it?
|
|
|
|
|
aaahhhh COM run for the hills. Truthfully this is my usually reaction. But FEAR NOT!!! Your dealing with an OCX file. Simply register the file on your system using regsvr32.exe. Then in the fabulous VC6 menu system 'Project', 'Add to Project', 'Components and Controls' then choose the Registered ActiveX Controls folder and select your component. This will automatically generate all the wrapper classes for you (up yours VB boys ) Then you can drag and drop on your new active control and get events, manipulate it whatever. #import is really used for interacting with ATL COM objects that are not ActiveX based.
|
|
|
|
|
Hi , just an question from a novice like me :
how to use #import in c programme ?
not c++ is there an directive like it for c ?
it's for use ADO in a c program
thank you
Adan
that which hesitates is lost.
|
|
|
|
|
Hi All:
I have this function in VC DLL that I would like to call with VB but I am not sure how to declare it.
VC Function:
Syntax:
void _stdcall PlayRequest(
DWORD ClientHandle, //Input parameters
long OutputChannel, //Input parameters
DWORD PlayerHandle, //Input parameters
PlayerInitData SegmentInfo, //Structure; //Input parameters
OSDInitStruct DisplayInfo, //Structure; //Input parameters
PlaySpeedType PlaySpeed, //Input parameters
LONGLONG *pActualStart, //Output
LONGLONG *pActualEnd, //Output
VideoType *pTypeOfVideo, //Output
bool MOL, //Input
void *CMDReserved[20], //An array of pointers reserved for future
use. Should be NULL. // Input
void *RSTReserved[10], //An array of pointers reserved for future
use. Should be NULL.// Output
AOUResult *pResult //Output
);
PlayerInitData
A structure used to initialize the player.
Syntax:
typedef struct{
TCHAR LoggerIPAddress[40];
long TokenNumber;
long ChannelID;
LoggerTime StartTime;
LoggerTime EndTime;
long ChannelType;
}PlayerInitData;
LoggerTime
A structure used for Recorder time
Syntax:
typedef struct
{
long lDate;
long lTime;
}LoggerTime;
OSDInitStruct
A structure used to set the information displayed in the On-screen Display.
Syntax:
typedef struct {
COLORREF m_colorText; //Long
LOGFONT m_fontText; //Structure
TCHAR m_szStaticText[40];
DWORD m_dwOSDBitmap;
} OSDInitStruct;
/* Logical Font */
#define LF_FACESIZE 32
typedef struct tagLOGFONTA
{
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
CHAR lfFaceName[LF_FACESIZE];
} LOGFONTA, *PLOGFONTA, NEAR *NPLOGFONTA, FAR *LPLOGFONTA;
typedef struct tagLOGFONTW
{
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
WCHAR lfFaceName[LF_FACESIZE];
} LOGFONTW, *PLOGFONTW, NEAR *NPLOGFONTW, FAR *LPLOGFONTW;
#ifdef UNICODE
typedef LOGFONTW LOGFONT;
typedef PLOGFONTW PLOGFONT;
typedef NPLOGFONTW NPLOGFONT;
typedef LPLOGFONTW LPLOGFONT;
#else
typedef LOGFONTA LOGFONT;
typedef PLOGFONTA PLOGFONT;
typedef NPLOGFONTA NPLOGFONT;
typedef LPLOGFONTA LPLOGFONT;
#endif // UNICODE
Thanks
|
|
|
|
|
I thought I'd answered this on the VB forum already, but obviously not.
The arguments to that API are particularly nasty, so I recommend writing some wrapper functions (or a COM object) in C++ to make the interface more VB friendly.
|
|
|
|
|
Thanks for the reply Mike.
But I managed to get most of the functions worked except this particular one. I keep getting an error "Memory location at 0x???????? could not be written".
This is how I declare in VB:
Public Declare Sub PlayRequest Lib "AOSClient.dll" _
(ByVal clientHdl As Long, ByVal OutputCha As Long, ByVal pHandle As Long, _
PlayerInitData As Any, OSDInitStruct As Any, _
ByVal PlaySpeed As Long, ActualStart As Any, ActualEnd As Any, _
pTypeOfVideo As Long, ByVal MOL As Long, CMDrs() As Any, _
RSTrs() As Any, pResult As Long)
This is how I call the function.
Call PlayRequest(clientHdl, AOSChannel, playerHandle, PlayerInitByte(1), _
OSDStructByte(1), PlaySpeedType, TempBuf(1), TempBuf(9), _
pTypeOfVideo, MOL, CMDReserved(), RSTReserved(), PlayRequestRst)
I believed the error message that I am getting have something to do with passing an UDT to VC Dll.
Appreciate if you could shed some lights. Thanks
|
|
|
|
|
Hello,
Kindly help me as soon as possible.
Problem:
When i run the "Dialog Based" Application in VC++, then the focus is set currently to the BUtton or any other control.
I want, that the focus should always be set on the "Dialog" even if we press "Button" .
e.g. 1) Run the Application.
2) When i click the button, and after clicking it, the focus should be return to the Dialog.
Hoping for a positive response
EsHbAn BaHaDuR
|
|
|
|
|
read carefully the generated code comments...
|
|
|
|
|
zzzZZZzzz....
didnt u get an answer to this a little while ago?
put an invisible button on the dialog that does nothing and set focus to it after every click or whatnot
"there is no spoon" biz stuff about me
|
|
|
|
|