|
Found that :
ImageList_SetDragCursorImage
BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST himlDrag,
int iDrag, int dxHotSpot, int dyHotSpot);
Description: The ImageList_SetDragCursorImage function sets the image of the dragged item.
Parameters:
himlDrag and iDrag: Handle of the image list and index of the image.
dxHotSpot and dyHotSpot: The coordinates of the image’s hot spot.
Return value: TRUE if successful; NULL otherwise.
Does it help ??
~RaGE();
|
|
|
|
|
thank u, it really helps.
actually i use it many times in CTreeView, but never use in CToolBarCtrl, i can fix it soon, i think it's right function.
and, i'd like to say, u r a good and interesting mate, hope meet people as u often in my life.
cheers
includeh10
|
|
|
|
|
includeh10 wrote:
and, i'd like to say, u r a good and interesting mate, hope meet people as u often in my life.
Oh ... .. well, then, welcome at CodeProject, i think there will always be people here ready to help you, that´s the point of the forum ...
~RaGE();
|
|
|
|
|
I have used the mciSendCommand function in order to verify
if a CD-Rom unit is able to record data.
Syntax I have used is the following:
MCI_GETDEVCAPS_PARMS l_DevCaps;
......
l_DevCaps.dwItem = MCI_GETDEVCAPS_CAN_RECORD;
mciSendCommand(l_OpenParams.wDeviceID,
MCI_GETDEVCAPS,
MCI_GETDEVCAPS_PARMS,
(DWORD)(LPMCI_GETDEVCAPS_PARMS)&l_DevCaps);
Does someone know how this code doesn't work ???
Antony B.
|
|
|
|
|
pl.see this link may be use for you
http://www.nottingham.ac.uk/cal/publications/mcia2m.html
|
|
|
|
|
Hi in my application I call GlobalMemoryStatus() to get the status of the virtual memory of my system. It returns the fact I have loads of virtual memory, Great!!. However when I call new() to try to allocate memory that is less then the virtual memory (allocating quite a large amount but still less then the virtual memory)it is returning NULL due to there not being enough memory available.
Does anyone have an explanation for why this is happening?
Thanks
The Blade Runner
|
|
|
|
|
Memory allocation will fail if you don't have the required amount of contiguous memory available. Try running my product MemWatcher (free download) and see if that helps. Sorry for the shameless plug, but I think it may help you.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
This program only shows whats in Physical memory not virtual memory aswell. I know to memory I am trying to allocate is greater the just the physical memory but the virtual memory according to this GlobalMemoryStatus function shows it is big enough too allocate the memory.
Thanks anyway.
The Blade Runner
|
|
|
|
|
MemWatcher can free up memory that Windows mistakenly continues to flag as "in use", thereby possibly allowing more memory to be used by your program. However, if you try to allocate "x" bytes and there aren't "x" contiguous bytes available, the allocation will fail.
Unfortunately, simply increasing your virtual memory won't guarantee that it's actually usable, since none of the data currently in physical memory may be swappable.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi,
I have developed an ActiveX control using ATL, when I insert it and work with it in Ms Word 2000 it works perfect, but when I print it, depending on the screen resolution, the Word text is printed inside the control or in the right place or shifted
I have tried the same in Word 2002 and it works fine. How can I fix this ? Is there any well know bug from ATL/Ms Word about this issue ?.
Thanks in advance
Braulio
|
|
|
|
|
For some reason I get a compiler error when I try to use chevrons in WTL. I define _WIN32_IE as 0x0500 (instead of 0x0400), but then I get the following error.
c:\...\wtl70\include\atlframe.h(274) : error C2146: syntax error : missing ';' before identifier 'lpnm'
I have IE version 6, I got VC 6 with service pack 4, and I got WTL 7.
What more do I need to get it working? As it looks like I'm missing a header file.
Any ideas? Thanks in advance
- Griffith
Everything you say will be misquoted, ripped out of context and used against you.
|
|
|
|
|
I just tried this today and got the same error. Unfortunately, I do not know why either. I think (but am not sure) that maybe WTL7 is for .Net and that is why it may not work. I believe that there is an ATL 2.0, ATL 3.0 and 7.0 and a WTL 3.0 and WTL 7.0. The only thing I can figure, since there seems to be a major jump in version numbers, is that 7.0 is for .Net.
Can someone clarify or verify this?
|
|
|
|
|
Hi,
I am in the process of converting all my MFC projects from VS6 to VS.Net and I'm getting a peculiar problem. My programs seemed to convert fine (with a few minor code changes). However, when I run my app it turns out I am having problems deserializing an object of a type of class defined in an extension DLL. I get the following TRACE output "Warning: Cannot load CMyClass from archive. Class not defined".
On the MSDN, it says that this will be a problem when using an extension DLL from a regular DLL. However, I am using the extension DLL from a regular MFC application - which the MSDN says should work fine.
MSDN link here (New window)
Does anyone have any idea why I am getting this error? I would be very grateful if anyone could shed some light on this issue.
Many thanks,
Mike.
|
|
|
|
|
I was going through some C++ code and found this syntax:
Complex **_W;
I do not understand the ** notation. Is it a pointer to a pointer? How am I supposed to initialize such an object and access its member functions?
Thanks. Looking forward to some replies
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Complex W;
Complex* pW = &W;
Complex** ppW = &pW;
Complex*pX = *ppW;
Complex X=**ppW;
double i=(*ppW)->i;
double j=(**ppW).j;
Easy really!
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
pankajdaga wrote:
Is it a pointer to a pointer?
Yes.
pankajdaga wrote:
How am I supposed to initialize such an object and access its member functions?
_W x;
*x = new Complex();
*x->ComplexMethod1();
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Hi,
I might not be the best at explaining this, but I'll try...
If you want to change a variable that is passed in to a function, you would pass it by pointer or by reference. In the same way, if you want to change a pointer that is passed in to a function, you could pass a pointer to a pointer.
Here is how you might do it:
// We hope that calling FindComplex will change the value of pFoo
Complex* pFoo = NULL;
// Pass a pointer to a pointer
FindComplex(&pFoo);
// Now pFoo may have changed
BOOL bChanged = (pFoo != NULL);
...
void FindComplex(Complex** pFoo)
{
Complex* pFound = NULL;
// Do some code here to find a Complex object and set pFound
*pFoo = pFound;
}
Hope this helps and I hope it's right!!
|
|
|
|
|
Hi,
How can I draw strings with GDI+ that are are vertical bottom to top aligned!
I try things as SetFormat(StringFormatFlagsDirectionVertical | StringFormatFlagsDirectionRightToLeft) but the text is always top to bottom oriented.
|
|
|
|
|
Yep, that's a serious limitation of GDI+ but it can be easily overpassed by rotating yourself the text:
Graphics* m_pGraphics;
What you have to do is :
1. translate text to origin,
2. rotate,
3. translate back to position,
Let's go:
We create a graphic container to apply transformations
graphicsContainer = m_pGraphics->BeginContainer();
Doing steps 1,2,3 the order of matrix multiplication is important !
m_pGraphics->TranslateTransform(pointF.X,pointF.Y);
m_pGraphics->RotateTransform(-angle);
m_pGraphics->TranslateTransform(-pointF.X,-pointF.Y);
Draw the string
m_pGraphics->DrawString(str, -1, &font, pointF, &sf,&solidBrush);
Fold back transformations by getting out of the container
m_pGraphics->EndContainer(graphicsContainer);
Jonathan de Halleux, Belgium.
|
|
|
|
|
Very thanks friend.
It´s really what I was thinking to do. Thanks for your help!
|
|
|
|
|
i am using winmain in my application and i want to restrict that only one instance of the application should run at one time. is there way to restrict it.
|
|
|
|
|
Look at this^ article.
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
Perhaps this article can help you ...
Clic here
A single instance is a "Singleton"
Hello World!!!
from Raphaël
|
|
|
|
|
Sorry, but a Singleton is to do with having a single instance of a particular class in an application (and is a very useful thing ), but the question was asking about only ever having a single instance of an application running at a time.
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
Of course... Sorry...
Hello World!!!
from Raphaël
|
|
|
|