|
Hi all,
Iam changing the backGround colour of a bitmap. When I go to the "ResourceView" of my visual studio editor,Click on the bitmap,The bitmap is displayed. I wanted to add a new custom colour as the "colors" toolbar doesn't contain any colour,of interest to me.
so I go to the "Image" menu & call "AdjustColours" to add my new custom colour.Using this colour I change the background of my bitmap & the colour is changed.
Now When I run my application the customcolour which I added is not displayed in the bitmap as background.
Iam using this bitmap as an image in my CTreeCtrl,which is created at runtime.
I have my CTreeclass: public CTreeCtrl
In the OnInitDialog,I do as follows:
m_ImageList.Create(IDB_MRO_IMAGELIST, 16, 1, RGB(255, 255, 255)))
m_wndTree.SetImageList(&m_ImageList, TVSIL_NORMAL);
//m_wndTree is my class derived from CtreeCtrl
Thanks...
|
|
|
|
|
Did you load correct palette before you started adjusting color?
If not load pallete. Menu/Image/Load palette. You need to find file *.pal which has 256 color. After you load it you will see all 256 color. The rest you doing correct. VS6 may not show all 256 colors but I am no sure.
sorry if misslead you.
|
|
|
|
|
Thanks for the reply
From where Can I load the *.pal palette(Which one & from where)
|
|
|
|
|
I just send file to your email 256palette.pal
|
|
|
|
|
|
I would
Be FaithFull To Your Work.
|
|
|
|
|
Usman Tasleem Akshaf wrote:
I would
Really why ?
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Usman Tasleem Akshaf wrote:
I would
What change do you want bring with IE settings?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi i have a problem that i couldn't find a solution all over the net here it is:
I want to create dynamic menu item (at runtime) in a dialog modal.
Problem:
I assign the same ID for all dynamic menu items
ON_COMMAND(ID_ALL , OnTreeProgramadapter)
Then everytime I need to insert dynamic menu items I use
submenu1->InsertMenu(1,MF_BYCOMMAND, ID_ALL,"Save" )
This way i can know which one is selected using
GetMenuString(1, s, MF_BYCOMMAND);
Everything is great till now but...
In my program I need to enable and disable my menu item so i used
EnableMenuItem(ID_ALL,MF_ENABLED | MF_BYCOMMAND); //and i tried (ID_ALL ,MF_ENABLED | MF_BYPOSITION)
Only what happens is that only the first menu item (position 1 = last added) that is enabled and disabled as i want
My question is: HOW CAN I ENABLE AND DISABLE ALL THE REST knowing that i always want them all disabled or enabled
thx in advance 4 ur help
PS: i don't want to use different IDs for each new menu item.
/\(-)|\/|/\|)
|
|
|
|
|
Add a message map handler for the command UI
ON_UPDATE_COMMAND_UI(ID_ALL, OnUpdateIDALL)
Then the handler itself will look like this
void CMultipleMenuItemsDoc::OnUpdateID_ALL(CCmdUI *pCmdUI)
{
// Get the menu in question - HOWEVER you do this
CWnd* pWnd = theApp.GetMainWnd();
CMenu* pMenu = pWnd->GetMenu()->GetSubMenu(0);
// Get the string of the menu item
CString strTest;
pMenu->GetMenuString(pCmdUI->m_nIndex, strTest, MF_BYPOSITION);
// Then you can disable or enable it based on whatever criteria you have
pCmdUI->Enable(false);
}
|
|
|
|
|
Thanks for ur concern but i still have a problem
U see i just tried ur suggestion but i am still unable to disable or enable all my dynamic menu items together in fact i can only control the last one i added and the rest i can't control at all
Can u help?
/\(-)|\/|/\|)
|
|
|
|
|
Halawlaws wrote:
Problem:
I assign the same ID for all dynamic menu items
[...]
Only what happens is that only the first menu item (position 1 = last added) that is enabled and disabled as i want
Try using a range of IDs (one for each different item) in combination with ON_COMMAND_RANGE / ON_COMMAND_RANGE_EX
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Respected all
I have to display a BitMap using VC++ i did it but now i have to display it on Full moniter Screen,that's after executing VC program the bitmap display on full sceen using 800*600 area of screen.
how i can do ??
David
david
|
|
|
|
|
hi,all
I got a problem about ole, now I'm developing a program to read PDF file as IE does. I made it to be a activex document client program, and using it to read *.doc or *.xls or even the activex document file which produced by my own activex document server program, it works fine, but when I tried to open PDF file, a message box popped up, and it said "no much memeroy enough to run it",and I traced to code, found it was popping up when COleClientItem::Activate(nVerb, pView, lpMsg) was being called.
how can I open pdf successfully? thanks, regards.
|
|
|
|
|
Hi all,
I want to run an exe file on a computer in a local network.
How to do this?
Please help me.
Cheers,
MILAD.
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
|
I am new with C++, I am a VB6.0 Programmer, and I want to create a automated DLL in C++ that will be interfaced to VB6.0.
I Selected MFC AppWizard(dll) to create a new project, then I selected "Regular DLL Using MFC" and checked "Automation" from wizard options.
Then I added class and methods using View->Class Wizard, put some codes in it, then compiled (F7).
When I instantiated it with VB6.0 this error occurs:
Run time error '429'
ActiveX can't create Object
Did I miss something? I did modify the default compilation settings, does it have something do with this?
AI hope you guys can help me.
Thank You.
THEALCA
|
|
|
|
|
Try ATL Dlls,
They are more powerful!
Cheers.
|
|
|
|
|
It worked, thanks a lot!!
|
|
|
|
|
I am looking for a way to obtain the location of the "Temporary Internet Files" using WinInet. Does anyone know?
|
|
|
|
|
Ok, got it. Its using shell and not wininet. SHGetFolderPath with CSIDL_INTERNET_CACHE.
But I see two locations where Temporary Internet Files folder exists. One in C:\Documents and Settings\username\Local Settings\ and the other in C:\Documents and Settings\username\Local Settings\Temp - does any one know what is the second one? The contents of this folder dont get cleared when I delete files from IE tools options. Thisis there both on winxp and win2k.
Thanks in advance.
|
|
|
|
|
Hi
I am using the following code to set my work area and to hide the task bar.
<br />
::ShowWindow(::FindWindow(_T("Shell_TrayWnd"), NULL));<br />
CRect rectWorkArea = CRect(0, 0, ::GetSystemMetrics(SM_CXSCREEN), ::GetSystemMetrics(SM_CYSCREEN));<br />
SystemParametersInfo(SPI_SETWORKAREA,0,&rectWorkArea,SPIF_SENDCHANGE);<br />
When I set my application to full screen/maximize (or any other application actually), the application will not use the space occupied by the hidden task bar, nor will I be able to resize it to use the area. I can drag it to occupy the space, but I have also noticed the window outline for dragging doesn't get display there either.
When I do a SPIG_GETWORKAREA later, it still shows the old work area that includes the task bar.
The Taskbar app found on code guru also exhibits this behaviour.
Has anyone else had this problem and how did you get around it?
I am using Windows 2000 SP4, but it also happens on Windows XP SP2.
Thanks in advance.
|
|
|
|
|
Oops, looks like it was my fault. It looks like my WM_GETMINMAXINFO message handler was misbehaving. If I set bHandled = FALSE it seems to work now.
|
|
|
|
|
Hello. I've been wondering, when an exception is thrown (i.e. by using throw keyword) and there is no catch clause available, is there any function or subroutine that will be executed before the program finalizes? Is atexit called when such an exception is thrown?
Thanks.
KK.
One day you'll find
that I have gone,
for tomorrow may rain, so
I'll follow the sun...
|
|
|
|
|
Yes, it's possible to write a handler for any uncaught exceptions for your applications. I'm not sure if it's done by a try/catch at the top level, or if some other mechanism exists though.
Christian Graus - Microsoft MVP - C++
|
|
|
|