|
|
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.
|
|
|
|
|
Hmm... So the style can not be accepted
- How about EnumChildWindows(..)
(at the ending of your drawing procedure)
and RedrawWindow(..) for each child
in its (of EnumChildWindows(..) ) callback function ?
virtual void BeHappy() = 0;
|
|
|
|
|
I did something similar. After the drawing procedure, I have each button redraw itself, and this appears to be working. Thanks to all for your time and help!
|
|
|
|
|
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.
|
|
|
|
|
|
Hi,
How to put marquee progress bar in win32 under windows XP.
|
|
|
|
|
Create your progress bar with PBS_MARQUEE[^] style.
You can start and stop the animation, and control its speed using PBM_SETMARQUEE[^] message.
|
|
|
|
|
|
I am getting compilation error:
C2065: 'PBS_MARQUEE' : undeclared identifier
I written the code the InitDialog()
HWND hwndProgress=GetDlgItem(m_hwnd,IDC_PROGRESS1);
SetWindowLongPtr(hwndProgress, GWL_STYLE, PBS_MARQUEE);
My application is win32. Please suggest??
|
|
|
|
|
Check your SDK version and the value asigned to the WINVER symbol.
May be the definition of that constant is disabled by a old WINVER number
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
as emilo told, you can see those values in CommCtrl.h as
#if (_WIN32_WINNT >= 0x0501)
#define PBS_MARQUEE 0x08
#endif // _WIN32_WINNT >= 0x0501
#if (_WIN32_WINNT >= 0x0501)
#define PBM_SETMARQUEE (WM_USER+10)
#endif // _WIN32_WINNT >= 0x0501
so check your source code (probably in targetver.h) for #define _WIN32_WINNT and check the value.
Also, you can try defining those values manually in your code as
#define PBS_MARQUEE 0x08
#define PBM_SETMARQUEE (WM_USER+10)
|
|
|
|
|
err... this should be said to the OP not to myself
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
he might have seen it already
|
|
|
|
|
Hi all,
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.
Thanks & Regards
Madan
|
|
|
|
|
If you are asking not related to API, then just check this article from microsoft.
It will help you do that [^]
Величие не Бога может быть недооценена.
|
|
|
|
|
|
How could I run one of my class member Functions in a new thread:
ex:
class e
{
...
public:
void myMainLoopFunc(void){...}
};
I want to run myMainLoopFunc in a new thread what should I do?
|
|
|
|
|
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).
class e
{
...
public:
static UINT myMainLoopFunc(LPVOID kodata)
{
...
}
};
Величие не Бога может быть недооценена.
|
|
|
|
|
pass the class instance to thread proc as argument and call function from there
e *pE = ...
AfxBeginThread(fnThreadProc, p);
UINT fnThreadProc(LPVOID lpParam)
{
E *pE = (*pE)lpParam;
pE->myMainLoopFunc();
}
|
|
|
|
|
Good idea,
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.
|
|
|
|
|
|
sorry But i don't understand your point of view and why should i do this?
|
|
|
|
|
make the HWND to the start parameter of the Threadfunc and construct in the func the new object.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
That made the same problem either, nothing is drawn in the HWND while the dawing methods executed one after another
|
|
|
|