|
I'm trying to use AnimateWindow() in my dialog's InitDialog() handler as I've seen in a few other places, but I keep getting compiler errors if I try to call the global api (::AnimateWindow(hWnd,200,AW_SLIDE), or without the scope resolution operator, or even as a member of my CDialog-derived class. I also tried an example I found on the MSDN where I use FARPROC and load the function from user32.dll and it tells me that I'm supplying too many parameters for a pointer to function (even though I just cut and paste the code right out of the MSDN). Any help would be greatly appreciated.
[insert witty comment here]
bdiamond
|
|
|
|
|
bdiamond wrote:
...but I keep getting compiler errors...
And those errors would be?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
When I try to use it globally, I get these:
g:\My Projects\CPlusPlus\VC.NET\Bug Reporter\Bug Reporter\ChatDlg.cpp(60): error C2039: 'AnimateWindow' : is not a member of 'operator``global namespace'''
g:\My Projects\CPlusPlus\VC.NET\Bug Reporter\Bug Reporter\ChatDlg.cpp(60): error C2065: 'AW_SLIDE' : undeclared identifier
g:\My Projects\CPlusPlus\VC.NET\Bug Reporter\Bug Reporter\ChatDlg.cpp(60): error C3861: 'AnimateWindow': identifier not found, even with argument-dependent lookup
And when I try to use it as a member function of CDialog-derived class, I get these:
g:\My Projects\CPlusPlus\VC.NET\Bug Reporter\Bug Reporter\ChatDlg.cpp(60): error C2039: 'AnimateWindow' : is not a member of 'CChatDlg'
g:\My Projects\CPlusPlus\VC.NET\Bug Reporter\Bug Reporter\ChatDlg.cpp(60): error C2065: 'AW_SLIDE' : undeclared identifier
[insert witty comment here]
bdiamond
|
|
|
|
|
I found another example here on CP in which the author says that you need to do this:
#undef WINVER
#define WINVER 1000000
I did that and now it works!! thanks
[insert witty comment here]
bdiamond
|
|
|
|
|
I've never heard of that version of Windows!
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Me either, but I guess it's just to say that you have access to everything, since I think I've seen in some places it'll check WINVER in certain places (#if WINVER > 0x400 )
[insert witty comment here]
bdiamond
|
|
|
|
|
So you don't get slammed later on, I would go into the header file that contains the prototype for AnimateWindow() and see what value of WINVER it is looking for. Most likely it's 0x0500.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
good idea
[insert witty comment here]
bdiamond
|
|
|
|
|
|
thanks!!!
[insert witty comment here]
bdiamond
|
|
|
|
|
Hi everyone
Is there a way to get the x and y coordinates of a CMenu item? For example, let's say 3 first items from my menu are :
File Edit View
how can I retrieve the x coordinate of the item "View"?
thanks
|
|
|
|
|
See GetMenuItemRect()
How do I print my voice mail?
|
|
|
|
|
Hockey,
??GetMenuItemRect()??
I can't find any function that goes by that name! I got GetMenuItemCount, GetMenuItemID, and GetMenuItemInfo, but no GetMenuItemRect
Where can I find it?
thanks
|
|
|
|
|
|
Sorry to both of you,
I just realize I forgot to mention that I'm working with Windows CE (Microsoft embedded Visual C++). That function is not available on Windows CE .. So is there another way to do it?
thanks
|
|
|
|
|
|
I have recently found out (today) how to put an icon on a button. But the icon is 16 x 16 and it's bigger on my button that it usually is when viewed anywhere else, like in Windows Explorer, so it looks like crap. Is there a way, without bit-blitting that I can make the icon size to fit the button if I make the button smaller?
[insert witty comment here]
bdiamond
|
|
|
|
|
Find a class here on CP that does what you want
or
DrawIconEx()
How do I print my voice mail?
|
|
|
|
|
That isn't enough info to go on, can you post how you load the icon (LoadIcon, LoadImage, or something else?), how are you getting the icon on the button (using a class from CP, somewhere else, or is it your own code?).
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
this is the code I'm using:
m_cmdAddLink.SetIcon(theApp.LoadIcon(IDI_ADDFILE));
where m_cmdAddLink is the CButton variable for the command button
[insert witty comment here]
bdiamond
|
|
|
|
|
|
That worked perfectly. Thanks!!!
[insert witty comment here]
bdiamond
|
|
|
|
|
Hi,
I have a bug related to mouse messages in my mfc app. I have lbuttondown and rbuttondown handlers for my cscrollview, and the scroll wheel on a mouse seems to be automatically hooked up to the scroll position of the view, so everything works fine when using a regular mouse.
When using a notebook touchpad the lbuttondown and rbuttondown handlers work as expected, but I get a problem when both BOTH left and mouse buttons are pressed simultaneously. This causes neither the lbuttondown nor rbuttondown messages to be sent, nor does it send the mbuttondown message. But it is obviously sending some sort of message to the program because the cursor changes to an icon similar (but not identical) to the one that appears when you use the scroll wheel on a normal mouse. Unfortunately the program immediately crashes when both buttons are pressed simultaneously on a notebook touchpad. This behaviour doesn't occur if you press both buttons simultaneously on a normal mouse.
Does anybody know what message handler I should be using the capture the problem behaviour?
Thanks for any help!
Mick
|
|
|
|
|
I have a CListCtrl object with LVS_EX_SUBITEMIMAGES included in extended style. This will let me include images inside subitems.
The subitem images are displayed fine
I don't want images inside the first column, but it does display image 0. After setting that id to -1 the list doesn't display an image but it keeps a space inside the first column as wide as the images.
What can I do to prevent this?
using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]
|
|
|
|
|
Hello,
I need a hint how to copy files from virtual folders.
My digital camera is connected as virtual folder in 'my computer' -> 'control panel' -> 'scanners and cameras'.
It is not difficult to gain access to that camera by using iterative IShellFolder commands. GetDisplayName generates a full path like:
'::{GUID of my computer}\::{GUID of control panel}\::{GUID of scanners and camera\devid:{GUID of camera}\0003:\0003\Root\Ext0\DCIM\100Ricoh\picture1234.jpg'
SHOperation fails when passing this path.
Any help is appreciated.
Thanks in advance!
Sebastian
|
|
|
|