|
Use ILC_MASK |ILD_TRANSPARENT
|
|
|
|
|
Surely this flag needs to be passed to the drawing function IImageList::Draw which would mean custom drawing the TreeView? I don't think it's a style flag.
I've tried, but it makes no difference. I've also made sure that the background colour is transparent with CLR_NONE, but this also makes no difference.
Any more ideas?
--
Simon Steele
Programmers Notepad - www.pnotepad.org
|
|
|
|
|
Well, obviously the icon is not being erased before it is redrawn. I spent a while playing with it, you can get rid of the effect using custom draw to erase it; seems like there should be a simpler way though.
void CaaTreeTestDlg::OnNMCustomdrawTree1(NMHDR *pNMHDR, LRESULT *pResult)
{
LPNMTVCUSTOMDRAW pNMCD = reinterpret_cast<LPNMTVCUSTOMDRAW>(pNMHDR);
*pResult = CDRF_DODEFAULT;
if ( CDDS_PREPAINT == pNMCD->nmcd.dwDrawStage )
{
*pResult = CDRF_NOTIFYITEMDRAW;
return;
}
else if ( CDDS_ITEMPREPAINT == pNMCD->nmcd.dwDrawStage )
{
CDC* pDC = CDC::FromHandle(pNMCD->nmcd.hdc);
pDC->FillSolidRect(&pNMCD->nmcd.rc, pNMCD->clrTextBk);
return;
}
}
farewell goodnight last one out turn out the lights Smashing Pumpkins, Tales of a Scorched Earth
|
|
|
|
|
Thanks for that Shog9 - I was unsure of how to do that and hadn't taken the time to look. I'm assuming the icon is being redrawn as the mouse moves over the text for the items - and the new image is blended with the old. Nasty - bad Microsoft
Any more work-arounds or *fixes* would be gratefully accepted.
Thanks again,
--
Simon Steele
Programmers Notepad - www.pnotepad.org
|
|
|
|
|
Is anybody knows how i can getting some data from memory at addr 0x000F5123 (for example) ? And how i can getting FULL PATH to EXE file in my app ?
---Ranger---
|
|
|
|
|
GetModuleFileName.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
MyType * pType = x000F5123. Be VERY sure you know what you are doing here.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
|
|
|
|
|
Hi Christian.
Get BIOS string under Win98 (this string containing motherboard type and bios rev)
In C++
char *pBiosStr = (char *)0xFEC71; - don't work
In Delphi
biosStr = String(PChar(Ptr($FEC71))) - work
---Ranger---
|
|
|
|
|
If I wasn't at work my caveat would have been longer - what I showed you is almost always a bad, bad idea. The question you need to ask is how do I get the bios information and the answer from me is I do not know.
Sorry I cannot help more.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
|
|
|
|
|
I'm thinking what you want to tinker with isn't process memory, so neither WriteProcessMemory or pointers will work. Your probably gonna have to get at system memory. These bios specs are possibly in the CMOS...but to access CMOS you need to use in/out cpu instructions which cause exceptions I think when running under ring 3(protected mode). Which windows applications run under. You gonna have to use a device driver i'd think.
It works under delphi..??? Is your delphi app compiled into win32 PE..??? Thats weird that it would work...i'm pretty sure your poking system memory, not process...so unless your delphi app is running as a dos/console/win16 type app it shouldn't be able to read system memory.
Cheers
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Yes in Delphi's Win32 apps works (under Win98). Try:
str = String(PChar(Ptr($FEC71))) under Win98
---Ranger---
|
|
|
|
|
You can use a pointer like Christian pointed out, no pun intended...
However I fail to see why you would need to directly write to memory in the current process. If you want to write to other processes (Change variables in a running game or something) then WriteProcessMemory would serve you well.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I don't need write i want check moterboard type when my app is starting. And BIOS memory area - system process ?
---Ranger---
|
|
|
|
|
I need checking on which computer running my app. And i need get motherboard's type from BIOS data.
Some parts of project was written in Delphi other man and i must assemble all parts.
---Ranger---
|
|
|
|
|
If your gonna have to read/write ANYTHING from bios data area you'll need to use interupts, or pull out the byte yerself. In either case (i'm not 100% sure) but you can't do this with windows applications. You'll need to use device drivers i'm almost positive.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Win32_MotherboardDevice WMI class which is under the "Computer System Hardware Classes". For BIOS check Win32_BIOS class.
Atul
100.13714 netdiva
|
|
|
|
|
|
is there anyway to call RegisterClass() and CreateWindow() "dynamically"? i need to make a message pump for a worker thread in an ATL control. Everyone says "make a message pump", so show me how. i dont want to know "what to do" i want to know "how to do it". Thanks, people. Let's see some CODE since this is called "CodeProject" haha Thanks if anyone can help me.
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
Hey, behold the authentic message pump:
MSG msg;
while(GetMessage(&msg,NULL,0,0)!=0){
TranslateMessage(&msg);
DispatchMessage(&msg);
} Jokes aside, every window created within a particular thread can only work if that thread, after window creation, gracefully decays into this message loop. GetMessage returns 0 upon calling PostQuitMessage (usually issued from the WM_DESTROY handler of the thread main window), signalling the thread to exit from the message pump (because no further message processing is required).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
The real message pump.
TradeMark...?
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi all,
I would like to know about making COM objects ?
How can i make a simple COM objects ?
Can you write example for me ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
Hi!
I'm working on a CAD project and I can't seem to get the lighting right. My light source is coming from a fixed direction and so when a shaded part is rotated and is directly facing that light source, it is really shiny. I've tried reducing the light intensity and the shininess but this means that, at certain angles, some parts appear too dark.
Is there any way to reduce the shininess while at the same time avoiding these dark areas? Any help would be greatly appreciated...
Thanks!
Mandy
|
|
|
|
|
I have an mdi applicaiton that has some of the same features as an existing project. I really do not want to redesign everything. So can i import a dialog box from one project into another?
if so how?
Thank you.
|
|
|
|
|
It doesn't seem like you can get VC to save or export dialog resources alone, so you have 2 options:
1) Open the resource.rc file as text and copy the dialog resource info into clipboard. Open the new resource file as text and paste clipboard contents into new file.
2) Make a copy of the resource.rc open it as text and remove all un-nessecary contents.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|