 |
|
 |
The problem is in CImage list, if you create it in this way, you will be able to use 24 bit images.
////////
CImageList m_icons; CBitmap bit, mask; bit.LoadBitmap(IDB_BITMAP2);//IDB_BITMAP2 is 24 bit image mask.LoadBitmap(IDB_BITMAP3); //IDB_BITMAP3 is 1 bit image m_icons.Create(16,16,ILC_MASK | ILC_COLOR24,0,3); m_icons.Add(&bit, &mask);
m_icons.Create(IDB_BITMAP1, 16, 0, RGB(255,0,255)); CMenuXP::SetMenuItemImage(ID_NEW, m_icons m_hImageList, 0); CMenuXP::SetMenuItemImage(ID_OPEN, m_icons.m_hImageList, 1); CMenuXP::SetMenuItemImage(ID_SAVEAS, m_icons.m_hImageList,2);
//////////////
Axiom
One of many...
|
| Sign In·View Thread·PermaLink | 5.00/5 (2 votes) |
|
|
|
 |
|
 |
///////////////////// CBitmap bit, mask; bit.LoadBitmap(IDB_BITMAP2); mask.LoadBitmap(IDB_BITMAP3);
m_icons.Create(16,16,ILC_MASK | ILC_COLOR24,0,3); m_icons.Add(&bit, &mask);
CMenuXP::SetXPLookNFeel(this); CMenuXP::SetMenuItemImage(ID_NEW, m_icons.m_hImageList, 0); CMenuXP::SetMenuItemImage(ID_OPEN, m_icons.m_hImageList, 1); CMenuXP::SetMenuItemImage(ID_SAVEAS, m_icons.m_hImageList,2); //////////////////////////////////
It works for me
Axiom
One of many...
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
In My toolbar buttons the text label didn't showing.BMP shoawing with no probs instead the alignment.. Is there any way to shaow the label..
|
| Sign In·View Thread·PermaLink | 3.00/5 (3 votes) |
|
|
|
 |
|
 |
Can you please explain implementation of CMenuXP::OnMeasureItem()?
I don't understand how it is deciding to calculate the width. What does the LOBYTE of the LOWORD of the MEASUREITEMSTRUCT::itemData member represent?
Any help is greatly appreciated.
-Frank
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hye, Have anybody developed XP style, edit control??? If yes please share it...
Jigar Mehta (jigarmehta@gatescorp.com)
Software Developer Gates Information Systems
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
hi,
I am trying to create an office XP kind of task pane (select view->task pane in wordXP or excelXP). It seems to me that they use an undocumented class called msoCommandBar.
I am using vc++ 6.0... could you please give some pointers on how to go ahead. I have posted a screen shot at http://www.seshagiri.8m.com/cgi-bin/i/taskpane.jpg to show what I want to create.
I have tried deriving from the CCommandBar...but am not making much progress. Please help.
thanks
Seshagiri
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
 |
Hi,
When running my application under Windows XP with Windows XP-style theming enabled, I'd like to show the XP theme. Actually this can be done easily by calling Default() in the OnDrawItem() member functions.
But how can I determine when the XP theme is on? Even better, I'd like to be able to switch between the default Windows look&feel and the OfficeXP look&feel as made available by this article dynamically, defaulting to OfficeXP look when XP theming is off.
Would that be possible?
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
 |
Hello..
This is a strange problem. I have Windows XP and Visual C++ 6.0. I have used the XP look controls for my application. I run it in debug mode and then wait some time without doing anything with the application. Suddenly debug view shows the following exception message:
Second Chance Assertion Failed: File I:\Common Classes\XP_Look\Draw.cpp, Line 163
and the application crashes, showing the dissablembled view (with the cursor on instrucction int 3) to debug the application.
Line 163 contains the following: VERIFY(::BitBlt (m_hDestDC, m_rect.left, m_rect.top, m_rect.Width(), m_rect.Height(), m_hDC, m_rect.left, m_rect.top, SRCCOPY));
What may be causing VERITY macro to assert?
Thanks Jaime
|
| Sign In·View Thread·PermaLink | 3.33/5 (3 votes) |
|
|
|
 |
|
 |
