|
I think this[^] is helpful for you.
|
|
|
|
|
Hi,
I have used two button controls and i want to make the lower border invisible and keep the upper and side border lines visible.
Can any one tell me how.
Please help me.
Thanks in advance
Dhiraj
|
|
|
|
|
Buttons one over the other?
Regards,
Rane
|
|
|
|
|
No the two buttons are not one another over. They are apart. Its just that I want to make the lower border invisible and and the two side border and upper border visible.
|
|
|
|
|
Place an empty static text over the border(s) that you want to hide and the other borders will still be visible..
Regards,
Rane
|
|
|
|
|
but when i take the mouse over the buttons the borders are again visisble
|
|
|
|
|
Check out this link[^]!
Regards,
Rane
|
|
|
|
|
|
This can be done with an owner-drawn button. You write the button-drawing code yourself, so you can make it do anything.
|
|
|
|
|
You can use of Owner Draw and then you can make your border for buttons(you muse be set OwnerDraw on the Button property).
|
|
|
|
|
For example,
class CWnd1 : public CDockablePane
class CWnd2 : public CDockablePane
/-------------------------\
| | |
| | |
| | <-- CWnd1 |
| | |
|---+ |
| | <-- CWnd2 |
| | |
\-------------------------/
system
modified on Wednesday, September 10, 2008 4:27 AM
|
|
|
|
|
I want to create the rgb24 or rgb32 bitmap having some text(example "sometext") on it .
the lenght of the bitmap should be the font size and width be the length of the text("sometext").
Rajesh
|
|
|
|
|
You can use Graphics::MeasureString for this purpose.
If you need accurate width and height read this article[^]
Regards,
Sandip.
|
|
|
|
|
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_
|
|
|
|