|
I'm assuming I should delegate control updates into other message handlers. Is that a better way to do it?
Josh
josh@that-guy.net
|
|
|
|
|
That line just means that you can't call the base class implementation for a WM_PAINT message, because it won't work. If you really need it, you can call it, but change CPaintDC to CClientDC in the derived class (you will lose updated region info).
I can't remember if the base implementation of OnPaint actually does something. In case it doesn't, use Default().
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Where to download e-books about "COM"?
Thanks.
Maer
|
|
|
|
|
Now I want to handle the message of WM_MOUSEWHEEL. But while I add this handler in the message processing function, the VC++ compiler tell me that
error C2065: 'WM_MOUSEWHEEL' : undeclared identifier
but the WM_MOUSEWHEEL is identified while I check in the MSDN, and no other header file is requested in the help of MSDN.
|
|
|
|
|
WM_MOUSEWHEEL is declared in winuser.h; are you #including windows.h?
|
|
|
|
|
Use this line:
#define _WIN32_WINNT 0x0500
Should work,
Jerzy
|
|
|
|
|
Use this line:
#define _WIN32_WINNT 0x0500
Why?
The Platform SDK Doc. say that it should also work under Win9x...
With that define, the application might only wotk under Win2k.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
You might need to install the Platform SDK.
It updates your headerfiles to newer versions...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
How to check out whether a file is existing?
Thanks.
Maer
|
|
|
|
|
You'd use the FindFirstFile() Win32 API function. Assume pstrFile is a pointer to the string filename below:
WIN32_FIND_DATA findData;
HANDLE hFile = FindFirstFile(pstrFile, &findData);
bool bExists = (hFile != INVALID_HANDLE_VALUE);
If the handle returned by FindFirstFile() is INVALID_HANDLE_VALUE, the file doesn't exist.
|
|
|
|
|
Try this:
BOOL FileExists(CString* fn)
{
BOOL exists = FALSE;
if (!fn.IsEmpty())
{
int status = _access((const char*)fn,0);
if (status == 0)
{
exists = TRUE;
}
}
return exists;
}
|
|
|
|
|
Hi, Simmons.
Thanks for your codes pal.
Best regards.
Maer
|
|
|
|
|
Hello!
When You/I create an standard MFC application it will insert an icon for the app, the wellknown MFC icon. If I start the program then the icon will have the same background color as the 'Window banner' (if you are using the standard colors). If you change focus to an another program then the 'banner' will get 'grey' but the icon will still have the same background color (darkblue).
I see in other program, e.g. Visual Studio, that the background color of the icon changes not only when focus change but also when changing the Windows color scheme.
How do they do this??
// Anders
|
|
|
|
|
> How do they do this??
With trasparent background!
MFC Icon is not transparent at all...
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Don't you think that everything is easy when you know how
OK, then I need to get me an Image editor that can create transparant backgrounds
Thank you very much for the answer!
// Mike
|
|
|
|
|
Yep, but you can use VC++ resource editor too!
To select the transparent color, click on that dark-cyan little screen icon in the color palette. The magenta one is for inverted background.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
I always try to learn at least one new fact a day. Now I have learned two things already! I think I need to take the afternoon off
Thanks again!
// Mike
|
|
|
|
|
Hi
I am interested in transferring a File ( upload & download )
using Http Protocol. This computer is connected to the
Internet via proxy.
I am trying to use WinINet.dll. Can some one guide me, whether I am on the right course or if there are free
libraries available to do the same.
Regards,
SanskyPotov
SanskyPotov
|
|
|
|
|
It's easy to download a file using Wininet.
I'm not so sure about upload. I guess that you could post the file to a webpage, and from that webpage you could store the RAW data that was posted, and save them to a file.
I have never tried, but it might work.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Woops, to answar your question...
I think that Wininet is okay for HTTP. It's easy to work with, and seems to be working just fine
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Is there a way to end a keyboard data entry with a carriage return? The CEdit control does not recognize a carriage return. You must enter the information and click some other control to process the input. The OnEditChange Message intercepts each character. I need to wait until the entry is complete, then begin processing the data.
All help appreciated.
Richard
|
|
|
|
|
|
If this is a single-line edit, you'll have to handle two messages:
1) WM_GETDLGCODE - return Default() | DLGC_WANTALLKEYS
2) WM_KEYDOWN - handle VK_RETURN to process whatever you want.
Without (1) your edit control will not receive WM_KEYDOWN when Enter is pressed.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi,
What I want to do is this: I have a toolbar that has a 'zoom' button on it.
Since my software includes all kinds of zooms, I want to open another toolbar
right next to this button, if this button is pressed on a little bit longer.
The 'popup' toolbar will include all the other kinds of zoom buttons. The user
will be able to choose the kind of zoom while the left button is still pressed. Ofcourse that toolbar should be closed when the left button is up again. You can see those kinds of 'popup' toolbars in 3D Studio MAX, AutoCAD
and I think also Photoshop. I'm using MFC, but Win32 is also good.
Does anyone know how to do this?
Thanks.
|
|
|
|
|
What you want is a Drop-Down button. If you search MSDN for drop-down button or TBSTYLE_DROPDOWN toolbar style you should find some information.
|
|
|
|