I was having the same problem in that as soon as the screen saver would kick in it would crash. This is because one of the DC handles becomes invalid (I believe it's m_hDestDC), thus BitBlt returns false and the program ASSERTS. I took the VERIFY away, and at first glance it seems to be working fine. You can use the following code to get the error returned by BitBlt (note that it uses GetLastError):
LPVOID lpMsgBuf; if (!FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPTSTR) &lpMsgBuf, 0, NULL )) { // Handle the error. return; }
// Process any inserts in lpMsgBuf. // ...
// Display the string. MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION );
// Free the buffer. LocalFree( lpMsgBuf );
Hope this helps.
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
 |
Dear Jean-Michel,
Each time the toolbar from your demo project changes position, when restarting again the application it mantains the last toolbar position. I thought that it could be accomplished by using the LoadState and SaveState member functions of CToolBar. However, I didn't find such thing in your code.
Could you please tell me how you did that?
Cheers,
Arthurit
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
Hi...
I have a button on a dialog box that has BS_ICON style.... when button is of CButton class, it shows the icon, but when I replace CButton for CButtonXP, the button text is shown instead of the button...
How can I do it?
Thanks Jaime
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
 |
CButtonXP does not support Icon's on a Button...
U have to implement this by yourself...
I'm working on it .. if it works as I expect I'll post it here
C'ya
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I know Win95 is, for the most part, I thing of the past, but these controls don't work on Win95. The root of the problem is , I think, is TrackMouseEvent. It requires WinNT 4.0 or Win98. _TrackMouseEvent emulates TrackMouseEvent and will run on Win95 with IE 3.0
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Moreover, the GetHotItem() as used in CToolBarXP is only available from Win95 IE4.0 and up (default was IE3.0), so the toolbar do show properly on old default Win95. Please be aware that IE6.0 is not supported for Win95, the last version you can download is IE5 (and quite hidden deep down in the Microsoft Site)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
In Tools.cpp, comment the extern "C" WINUSERAPI BOOL WINAPI TrackMouseEvent (LPTRACKMOUSEEVENT lpEventTrack);
and change TrackMouseEvent with _TrackMouseEvent, in the following way:
bool CMouseMgr::OnMouseMove (HWND hTrack) { ASSERT(m_hWnd != NULL); if ( hTrack == NULL ) hTrack = m_hWnd;
if ( !m_bOver ) { m_bOver = true;
if ( m_wFlags & MMS_PAINT ) { ::InvalidateRect (m_hWnd, NULL, false); } if ( m_wFlags & MMS_NCPAINT ) { ::SetWindowPos (m_hWnd, NULL, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED); } TRACKMOUSEEVENT tme = { sizeof TRACKMOUSEEVENT, TME_LEAVE, m_hTrack = hTrack, 0 }; ::_TrackMouseEvent (&tme);
return true; } if ( hTrack != m_hTrack ) { TRACKMOUSEEVENT tme = { sizeof TRACKMOUSEEVENT, TME_CANCEL, m_hTrack, 0 }; ::_TrackMouseEvent (&tme);
tme.dwFlags = TME_LEAVE; tme.hwndTrack = m_hTrack = hTrack; ::_TrackMouseEvent (&tme); } return false; }
I've tried with Win95 IE 5.5 and it does work.
A lot of greetings & kisses.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Jean,
Thanks for a set of cool XP controls. I've been trying to change the height of the combo without success.
How come I can only change the width through the create () function?
Please help!
Thanks in advance.
In programming you can do anything (by Paul DiLascia)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I have tested you example and I have compiled it on VC.NET and I have run it and it worked good. But just an adjust but I use XP standart blue theme, and the disabled button's image seems a little orange, it just a small difference from Word's buttons. I think if you adjust it the buttons will seem exacly like word's buttons!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
as I am interested in using this cool XP-Menu effect, I just started with downloading and running the .exe sample provided. The sample runs but NO XP style effect appears, just the regular 'old fashioned' windows menus. For information, I'm using Windows XP and Office 2K. Do I need to install Office XP in order to have this sample run as shown on the previous screenshot ? Please let me know.
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |
|
 |
Message written on 01/24/02: "The demo is compiled with VC6/SP5 under NT4. If you don't have the same compiler version, please use the source files." To minimize the exe file size, I didn't link statically with MFC librairies. It seems to be the reason of your problem.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
 | a bug!  |  | Anonymous | 0:23 22 Aug '02 |
|
|
 |
|
 |
You can add the code below to avoid the crash.
in Tools.cpp
bool CMouseMgr::OnMouseOut (HWND hTrack) { // Temporary fix for the context menu crash if (!m_bOver) return false;
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I have tested your code on Win2K SP2 machine. Everything seems OK but the toolbar is looking as it is simple, not as it is on the demopicture - with shadows, highlight, etc - just simple Windows toolbar. What is wrong?
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |