 |
|
 |
Can I replace the image(-set) of a single button at runtime with another set of true color images? If yes, could someone point me into the right direction?
|
|
|
|
 |
|
 |
Hello, you have done very well, but the only regret is that there is no button of ctoolbar to change it's background color, so the button will make people feel ugly.do you have any idea to change it?
|
|
|
|
 |
|
 |
Hi, The demo is derived from CFrameWnd. However when I use a simple CDialog, there is a memory leak in SetTrueColorToolBar. How to solve this ? LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(uToolBar), IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_CREATEDIBSECTION) Greetings from Mensfort
|
|
|
|
 |
|
 |
Hi, The demo is derived from CFrameWnd. However when I use a simple CDialog, there is a memory leak in SetTrueColorToolBar. How to solve this ? LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(uToolBar), IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE|LR_CREATEDIBSECTION) Greetings from Mensfort
|
|
|
|
 |
|
 |
Hi,
The demo is derived from CFrameWnd. However when I use a simple CDialog, there is a memory leak in SetTrueColorToolBar. How to solve this ?
LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(uToolBar),
IMAGE_BITMAP, 0, 0,
LR_DEFAULTSIZE|LR_CREATEDIBSECTION)
Greetings from Mensfort
|
|
|
|
 |
|
 |
So simple a class too. Makes you wonder why MS didn't already have the facility!
|
|
|
|
 |
|
 |
Linking...
CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
what should i do
thanks
|
|
|
|
 |
|
 |
Yes there must be a bug in the manifest. I cant find the error, but you can compile
if you go to project configuration properties -> Manifest Tool -> Input and Output -> Embed Manifest and setting it to "no."
see: social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/4724cf11-2942-4fa3-9b74-314afe40a9f5/
|
|
|
|
 |
|
 |
Thanks a lot, works great. However why there are no tool tips show? Style CBRS_TOOLTIPS is set...
|
|
|
|
 |
|
 |
Hi,
I need disable/enable buttons in my app,
please show how can I do this.
|
|
|
|
 |
|
 |
Look API EnableWindow();
L'enfer est pavé de bonnes intentions! ![Rose | [Rose]](/script/Forums/Images/rose.gif) The road to hell is paved with good intentions!
|
|
|
|
 |
|
 |
SendMessage (hToolbar, TB_ENABLEBUTTON, ctl_id, FALSE); Where ctl_id is the command identifier of the button in question.
|
|
|
|
 |
|
 |
Thanks for the article. I used your toolbar in my article here[^].
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
 |
|
 |
Hi
Can I replace default toolbar?
Where can I find the true color icons for "open, save, copy, ...."?
Thanks,
|
|
|
|
 |
|
 |
Very nice code. What is the license? Can it be used in commercial applications?
Thanks!
|
|
|
|
 |
|
 |
maybe something different in ON_NOTIFY_REFLECT(TBN_DROPDOWN, OnToolbarDropDown)?
|
|
|
|
 |
|
 |
To Fix it, you need to change the first OnToolbarDropDown argument to use a NMHDR* instead of a NMTOOLBAR*.
TrueColorToolBar.h
afx_msg void OnToolbarDropDown(NMHDR* pnmhdr, LRESULT* plRes);
TrueColorToolBar.cpp
void CTrueColorToolBar::OnToolbarDropDown(NMHDR* pnmhdr, LRESULT *plr)
{
NMTOOLBAR *pnmtb = (NMTOOLBAR*)pnmhdr;
... rest of code...
}
|
|
|
|
 |
|
 |
Does anyone know if i can put a BackGround Image to the white area of an SDI application. if(yes)
{
Can you tell me how i do it;
}
else
{
nevermind;
}
|
|
|
|
 |
|
 |
I`m a beginner of VC++(MFC).
I used your resource files in my application,and it worked very well at first.But when delete the files except useful files in Debug and complied and linked it ,or ,I pressed "Rebuild all",it told me these:
g:\lyf\mymfc\mainfrm.h(41) : error C2146: syntax error : missing ';' before identifier 'm_wndToolBar'
g:\lyf\mymfc\mainfrm.h(41) : error C2501: 'CTrueColorToolBar' : missing storage-class or type specifiers
g:\lyf\mymfc\mainfrm.h(41) : error C2501: 'm_wndToolBar' : missing storage-class or type specifiers
MyMFCDoc.cpp
MyMFCView.cpp
TrueColorToolBar.cpp
Generating Code...
Error executing cl.exe.
MyMFC.exe - 3 error(s), 0 warning(s)
And if I change "CTrueColorToolBar m_wndToolBar;"
to "CToolBar m_wndToolBar;" then press F5 ,nothing wrong happens;and if I then change it back,F5,nothing wrong happens too--it works very well.
Who can tell me what happened?
Thank you very much!
|
|
|
|
 |
|
 |
you should include TrueColorToolBar.h in mainfrm.h
#include "TrueColorToolBar.h"
|
|
|
|
 |
|
 |
I is like this class the very much. I now has problem that I can not solving. When I am useing the AddDropDownButton then the size of button is very big. I cann't figure to make smaller. Is always same to big size.
Thanksing
|
|
|
|
 |
|
|
 |
|
 |
int btnIdx = m_wndToolBar.CommandToIndex(ID_BUTTON1);
m_wndToolBar.SetButtonText(btnIdx, _T("your text"));
m_wndToolBar.SetButtonStyle(btnIdx, TBSTYLE_AUTOSIZE);
|
|
|
|
 |
|
 |
It seemed the code did't work...
|
|
|
|
 |
|
 |
If it doesn't work, why don't we put the text inside the image when you are creating the image button?
hope help
|
|
|
|
 |