|
but my question how to create bitmap of desired size without GDI+ from scratch
Rajesh
|
|
|
|
|
|
can you sugggest me the last three parameter for creating 24bit rgb and write some text over it
Rajesh
|
|
|
|
|
Try out the below code piece...
CDC* pDC = GetDC();
CDC memDC;
memDC.CreateCompatibleDC(pDC);
CBitmap bitmap;
bitmap.CreateCompatibleBitmap(pDC, 100, 100);
CBitmap* pOldBitmap = memDC.SelectObject((CBitmap*)&bitmap);
pDC->BitBlt(0, 0, 100, 100, &memDC, 0, 0, SRCCOPY);
memDC.SelectObject((CBitmap*)pOldBitmap);
ReleaseDC(pDC);
Regards,
Rane
|
|
|
|
|
can you send me the code using pure win32 api not MFC
Rajesh
|
|
|
|
|
Its pretty easy..Follow the above programming structure and replace the MFC functions with the equivalent Win32 APIs.This will be a good excercise to learn about the win32 multimedia/graphic APIs !.
p.s : I know it is little time consuming
Regards,
Rane
|
|
|
|
|
Rane's code makes a bitmap the same format as the
display. If you want to guarantee 24bpp or 32bpp
you can use CreateDIBSection() instead of CreateCompatibleBitmap().
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hi all,
i m using a EditBox for enter values in form of percentage.
like "34.45" i want to apply validation here.
i want if user enters two digit than it not able to enter more digit before enter "."
same for after "." its only enter two digits.
please tell me how can i do this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Create a class for the edit control, in that class, handle the WM_CHAR message. When ever user press a character, that function will get called. The character will appear in the edit box only if you call CEdit::OnChar from that function. So if you want to prevent the characters, just dont call the base class function.
|
|
|
|
|
PLease explain me with example.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Handle EN_CHANGE notification. Find the '.' from the right side of the string. If found at 4th position from the last you should display the previously correct string and keep on displaying it else you can allow the user to enter the character.Also you would need to validate the values for some other entries like 13.1.1.0. Hope this helps you.
I don't have an example with me
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Why not simply use a masked edit control? Most of them supoport a mask that would look something like ##.##.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Need to find good Documentation on NtSetDefaultLocale API
Thanks
|
|
|
|
|
|
those it effects language version of non Unicode programs regional settings ?
|
|
|
|
|
What confusion do you have in this?
This API sets the default Kernel or User Mode locale. If the first Parameter is set then this API sets the UserMode locale else KernelMode locale.The Second parameter corresponds to the type of Locale to be set.
For the list of locale codes, see here[^]
Regards,
Rane
|
|
|
|
|
what the difference between in UserMode/ KernelMode ?
Also which header and SDK is needed ?
modified on Wednesday, September 10, 2008 8:35 AM
|
|
|
|
|
The APIs in ntdll (the ones that start with Nt ) are usually not documented, on purpose. Unless you have an overriding need to use such an API, you should use a Win32 API instead.
|
|
|
|
|
Can you deirect me to that kind of API ?
Thanks
|
|
|
|
|
Hi all,
How could I come to know that any popup is blocked in Internet explorer programmatically in my toolbar plug-in?
Actually I want to catch that event & need to do some operation over there.
Please help me.
|
|
|
|
|
This link[^]will be of little help!
Regards,
Rane
|
|
|
|
|
Thanks for reply..
Actually I want to count the number of popups blocked by internet explorer & show that count to user as a caption of toolbar button.
As number of popups blocked increases my button caption also changes.
I want to make it something like Google Toolbar Popup Blocker.
|
|
|
|
|
You can achieve it using "cookies", which can hold information on the number of popup windows blocked.
Regards,
Rane
|
|
|
|
|
can anybody rell me waht exactly this model does?
|
|
|
|