|
An icon can have multiple colour depths and sizes in one .ico file. It sounds to me like you are editting the 32x32 icon, which is displayed in the about box, but not editting the 16x16 icon.
If you view large icons in Explorer, do you see your changed icon for the exe?
|
|
|
|
|
Thanks, did not know that there where different sizes for the Icon. Which each had to be changed. Just thought C++ changed the size for you. LOL. Well that did it and I know have my own crappy but orginal icon in my program. Thanks again.
|
|
|
|
|
Hi,
I am getting WM_CAPTURECHANGED messages with lParam=0 and then my WindowProc stops getting messages (because my focus has disappeared). How is this legal? lParam is supposed to contain the HWND of the window that stole focus away from my WindowProc but it is zero which is an illegal value. How do I find out who has taken focus? Is this documented anywhere?
Thank you,
Gili
|
|
|
|
|
Don't know if this is documented somwhere but this sounds like Screen Saver attempt at getting the focus before actually going in Screen Saver mode.
|
|
|
|
|
This is actually what you get when you click on the desktop and drag a rectangle. So, to answer your previous post, it isn't some sort of screensaver... but something is taking the focus away from the desktop. I will keep on looking.
|
|
|
|
|
I think you're getting focus and mouse capture confused. They are not the same thing. To check for a focus change, you'll need to handle WM_KILLFOCUS , not WM_CAPTURECHANGED .
Hope this helps,
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"
|
|
|
|
|
Sorry, you are right. I believe what is going on is that upon the user clicking and dragging inside the window, WM_CAPTURECHANGED is received indicating that the mouse capture has been released (that's probably what lParam=0 means).
The problem, then, is that WM_MOUSEMOVE messages are being posted on the event-queue but my WindowProc never receives them. I am subclassing some other window. My guess is that the window calls GetMessage(), sees WM_MOUSEMOVE, and handles it internally without passing it on to the WindowProc. This poses a problem for me because I absolutely must subclass WM_MOUSEMOVE. Any ideas?
Gili
|
|
|
|
|
cowwoc2002 wrote:
My guess is that the window calls GetMessage(), sees WM_MOUSEMOVE, and handles it internally without passing it on to the WindowProc.
That would be my guess as well. One way to get around this is to install a WH_GETMESSAGE hook, which will get called whenever a message is retrieved from the message queue.
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"
|
|
|
|
|
Any hints about implementing subtitles in an video player(VMR9 or overlay) ?
Any suggestion is welcomed ...
|
|
|
|
|
Hi everyone.
I am using Visual Studio, visual C++ 7.0 and having problem adding an event handler to a button in controlbar.
I used the editor to add abutton, gave it an ID but I could not not find ways to add a function for that button. I was able to do that in version 6.0.
Please help.
|
|
|
|
|
TNguyen
I was browsing the board to see if anyone had found a solution to this problem, and came across your post. I imagine you have found a way round this by now, but I thought I would reply anyway:
I can't believe that the designers meant to make the task of connecting an event handler to a button more difficult than it used to be. I assume it was an unintended side effect of trying to produce the unified .NET programming interface (which regretably seems to have involved discarding MFC's ClassWizard) - but what continues to puzzle me is that this has not been subject to a patch or improvement in later releases.
I don't have an anwer, but I do have a workaround. Build a MENU item first, attach the handlers you want to it, then build a toolbar button with the same ID (and it will share the same event handlers).
If you right click on menu items and select the "add event handler" option, the Event Handler Wizard appears and gives you the option to create or edit handlers for COMMAND and UPDATE_COMMAND_UI messages.
The rule seems to be, right click on the thing you want to create a handler for and the Event Handler Wizard will provide pretty much the same functionality as MFC's ClassWizard - except that it doesn't work for toolbar buttons because right clicking doesn't give you the option - seems nuts to me!
Please let me know if you have found a better way in the meantime.
Best Regards
Cliff
|
|
|
|
|
hi
I wrote a service in which i want to pass some parameters from INI file but when i give the path as .\\TibcoTCPServer.ini it does not work but if i hard code the path it works fine. Can any body help me how can i pass the ini file path so that service will pick the parameters.
Thanks
Shailesh
|
|
|
|
|
.\\TibcoTCPServer.ini is a relative path, which means it's relative to whatever happens to be the current working directory at the moment. Use GetModuleFileName(NULL, ...) instead to get the application's fully-qualified path, then replace the filename with TibcoTCPServer.ini.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
if i use GetModuleFinename(NULL..) I Get the Memory could not be read error. My Code is as
BOOL FillParams()
{
CFileFind fileFinder;
CIniReader m_IniFile;
TCHAR Buffer[BUFSIZE];
DWORD dwRet,nSize;
CString error;
dwRet = GetModuleFileName(NULL,Buffer,nSize);
if( dwRet == 0 )
{
error.Format("Failed GetCurrentDirectory %d",GetLastError());
WriteToLog((LPSTR)(LPCTSTR)error);
return 0;
}
WriteToLog(Buffer);
// Here i am changing the path..
}
But It is failing at GetModuleFineName function or crashing.
Any Suggestion..
Thanks
Shailesh
|
|
|
|
|
You've failed to inform the function of the size of the buffer.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I am using
#define BUFSIZE MAX_PATH
|
|
|
|
|
I did not indicate that the buffer itself was not large enough. Check your code again. Note the third parameter being passed to GetModuleFileName() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thanks David U are Rock.
Thanks
shailesh
|
|
|
|
|
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
|
|
|
|