|
Please forgive my novity,
I am trying to add buttons to my mfc application. However they show up very basic (old style buttons "as rectangles with straight edges"). I have seen some examples where the buttons are similar to the windows buttons (rounded rectangles). I have tried to change the appearance of the buttons using their properties but I miserably failed
How can i do that ? Thank you
llp00na
-- modified at 8:01 Monday 3rd April, 2006
|
|
|
|
|
Add the manifest file to your project resources to get XP style round edged buttons, provided you are using XP.
Another option is to ownerdraw these buttons.
Nibu thomas
Software Developer
|
|
|
|
|
You can create the object of the CBitmapButton
The button style must be ownerdraw,
load the bitmap and see the fun
code snapets
CBitmapButton m_fun;
m_fun.Create(...); //write appropriate parameters
m_fun.LoadBitmaps(IDB_FUN);
m_fun.SizeToContent();
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
|
Hi
You can try creating the rounded regions.
Create rounded region use CreateRoundRectRgn and for setting it use SetWindowRgn
Cheers
"Peace of mind through Technology"
|
|
|
|
|
thanx for your suggestions guys ,
As i really dont know which approach to follow, i will need a little guidance from you.
I have tried to create this manifest file, so i read through: *** Click Me *** but i just couldnt find the tab *Manifest File* in the project Property Pages. (I am using visual studio 2003). Does it mean i have to create it manually ??
To the important question now, does this approach impose any downsides ??? or is it better to use the other suggested approaches ???
Thanx to all of you
llp00na
-- modified at 9:52 Monday 3rd April, 2006
|
|
|
|
|
|
CADODatabase Eror
Code=80004005
Code meaning=Unspecified error
Source=Microsoft OLE DB Provider for IDBC Drivers
Description =[MYSQL][ODBC 3.51 Driver]Can't connect to MySQL server on '61.247.251.95'(10060)
I got this error while i connect database from remote system ?
can any one please help me?
JAYARAJ
|
|
|
|
|
|
_T("Driver={mySQL ODBC 3.51 Driver};Server=ist16;"
"Port=3306;Option=4;Database=ist_encoder;Uid=root;Pwd=isakura;");
Is it right?
JAYARAJ
|
|
|
|
|
Try this simple line - it should work just fine:
_T("Database=ist_encoder;Uid=root;pwd=isakura;");
|
|
|
|
|
Does anybody knows good tool with visual support for C++ code reengeneering? maybe there is software where I can do class and methods modelling in visual diagrams and the software are generating code framework for me?
|
|
|
|
|
Oskars wrote: where I can do class and methods modelling in visual diagrams and the software are generating code framework for me?
Hummm.... I have heard the Rational Software do something like this.. but never tried..
|
|
|
|
|
Install Rational Clear Case
never say die
|
|
|
|
|
Rational Rose Technical Developer[^] will do this for you.
It's been on the market for nearly a decade starting out with the Booch method and since 2004 supports UML 2.0.
--
Roger
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
You can do it in Microsoft Visio.
The version that I am using is Microsoft Visio Enterprise Architects (10.0.2705).
In this version follow the below to do it:
1) Click UML menu item in the main menu
2) Select 'Code', click 'Generate'
cheers...mil10.
|
|
|
|
|
how can i call a function from a vb.net class library within a mfc application?
mission
-- modified at 7:24 Monday 3rd April, 2006
|
|
|
|
|
Use the regasm .net framework tool to register the assembly into registry and then u can use it as a com component. more details is there at http://www.codeproject.com/useritems/COM_Interoperability.asp[^]
To ues the tlb file form ur mfc app eihter u can use the #import method or else an alternative is to use the COleDispatchDriver wrapper method.
cheers...mil10.
|
|
|
|
|
Hi
I have have three buttons on my dialog I and their varibles are of Type CHoverButton. When i move the mouse over the buttons are chnaged properly and I canSee the effects. But When i Click on the Button and release mouse I want set the button image as white or any other different from Mouse over and Mouse clcik and I want start some process which will be diaplayed on Child dialog. I can see the process going on But not the image of dialog.
When he process is going on and if i move the mouse mover the button he images are again changed.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
After you started the process you should reset the hover image of the button!
|
|
|
|
|
if you mean that you want to change the bitmap of the button then add the followig code:-
myButton.SetBitmap( ::LoadBitmap(NULL, MAKEINTRESOURCE(OBM_CHECK)) );<br />
else<br />
if you want to change the color then handle the WM_ERASEBKGND().
Regards,
FarPointer
|
|
|
|
|
Hi Ganesh_T,
You need to change color from button when button clicked?
|
|
|
|
|
No,
I have four images normal mouse over, mouse click and when the mouse is clicked and released. So when i derive the button variables from CHoverButton the class which has been posted on CodeProject the images are set properly. But when the mouse is clicked and reelased I want tos et the White image having the Icon on it. But in our class the when mouse is moved agai the image is changed. So when I click on one of the button only that button image should be different and mouse over should be supported for other two buttons
Cheers
"Peace of mind through Technology"
|
|
|
|
|
|
Pls. could anyone help on this:
VC++ 6.0 SP6
I have a list box that can hold 12 lines of strings w/o scrolling. I want
it to scroll up when more strings are added. It scrolls up, but the 13th
through Total items are displayed as line 12. When the loop is done, the
list box refreshes and shows all the correct items. How do I get the 13+
items to show correctly when scrolling? When I step through the debugger,
the string I am adding is correct, but the display isn't.
CListBox *pList;
pList = static_cast<clistbox*>(GetDlgItem (IDC_LIST1));
for(x=1; x<y; x++)
{
...="" lines="" where="" the="" string="" 'sdothis'="" is="" created
plist-="">InsertString (-1, sDoThis);
pList->ScrollWindow (0, -12, NULL, NULL);
pList->UpdateWindow ();
}
---Arun.
|
|
|
|