|
Hi,
last week there was a new addition to codeproject, the CRoundButton2 class. This directly cought my attention, since I would like to add skinning and resizing capabilities to our application. But I have still a problem with this class. It can only handle text on the buttons and no overlayed bitmaps.
Why isn't there any Button class with SVG rendering capabilities. I know, I can write one myself and perhaps I will do so, but I find it interesting, since SVG is an accepted standard. There is no basic SVG rendering library available for Windows. You have to make use of adobes product or of the internet explorer. Recently there was a note that the two libraries librsvg and libsvg will join, and with the cairo backend there is also a win32 based output target available.
But I can't believe that there isn't anything currently available to render Buttons with SVG images wihin windows. Something, that is built into GTK/Gnome and QT/KDE since years.
Or, can somebody point me to the right direction? I don't want to make use of all high level features of SVGs, CSS and whatever. Simply render a button from a SVG source and have all button styles like, hoover, pressed, inactive and so on assigned a different SVG.
Best regards
Dirk
|
|
|
|
|
hi, how to display two dialog box at the same time when the dailog based application is build.
|
|
|
|
|
what ?
do you want to do?
did u try the DoModal
CDialogbox dlg1;
dlg1.DoModal();
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
i know that men but i want to display two dialog box at the same time when dialog based application is build.
example: when u build a sample dialog based app , wat u get initially only one dialog . but i want to display two dialog box at the same time when the app is build.
|
|
|
|
|
I think you mean to use both dialogs at the same time. In that case the second one needs to modeless.
Declare the second dialog variable in the first class:
CSecondDialog m_dlgSecond;
In OnInitDialog() of the first:
m_dlgSecond.Create(IDD_DIALOG_SECOND,this);
m_dlgSecond.ShowWindow(SW_SHOW);
this is this.
|
|
|
|
|
how do u access the second dialog class name in the first dialog?
V
|
|
|
|
|
I am afraid I do not get your question.
Do you mean GetClassName(...) ?
It will return #32770 for MFC dialogs.
If you mean how to access second's variables, then make them public, and access them using the object: int a = m_dlgSecond.m_nValue;
this is this.
|
|
|
|
|
khan++ wrote:
It will return #32770 for MFC dialogs.
#32770 is the class for all dialogs, whether MFC is used or not.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
hi,
"Just A Peacefull Thought "
why do you want to get the class name of the dialog box if you can get a handle using the GetDlgItem(IDD_) and can play havoc with it.
try it out.
|
|
|
|
|
khan thanks for ur suggestion its worked but one change is thati created modelesss dialog in heap, in that way its work.
|
|
|
|
|
khan++ wrote:
In OnInitDialog() of the first:
m_dlgSecond.Create(IDD_DIALOG_SECOND,this); //change the id to the real id.
m_dlgSecond.ShowWindow(SW_SHOW);
if i create the second dialog box in OnInitDialog of the first class,while executing it is showing the second dialog box for a second and in abrupt manner(the dialog box moves from the bottom of the screen to the top leaving traces behind) and then the second dialog disappears.
after that the 1st dialog box is shown normally.
how to display the second dialog box continously?
thanx in advance
|
|
|
|
|
As khan++ has told you , you will have to use modeless dialogs for that ,
Here[^] you will find all you need for creating and using modeless dialogs.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
hai ,
i guess that you will have to make both the dialogs modeless and GetDlgItem(IDD) will help you to retrieve the handle for the other dialog box in which the IDD is the name you assigned in the resource editor.
BestOfLuk
|
|
|
|
|
Make the two dialog modeless
& use the get the handle to
both the dialogbox.
i hope that solves your mystery
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
|
I have created a view which need to be printed
by a printer , The base class for the view is
the CScrollView.
How can i print all the data, i also want to
ensure that if data is long enought not to
fit on one page then there should be some
blank space left at the starting and ending
of every page.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Hi,
I have created a custom window with only WS_POPUP style. That is it does not have border and caption. A special border and caption are drawn in its client area. It is supposed to use a virtual client area, which is less than the actual client area.
In this case the parent or any other window calls myWnd.GetClientRect( &rt ), it will get the actual client area, not the area defined by me. I need to give the virtual client area rather than the actual.
Is there any method to supply the virtual client area to GetClientRect() function call?
Thanks in advance!
- NS -
|
|
|
|
|
You can overload GetClientRect(LPRECT lpRect);
In your implementation, Use ::GetClientRect(hWnd, &rect);
Then rect.DeflateRect(10,10,10,10);
It will make the rect smaller by 10 pixels each side. Change that to taste.
this is this.
|
|
|
|
|
Ok it will be fine for CMyWnd::GetClientRect(...).
But what about the call like this...
::GetClientRect( myWnd.GetSafeHwnd(), &rt );
or
myWnd.CWnd::GetClientRect( &rt );
In these case the hWnd is directly used for getting the client rect. I need to manage these types of calls also.
Thank you!
- NS -
|
|
|
|
|
Then don't overload GetClientRect().
Use DeflateRect() with every call, I guess.
this is this.
|
|
|
|
|
I'm sorry to say that it is not fine as you think. The custom client area is not a fixed one.
Also I think it is not good to calculate the client area by the caller after the call to GetClinetRect than doing it automatically when the call occurs.
Could you suggest a better method?
Thank you!
- NS -
|
|
|
|
|
The easiest way is to give your window a border, and do the border drawing in the WM_NCPAINT handler. You can adjust the size of the borders and client area using the WM_NCCALCSIZE message.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Thank you.
This is a very good idea. And I think it will be fit for my need.
- NS -
|
|
|
|
|
hi
how can i make a user defined resource??
i want to get a MIDI in the .exe file.
-- modified at 4:34 Monday 26th September, 2005
|
|
|
|
|
Import the resource file. It asks for a 'Resouce type'. You can give it any name, like, IDR_MIDI .
Hope that helps.
this is this.
|
|
|
|