|
Hi, thanks for your response. I just tried that and it does not seem to work. When I use the keyboard to move the slider, the focus rectangle still appears.
|
|
|
|
|
It actually *should* work I believe, just that the control doesn't receive keyboard input since it doesn't have focus (if you think about it, if it never receives focus, it never has to draw the focus rect).
Since you can move the slider using the keyboard, it appears that your slider does actually have focus (unless you happen to be forwarding messages from the parent window).
Here's another method that works even though it has focus which I've used before. Just use custom draw and remove the CDIS_FOCUS bit from uItemState (uItemState &= ~CDIS_FOCUS) during the CDDS_PREPAINT phase.
The user might be confused without the focus rect though. I notice that windows media player 11 puts on the focus rect for a while if the slider actually has focus and receives keyboard input.
|
|
|
|
|
THANK YOU....removing that bit works like a charm. Its weird tho, because i figured the override OnSetFocus would've worked too, but it did not. And you were correct, I am forwarding WM_KEYDOWN messages from the parent window to the slider. I guess thats why. Thanks very much for your help.
|
|
|
|
|
I want to use CxImage (or others) to open multiple types of images (gif,jpg,bmp,ico etc) then transfer image files in memory (not save to disk) in bitmap format which includes BITMAPINFOHEADER and data.
any comments for how to use CxImage (or others) to do that?
|
|
|
|
|
I think you can use CImage by including atlimage.h if you are not using VC6.0
There is no dumb question
<bjay zhu@shanghai,="" china<="" b="">
|
|
|
|
|
Hey, i've used this lib in my app and it's really easy to use.
Read the docs that tell you which libs to include (depending on what image support you want) include them in your project, include the main header somewhere in your source.
bool CxImage::Load ( const TCHAR * filename, <br />
DWORD imagetype = 0 <br />
) [inherited]
Reads from disk the image in a specific format.
If decoding fails using the specified image format, the function will try the automatic file format recognition.
Parameters:
filename: file name
imagetype: file format, see ENUM_CXIMAGE_FORMATS
Returns:
true if everything is ok
bool CxImage::Encode ( BYTE *& buffer, <br />
long & size, <br />
DWORD imagetype <br />
) [inherited]
Saves to memory buffer the image in a specific format.
Parameters:
buffer: output memory buffer pointer. Must be NULL, the function allocates and fill the memory, the application must free the buffer, see also FreeMemory().
size: output memory buffer size.
imagetype: file format, see ENUM_CXIMAGE_FORMATS
use the Get...() functions to fill the header info
|
|
|
|
|
Hi!
I want change Import Table of a pe file.
I want to add api functions, that they aren't in Import Table.
For example if "LoadLibraryA" Function there isn't in listed functions of Import Table,
I want to add it to Import Table of file,
then with software tools, i see this function in listed functions.
Zo.Naderi-Iran
|
|
|
|
|
Hi,
I had created one MFC project without ATL support.
I want to use CImage class in my program.
I tried to put the header file "atlimage.h" & "afxstr.h" in my dialogs
.h file. ( As said in one MSDN article.)
But i got the following error !
"fatal error C1083: Cannot open include file: 'atlimage.h': No such file or directory "
Is it possible to insert ATL/MFC shared classes in VC++ 6?
Is there any other way to do it ?
Thanks in advance....
vinsankar
|
|
|
|
|
|
Hi,
So , I cannot use CImage in VC++ 6.0
Is there any way put a JPEG image to my Dialog background.
I tried to use "CBitmapPicture" class provided with one of the codeproject article.
But It uses a static picture control to display the JPG file.
But when I used it in my project, I got an error.
How will I load a JPG image and fill my dialog background without using static controls?
Can any one help me ?
thanks in advance.....
vinsankar
|
|
|
|
|
u can use the Image class in the GDI+
nave
|
|
|
|
|
You can use OleLoadPicture or GDI+(Graphics and Image::FromFile(...) instead CImage class
|
|
|
|
|
Hi Please make me Done...
I have to connect MS Access database and retrieve data from vc++....
Can any please guide me or provide me link to study , i am new to vc++....
thanks in ADvaNcE
Hai this is fresh programer
|
|
|
|
|
See Here.[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
can anyone tell me why i get a compilation error in vs2002 whenever i try to use cimage or cdc?
it says:
error C2065: 'CImage' : undeclared identifier
and
error C2065: 'CDC' : undeclared identifier
ive reinstalled vs and it didnt help.
thanks for the help!
|
|
|
|
|
UnderWing wrote: i try to use cimage or cdc
What type of application are you working on? MFC, SDK
I think that CImage class is provided in VC7.0(.NET 2003)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You need to include AtlImage.h
|
|
|
|
|
And for CDC you need to Afxwin.h
|
|
|
|
|
thanks for the replies.
im creating an mfc app.
i can use cimage after including AtlImage.h, but if i include afxwin.h i get:
fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h><br />
any other suggestions? thanks
-- modified at 13:10 Saturday 29th July, 2006
|
|
|
|
|
|
Could you please tell me how to save to disk a bitmap stored in a HBITMAP structure? thanks in advance.
|
|
|
|
|
check out these structures
BITMAPINFO
DIBSECTION
BITMAPFILEHEADER
ofstream
post when need more clues
Kuphryn
|
|
|
|
|
use GetDIBits to create a DIB from the HBITMAP
then, fill out and write a BITMAPFILEHEADER
then write the DIB
that's it
Why donchoo take a peekchur mayn?
OK, cleeeeek
|
|
|
|
|
You can use fron CImage and attach this handle to it and use from save in this class
|
|
|
|