|
In the propertysheet constructor you put the following
m_psh.dwFlags |= PSH_NOAPPLYNOW;
m_psh.dwFlags &= ~(PSH_HASHELP);
and in each of the propertypage constructors put
m_psp.dwFlags &= ~PSP_HASHELP;
Then the help and apply buttons will be removed.
|
|
|
|
|
i was wondering, in a combo box, in order to add item we can just go to properties and add them one by one n separate them by pressing ctrl+Enter. But, do I still need to declare those items in the codes(eg. using AddString)? I'm using VC6 and using a dialog based application.
Thanks in advance.
|
|
|
|
|
Did you try it? What happened?
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
cyn8 wrote: But, do I still need to declare those items in the codes(eg. using AddString)? I'm using VC6 and using a dialog based application.
no, you already added them to control!
"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
Support CRY- Child Relief and you
|
|
|
|
|
Hi everybody,
can anybody please direct me to a web site or an article (I could not find anything helpful) about how to make controls to be transparent. I use Visual Studio 2005 to make a Visual C++ dialog based application, and I use ATL only. Even though I specify a static control should be transparent, it is not. The background is static, it does not change, but neither static controls nor the captions of group box controls are rendered transparently.
Thanks for your help.
|
|
|
|
|
Okay, I found it:
I need to handle the message OnCtlColorStatic:
::SetBkMode((HDC)wParam, TRANSPARENT);
return (LRESULT) GetStockObject (HOLLOW_BRUSH);
and my static controls are all transparent.
But I can still not make group box captions to be trtansparent.
Thanks.
|
|
|
|
|
damir_tk wrote: But I can still not make group box captions to be trtansparent.
Good luck with a trackbar control as well
|
|
|
|
|
Haha...no, I am not going to deal with that one. Anyways, if you know how to make the group box caption transparent, I would really appreciate it. Thanks.
|
|
|
|
|
damir_tk wrote: Haha...no, I am not going to deal with that one
Same problem with a groupbox. You can make it owner drawn and draw it yourself (it's a button).
If only WM_EX_TRANSPARENT style was implemented for all controls...
|
|
|
|
|
How can a user-mode client achieve direct access to kernel streaming(KS) filter in video capture? I know there is a sample from microsoft using KS in audio rendering and capture. Is KS feasible in video capture? Any suggesion and samples will be appreciated.
|
|
|
|
|
I'm doing some experiments on generic algorithms and I have a problem getting for_each to work. The documentation isn't really clear on how to use this algorithm and I was hoping anybody can help me with a small sample on how to use the for_each algorithm.
WM.
What about weapons of mass-construction?
|
|
|
|
|
(copy pasted from the SGI stl pages.
template<class T> struct print : public unary_function<T, void>
{
print(ostream& out) : os(out), count(0) {}
void operator() (T x) { os << x << ' '; ++count; }
ostream& os;
int count;
};
int main()
{
int A[] = {1, 4, 2, 8, 5, 7};
const int N = sizeof(A) / sizeof(int);
print<int> P = for_each(A, A + N, print<int>(cout));
cout << endl << P.count << " objects printed." << endl;
}
for_each will loop the elements in the sequence ( bounded by the range ), and apply the operator to each element and then returns the count.
in this case, it will print each item in the array.
it's a shortcut to a normal for loop.
|
|
|
|
|
Thanks for the sample, this explains it
I knew it was a shortcut for a for-loop, but I didn't expect it to be this complicated for a beginner.
WM.
What about weapons of mass-construction?
|
|
|
|
|
the learning curve for STL is steep; once you get the grip of it, it's a ton'o'fun.
|
|
|
|
|
It doesn't have to be that complicated. Consider this example:
-----------
#include <iostream>
#include <vector>
#include <algorithm>
void PrintInt(int num)
{
using namespace std;
cout << num << " ";
}
void main()
{
using namespace std;
vector<int> Values;
for (int i=1; i<=10; ++i)
{
Values.push_back(i);
}
for_each(Values.begin(), Values.end(), PrintInt);
cout << endl;
}
Steve
|
|
|
|
|
In the .H file, the member function is defined as:
ToggleFreezeRequest(const int i = -1);
In the .CPP file, the member function is:
void CSystemControlData::ToggleFreezeRequest(const int value)
{
.
.
.
}
When this member function is being called, it is thus:
sysCtrl.ToggleFreezeRequest();
I'm confused as to what is actually happening here. What is actually happening when the member function is called from somewhere in the code? Does the parameter ever change from being set to -1?
Thanks for helping to "de-confuse" me on this.
John P.
|
|
|
|
|
The function has a default parameter, i.e. if it's called without specifying the parameter (e.g. ToggleFreezeRequest() ) then
the the value of the parameter will be the default one (-1 ). On the other hand, if you call it passing the actual value (e.g. ToggleFreezeRequest(6) or ToggleFreezeRequest(n) ) then the default value it's overidden by the passed one.
Moreover, the formal parameter it is declared as a const , meaning that the function cannot change the value passed.
|
|
|
|
|
jparken wrote: What is actually happening when the member function is called from somewhere in the code?
i is assigned a value of -1 if no argument is supplied. It's called the default argument.
jparken wrote: Does the parameter ever change from being set to -1?
Yes, if another argument is supplied.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank you, gentlemen. That makes it all clear. Much obliged.
John P.
|
|
|
|
|
It means ToggleFreezeRequest() takes an int parameter called i , and if the calling code doesn't specify a parameter, i is set to -1 by default. All the const means is that i can't be changed in ToggleFreezeRequest() .
|
|
|
|
|
I'm beginner. I want to create a text box ,where I cant input text in box ,box = rectangle is created by moving mouse. Thank a lot!
|
|
|
|
|
you want to create an editbox
|
|
|
|
|
bosstroy wrote: I'm beginner.
Are you sure you didn't mean to say infant? You asked this question less than 24 hours ago here[^]. Perhaps you should go and read the suggestions you were given and actually try coding something.
|
|
|
|
|
WalderMort wrote: Are you sure you didn't mean to say infant
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
WalderMort wrote: Are you sure you didn't mean to say infant?
AFAIK, all of us are beginner here [ ] if you sure, then i have to wear nappies
"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
Support CRY- Child Relief and you
|
|
|
|