|
Hi All
does any1 know how you get the little arrows, showing the direction
of the sort when you click on a cloumn with a list control
you get an up arrow and a down arrow
the ones you see in, say windows explorer
using OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult)
can ne1 point me in the right direction
thanks
si
|
|
|
|
|
If you're targetting WinXP only, the HDF_SORTUP /HDF_SORTDOWN styles for items in the header control enable the sort arrows. They won't appear on any OS less than WinXP though.
You would set this in OnColumnClick() as you said.
For OSs before WinXP, you'll have to subclass the header control and handle the WM_PAINT message to do it yourself, or use custom draw.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
How can I show an animation for instance a film in desktop instead wallpaper?
For example see:
Winamp 2.9x[^]-> Advanced Visualization Studio v2.6 --> Setting Display --> Ovelay Mode --> Set Desktop to Color!!
|
|
|
|
|
I think this hard work, what dont have simple decision.You can try to do this step:
1.Store desctop image in memory
2.Set transparency bit mask of this image as background color of this image.
3.Overlay this image on picture what represented frame of you animation. Finaly you get frame of you animation with folders images on one.
4.Check all mouse action on desctop image ,what allocated in memory ,for determine whether mouse click by folder.If its occur break you application, enable new folder open in oredr to anew store desctop image in memory and begin all routines anew.
Also you should catch tab key and start button for properly reaction on this action.
This very raw instance of work and not fact what its simplest way for you.
Sorry for bad eanglish
|
|
|
|
|
Hi,
I have a custom control in wich I want to display some vertical text. I want also, before drawing it, know the size this text will take.
For horizotal text, it's simple I can use CDC::GetTextExtent(const CString& str) and CDC::ExtTextOut(...) methods.
Any idea?
Thanks!
|
|
|
|
|
Ok, I found something .
This will look like:
CFont NewFont;
CFont* pOldFont;
NewFont.CreatePointFont(nFontSize,lpFontName,pDC);
if (!bIsHorizontal)
{
LOGFONT* pLogFont;
NewFont.GetLogFont(pLogFont);
pLogFont->lfOrientation = 900;
CFont VertFont;
VertFont.CreateFontIndirect(pLogFont);
pOldFont = pDC->SelectObject(&VertFont);
}
else
pOldFont = pDC->SelectObject(&NewFont);
(Not sure about the orientation value but I will check it).
Sorry to have disturbed you
|
|
|
|
|
You can use GetTextExtent() for vertical text as well - just swap the height and width around
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Not sure 'bout that. I don't think that the width and the heigth are equal for each characters (for example, 'i' is not a perfect square).
In fact I develop for PocketPC so, if I can earn a pixel, I will do it !
Nowaday thanks
|
|
|
|
|
cedric moonen wrote:
I don't think that the width and the heigth are equal for each characters (for example, 'i' is not a perfect square).
That's right, but it doesn't matter. If you get the size of the entire string (say 100 pixels wide and 20 pixels high), and rotate it 90 degrees, the text will now be 20 pixels wide and 100 pixels high.
Or do you mean that you rotate the string, but not the characters? eg.
A
B
C
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Mmmh, that's rigth ! First I wanted just rotate the string and not the characters but I think it will be ugly.
So now I can just invert the width and the height of the rectangle !
Thanks
|
|
|
|
|
You're welcome
BTW, to rotate the text and the characters the same amount, set the lfOrientation and lfEscapement members of the LOGFONT structure to be the same . In fact, this is the only thing that works under Win9x/ME, which don't support letters rotated differently to the entire string (if that makes sense... )
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I am intrested to know ,what are the issues will arise if i write a OCX /DLL in VB and use it in vc++ .If there is any article on that ,please do mention
|
|
|
|
|
No problems. Just make sure you get the parameter types correct in VC++.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I am intreste dto knwo ,what are teh issues will arise if i write a OCX /DLL in VB and use it in vc++ .If there is any articleon that ,please do mention
|
|
|
|
|
Hello friends,
I am working with wizard sheet.
on one of the page i have a progressbar.
the progressbar works fine on all O.S.
but if i run this application on winXP
the progressbar move (progresses) till
half. The application is working fine i mean the
work which it should be doing but the progressbar
doesnt move ahead.
can anybody helpme out of this problem...
Thanx in advance
TAKE CARE
|
|
|
|
|
siid wrote:
The application is working fine i mean the
work which it should be doing but the progressbar
doesnt move ahead.
Are you saying that the work continues as normal, but that the progress bar just stops?
|
|
|
|
|
Hi !
In my app, I'm using a class that I didn't develop (and I have no access to the source code), which implements a linked list where pointers are stored with the type long.
From this list, when I'm extracting a pointer at a specific index, I used to cast it into the needed type, for instance :
Entity* pEntity=(Entity*)MyList->GetPointerAt(3);
But now, I would like to get rid of these old C casts and use the C++ cast. Here is what I did :
Entity* pEntity=static_cast<entity*>(MyList->GetPointerAt(3));
But now, the compiler is rejecting this line, telling that the cast from 'long' to 'Entity*' is not possible.
Anyone could tell me how I should implement this cast with only C++ casts ?
Thank you for your help !
Jerome
|
|
|
|
|
|
You need to use
Entity* pEntity = reinterpret_cast < Entitiy* > (MyList->GetPointerAt(3)); because you are casting an number (your long -variable)into something completely different: A pointer to an Entity -Object.
Static_cast can cast between differnt types of numbers, but you need to get something stronger to cast a number into a pointer. And that is reinterpret_cast .
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Can somebody explain to me what a callback function is ? is it just a recursive function or have I missed the point?
Andy
|
|
|
|
|
A callback function is one whose pointer you give to an object or function, and it gets called by the other object or function when a certain condition arises.
For example, the SetTimer() Win32 API function can take a pointer to a function that gets called when the timer period elapses. The function that you pass to SetTimer and gets called is the callback function.
A slightly different example is used with the EnumFontFamilies() function. You pass a pointer to a callback function, and the callback function gets called once for every font that matches the criteria specified in the call to EnumFontFamiles() . In this case, the callback function is called as many times as needed before the EnumFontFamilies() function returns, as opposed to SetTimer() above, where the callback function is called sometime in the future.
Hope this explains it more
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Yes that covers it thanks.
|
|
|
|
|
You're welcome
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hello,
I have an application and want to add a simple HTML editor to it.
All I need is to allow the user to use bold, underline and italics to standard text - no scripts, activeX etc.
IHTMLView is a bit bulky for my needs and developing from scratch is not an option right now.
Does anyone know of an implementation that I could use, either free or for purchase (preferably free of course).
thanks,
Jeremy Pullicino
C++ Developer
Homepage
|
|
|
|
|
Forgot to mention: VC++ 6.0
Jeremy Pullicino
C++ Developer
Homepage
|
|
|
|