Oops, I was a little hasty. I also show static text below the button. I call OnCtlColor(*) and set the hbr (HBRUSH) returned to a hollow brush. The text is then displayed over the image. After setting WS_CLIPCHILDREN, the text background is no longer transparent but light gray.
Hello, I have been working on an MFC project that looks like a registry editor which have a treeview on the left side and listview on the right side. Once the user sets focus on one item in the listview and clicks ctrl+c, how do we add a functionality to copy the listview item text into the clipboard? please help.
There is a volume in my hard drive that currently does not has any drive letter. I need to assign a drive letter to this volume. Please suggest me some way to do so.
If a volume has any drive letter already then I can change it's drive letter by getting it's GUID and assign any other drive letter easily. But if the volume does not has any drive letter then how can I get its GUID to assign a drive letter.
If there is any other way to do this please suggest me.
I think you should get familiar with AfxBeginThread([^])
And its usage, surely u will understand how to do that by understanding about AfxBeginThread.
well here is a code. Make the myMainLooFunc with the specified function signature and static(To know why, check the msdn for more help).
static UINT myMainLoopFunc(LPVOID kodata)
pass the class instance to thread proc as argument and call function from there
e *pE = ... //assign running instance of e. assign this pointer if from inside the class e.
//Thread proc definition
UINT fnThreadProc(LPVOID lpParam)
E *pE = (*pE)lpParam;
pE->myMainLoopFunc(); //call any public function in class e.
But I have faced some problems.
My e class Objects just get a HWND object in their contructor argument
and draw something on it, in myMainLoopFunc() method How ever the code runs with no error But nothing drwan in the window.
But without threading it works perfectly.
Do you have any idea what's the problem.