Click here to Skip to main content
15,919,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CListCtrl::OnCustomdrawCListCtrl(NMHDR* pNMHDR, LRESULT* pResult) Pin
bosfan23-Nov-06 1:01
bosfan23-Nov-06 1:01 
QuestionDisabling some items in CCombobox Pin
Veeresh Hiremath22-Nov-06 22:18
Veeresh Hiremath22-Nov-06 22:18 
AnswerRe: Disabling some items in CCombobox Pin
Rajesh R Subramanian22-Nov-06 23:02
professionalRajesh R Subramanian22-Nov-06 23:02 
AnswerRe: Disabling some items in CCombobox Pin
ThatsAlok22-Nov-06 23:58
ThatsAlok22-Nov-06 23:58 
AnswerRe: Disabling some items in CCombobox Pin
Maximilien23-Nov-06 2:49
Maximilien23-Nov-06 2:49 
QuestionImplementing Text highlighting in Rich Edit Control Pin
SachinBhave22-Nov-06 22:04
SachinBhave22-Nov-06 22:04 
AnswerRe: Implementing Text highlighting in Rich Edit Control Pin
Suresh H22-Nov-06 22:11
Suresh H22-Nov-06 22:11 
QuestionAdding Functions to Interface Pin
Suresh H22-Nov-06 21:41
Suresh H22-Nov-06 21:41 
Hello All,

I have small and simple COM program to access a Add function in Dll and I am accessing this function from main program. For the simple add function it is working, interface and dll files are working properly.

For this interface I am trying to add one more function by name getdate() which of return Char* .. can any one please help how to declare the getdate() function in interface ???

Below are declaration and files with there names ….


// File interface.h
// This file contains interface related declarations.

#ifndef _A_INTERFACE_H_
#define _A_INTERFACE_H_

DECLARE_INTERFACE_(IMyA,IUnknown)
{
STDMETHOD_(LONG,MyAdd)(INT,INT) PURE;
};

--- ---

--- ---


file :- MyA.h

class CMyA : public CCmdTarget
{
DECLARE_DYNCREATE(CMyA)

CMyA();

-- -- -- - - -- -- -- - -

-- -- -- - - -- -- -- - -

-- -- - -

-- -- - --- -- -- - --- -- -- - -

protected:
virtual ~CMyA();
DECLARE_MESSAGE_MAP()

BEGIN_INTERFACE_PART(MyAObj,IMyA)
STDMETHOD_(LONG,MyAdd) (INT,INT);
END_INTERFACE_PART(MyAObj)

DECLARE_INTERFACE_MAP()
DECLARE_OLECREATE(CMyA)

};


// MyA.cpp : implementation file

-- -- -- --- -- --


//IMyA Functions
STDMETHODIMP_ (LONG)
CMyA::XMyAObj::MyAdd (INT x,INT y)
{
return (x+y);
}


-------------------------------

// function to be added to Interface can u please help me how to declare this function in interface.

char* getDate()
{
struct tm *newtime;
char am_pm[] = "AM";
-- - - -
--- - -- - - -

}



Thanking you,
Suresh H

AnswerRe: Adding Functions to Interface Pin
Roger Stoltz23-Nov-06 0:10
Roger Stoltz23-Nov-06 0:10 
QuestionRe: Adding Functions to Interface Pin
Suresh H23-Nov-06 0:29
Suresh H23-Nov-06 0:29 
AnswerRe: Adding Functions to Interface Pin
Roger Stoltz23-Nov-06 0:38
Roger Stoltz23-Nov-06 0:38 
GeneralRe: Adding Functions to Interface Pin
Suresh H23-Nov-06 0:48
Suresh H23-Nov-06 0:48 
GeneralRe: Adding Functions to Interface Pin
Roger Stoltz23-Nov-06 1:02
Roger Stoltz23-Nov-06 1:02 
GeneralRe: Adding Functions to Interface Pin
Suresh H23-Nov-06 1:16
Suresh H23-Nov-06 1:16 
QuestionMulticore with VS6? Pin
bosfan22-Nov-06 21:16
bosfan22-Nov-06 21:16 
AnswerRe: Multicore with VS6? Pin
Waldermort22-Nov-06 22:04
Waldermort22-Nov-06 22:04 
GeneralRe: Multicore with VS6? Pin
bosfan22-Nov-06 23:55
bosfan22-Nov-06 23:55 
GeneralRe: Multicore with VS6? Pin
Michael Dunn23-Nov-06 0:25
sitebuilderMichael Dunn23-Nov-06 0:25 
GeneralRe: Multicore with VS6? Pin
bosfan23-Nov-06 0:56
bosfan23-Nov-06 0:56 
GeneralRe: Multicore with VS6? Pin
markkuk24-Nov-06 0:51
markkuk24-Nov-06 0:51 
Questionto validate editbox control Pin
zareee22-Nov-06 21:06
zareee22-Nov-06 21:06 
AnswerRe: to validate editbox control Pin
ThatsAlok22-Nov-06 21:22
ThatsAlok22-Nov-06 21:22 
GeneralRe: to validate editbox control Pin
zareee22-Nov-06 22:20
zareee22-Nov-06 22:20 
GeneralRe: to validate editbox control Pin
ThatsAlok22-Nov-06 22:31
ThatsAlok22-Nov-06 22:31 
QuestionFunction name clashing with MACRO Pin
Waldermort22-Nov-06 20:47
Waldermort22-Nov-06 20:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.