|
What version of Visual C++ are you using?
I thought MAPI required MAPI32.lib?
Isn't MAPI.lib a 16bit lib?
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
MAPI>lib is a 16 bit lib only
wat iam using is VC++ 6.0 version!
donno what the problem is!
does MAPI require MAPI32.libb??
ranjani
|
|
|
|
|
In my MAPI programs I link with MAPI32.lib not MAPI.lib
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
Hi
Anyone knows how i can change the color of the border of a group box?
Greetings
Jens
|
|
|
|
|
One solution is to derive a class from the group box control. Do custom drawing.
Kuphryn
|
|
|
|
|
i thought something like that
but i'm not that good at drawing things
any tutorials of it?
greetings
Jens
|
|
|
|
|
Look in CodeProject code section.
Kuphryn
|
|
|
|
|
It does not seem to be possible with CPen... anyone knows of an alternative? Could not find an article here with an alternative to CPen...
Any ideas?
Thanks
|
|
|
|
|
Will
int nWidth = 3;<br />
ExtCreatePen(..., PS_DOT, ..., nWidth, ...);
work?
|
|
|
|
|
It did the trick!
Thanks a lot! I had not RTFM for long and never realised that CPen had another constructor.
|
|
|
|
|
I learnt from a book how to create a database by creating a new wizard app SDI with ODBC support, but is there a way which i can incorporate a database into an already made SDI(without ODBC support)? coz i only realise i need a data base for my GUI after I did the SDI..thanx
|
|
|
|
|
first
#include "afxdb.h"
in your stdafx.h file
then simply add the CRecordSet Classes into your code with the ClassWizard
|
|
|
|
|
erm...I tried to add the CRecordSet classes but which base class should it b based on? Mi not veri familiar to c++ but need to do a project.
|
|
|
|
|
Hi all,
I want to write a serial and parallel device driver for Windows 2000. Does anyone of any good books on the market.
Thanks
Louis
|
|
|
|
|
I'll let you be the judge as to its goodness or relevance, but here is one:
http://www.flounder.com/books.htm#Developing%20Windows%20NT%204.0%20Device%20Drivers
|
|
|
|
|
I have an Icon resource containing a 16x16 icon and a 32x32 icon.
When I use :
<br />
DrawIconEx(dc, 0, 0, icon, 16, 16, 0, 0, DI_NORMAL);<br />
I always get the 32x32 version of the icon scaled into a size of 16x16, instead of getting the 16x16 version.
When I supply the same Icon to a CTreeCtrl's CImageList, it manages to display the correct icon (16x16) on the tree.
How can I force DrawIconEx or any other method to pull out the small version of the icon ?
Thanks
|
|
|
|
|
DrawIconEx() simply renders the icon associated with the icon handle. How this handle was obtained is the real issue here. Did you use LoadIcon() , LoadImage() , or CreateIcon() ?
|
|
|
|
|
Thanks for the explanation
I was using a simple LoadIcon . I now switched to LoadImage with the 'desired size'.
Thanks again
|
|
|
|
|
hi
How to create a win32 static library and export a function?
with VC6 + sp4
thanks.
|
|
|
|
|
VC6 has a project type called 'Win32 Static Library'.
There is no need to export functions from a static library. Just provide a header file with a declaration.
Brad
|
|
|
|
|
I need to use a pointer to function in a generic class.
This is a peace of the code I've written:
// pointer to function declaration
void (*m_pNotifyDataAvailablity)();
// pointer to function assignment
void CMyClass::SetCallback(void(*p_pNotifyDataAvailablityCallback)(void))<br />
{<br />
m_pNotifyDataAvailablity = p_pNotifyDataAvailablityCallback;<br />
}
My problem is the following:
If I call the SetCallback method supplying a global function no problem occurs. When I try to supply a function member of CMyClass class the application doesn't compile and the following message is shown by the compiler:
error C2664: 'SetCallback' : cannot convert parameter 1 from 'void (void)' to 'void (__cdecl *)(void)'
None of the functions with this name in scope match the target type.
Can someone help me ??
Thanks a lot !!!
|
|
|
|
|
The reason this occurs is because the type of your function (the one which is a part of a class) isn't void(*func)(void).
Whenever you want to call a classe's function you need to call it in the context of an object of that class (i.e. supply a 'this' pointer), but when you'll try to call the function you received with SetCallback you won't have any 'this' (should the code would compile, which it doesn't
here's some code to help put you in the right direction:
(btw, this is also usable when you want a classe's function to run in it's own thread
<br />
class MyClass<br />
{<br />
public:<br />
void MyFunc(void);<br />
};<br />
<br />
<br />
void __cdecl worker(void *pVar)<br />
{<br />
((MyClass*)pVar)->MyFunc();<br />
}<br />
<br />
MyClass::MyClass()<br />
{<br />
worker(this);<br />
}<br />
<br />
<br />
What you need to do is seperate handling of global functions and class-contained functions.
I'm trying to understnad from your example what you were trying to do, perhaps you can define an abstract class 'IMyFunc', put a function 'MyFunc' there, then have all the classes you want to have this possible behaviour implement this class/interface and then you can call an external function, suplpy 'this' and have it call the function, or save the 'this' instead of the function pointer...
hmm, this came out abit confusing, perhaps you can elaborate mroe on waht you're trying to do
|
|
|
|
|
You need to change the callback function within the class to be static . You did not show all of the relevant code, so I can only guess as to what you might have.
void (*m_pNotifyDataAvailablity)();
class CMyClass
{
public:
CMyClass(){};
~CMyClass(){};
void SetCallback(void(*p_pNotifyDataAvailablityCallback)(void));
static void SomeCallback( void );
};
void CMyClass::SetCallback(void(*p_pNotifyDataAvailablityCallback)(void))
{
m_pNotifyDataAvailablity = p_pNotifyDataAvailablityCallback;
}
void CMyClass::SomeCallback( void )
{
AfxMessageBox("Howdy!");
}
...
CMyClass mc;
mc.SetCallback(CMyClass::SomeCallback); Otherwise, the compiler has no way of knowing that SomeCallback() is a member of CMyClass since it has no scope resolution operator.
|
|
|
|
|
If you call the SetCallback method supplying a function member of CMyClass class, you must declaring the function pointer as follows:
void (CMyClass::*m_pNotifyDataAvailablity)();
|
|
|
|
|
Hello all
I'm writing a console application in which I have to generate timer event at intervals 1 min,2 min,3 min,4 min and 5 minutes respectively. it's working fine upto 3 minutes interval but whenever I set 4 minutes or 5 minutes interval the timer event is generated immediately. Following is the code I'm using ...
LARGE_INTEGER liDueTime;
liDueTime.QuadPart=-600000000 * 3;// Generatiing timer event at 3 min interval
// Negative values indicate relative time
HANDLE hTimer=CreateWaitableTimer(NULL,TRUE,"WaitTimer");
SetWaitableTimer(hTimer, &liDueTime, 0, NULL, NULL, 0);
If I'm using -600000000 * 4 or 5 then the event is generated immediately. Can anyone help me in this?
Many thanks for your help.
Hari.
|
|
|
|