|
YaronNir wrote: ...probably you haven't seen it??
Yes, I saw it, but the question was a bit unclear.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
i have 2 types of buttons in my app, ones i create dynamically using Create Method and by this the OnChildNotify with WM_CTLCOLORBTN working 100% ok. the other type is resource buttons, where i place them in my resource editor on my dialog, and then in my code i use
void CDlg::DoDataExchange(CDataExchange* pDX)
to add a member to my button with the type of MyButton....but in this situation, i don't see the font change??? i've i place a break point (in debug mode) i do step in the if (CTLCOLORBTN == message) and i see the selectobject with my phone, but the result is not font changing but the font i see in the resources...
any ideas?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
That was a mistake on my part. The CFont object should be a member of the dialog, and created in the constructor. In OnInitDialog() , call SetFont() for each of the buttons.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: In OnInitDialog(), call SetFont() for each of the buttons.
this is what i wanted to avoid.....that is why i created my class.....
any workaround?
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Try:
CMyButton::CMyButton()
{
LOGFONT lf = {0};
_tcscpy(lf.lfFaceName, _T("MS Sans Serif"));
lf.lfHeight = 28;
lf.lfWeight = FW_BOLD;
m_font.CreateFontIndirect(&lf);
}
void CMyButton::PreSubclassWindow()
{
SetFont(&m_font);
CButton::PreSubclassWindow();
}
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
my msdn didn't find the proper article, can u send me a url to the online article please?
thanks
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Why did you not just Goggle for it?
Q179378
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
thanks works like a charm
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
YaronNir wrote: is there a way to open the folder dir selection in a specified folder?
This requires a callback.
A quick search in the forum showed e.g. this article[^] as an answer to this all-time-favorite question.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
thanks!!!
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Hallo ,
I have the following problem: in a simple windows application "DynamicLoad.exe" a dll "DefExported.dll" is loaded. If I quit
the dll in InitInstance() with return FALSE instead of return TRUE,
I get memory leaks in the debugger at the end. Is it possible to change this?
Detected memory leaks!
Dumping objects ->
{96} client block at 0x0035A150, subtype c0, 64 bytes long.
a CDynLinkLibrary object at $0035A150, 64 bytes long
Object dump complete.
The program '[444] DynamicLoad.exe: Native' has exited with code 2 (0x2).
(Remark: FreeLibrary( hClcltr ) does not change anything, because return False results in 0 for HINSTANCE hClcltr=LoadLibrary("DefExported.dll").)
The problem is independent of the Microsoft Visual Studio Version (e.g. 6,7,8). The code to try out this, you can look at the page of "DLLs
are Simple! Part 3 By Mahmood Komeily" on this forum.
Just add in DefExported.cpp:
BOOL CDefExportedApp::InitInstance()
{
CWinApp::InitInstance();
return FALSE;
//return TRUE;
}
And in DefExported.h:
class CDefExportedApp : public CWinApp
{
public:
int Multiply(int ParOne,int ParTwo);
CDefExportedApp();
virtual BOOL InitInstance();
...
}
|
|
|
|
|
Check the dynamically allocated memory
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Thank yor for the fast answer.
I myself haven't forgotten to delete again new allocated memory.
Some memory allocations in the Microsoft code causes the leaks.
Maybe there exist work arounds: it's not necessary to quit the dll in
InitInstance(), it could be elsewhere. But in the dll it should be
decided that a loadlibrary-call returns with zero.
I thougth that this could be done best in InitInstance.
|
|
|
|
|
Is it possible to use unmanaged MFC classes from C#?
|
|
|
|
|
|
No just exported mfc classes.
|
|
|
|
|
Hi friends,
We are trying to Install Delegate, to be working alongwith the Vnc.
At the time of installing, we are encountering error.
Error is "cannot load Z".
We are executing 5LoavesSvc.exe on the remote machine which is running vnc server,but it vanishes from the Task manager,
Can Anybody help us out in sorting the problem.
With Rgds
Girish
Software Developer
|
|
|
|
|
Hello everybody
I want to start to programming a C++ chat small application. It my project.
Now I want to know what should I know? From to start? How to start? what I need?
All what I have now is visual C++ express and little c++ langauge experience. I know also that I have to make server code and client code.
Any one could guid me to some site where I might get help regarding my project?
Tahnks alot
Ajmi
|
|
|
|
|
moloza wrote: All what I have now is visual C++ express and little c++ langauge experience.
Which is a big indicator that you should probably start with something a little less ambitious. It's not my intention to burst your bubble, or thwart your desire to learn, but going about this project without even knowing where to start is akin to going up to the plate with two strikes against you (baseball analogy). It's going to be hard to pull it off.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: plate with two strikes against you (baseball analogy).
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
DavidCrow wrote: (baseball analogy)
Somewhat incomplete though. More like going to the plate "for the first time ever" already having two strikes.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
My program needs two same-model webcams , but when I connect them to my
computer, one of them that connected second , doesn't work and in device
manager in second device status this apears :
"This device cannot start. (Code 10)"
I need help to solve it
thank you
note : I dont want to solve it in my code,I just want to use two same-model webcams
-- modified at 9:33 Monday 8th May, 2006
|
|
|
|
|
Does the driver support two devices/cameras simultaneously?
My guess is a driver problem. Check the manufacturers web site.
|
|
|
|
|
no , it wasn't a problem of driver , I installed another driver ... nothing , and I know that another person solved it .
|
|
|
|
|