|
Found source of my problem. Some time ago I set _NT_EXPR_EVAL=c++ to experiment with C++ expression evaluator and forgot to disable it after.
|
|
|
|
|
Great tip
I don't use winDbg much, how good is it, where can i find more info about winDbg?
Master.. Master.. where are the dreams that i've been after...
|
|
|
|
|
I'm not sure of any WinDBG "how to" - Probably a good idea for an article for someone. The reason I started using it is that produces good stack traces and can analyse crash dumps.
Steve
|
|
|
|
|
Hi all,
I found that there is some margin in the left side of the EditCtrl and the text inside it. It depends upon the font that set to the EditCtrl. Do anybody know how to calculate that margin?
Thank you.
- NS -
|
|
|
|
|
Use WM_NCCALCSIZE and WM_NCPAINT to trigger a WM_NCCALCSIZE .
Nibu thomas
Software Developer
|
|
|
|
|
I just want to read that margin size.
- NS -
|
|
|
|
|
Use GetWindowRect to get window dimensions
and
Use GetClientRect to get client area dimensions. The difference is the NC area or the border.
GetWindowRect returns screen coordinates. So you may have to convert any of them to either form.
Nibu thomas
Software Developer
|
|
|
|
|
I did the following.
CRect WndRect, ClientRect;
m_Edit.GetWindowRect( &WndRect );
m_Edit.GetClientRect( &ClientRect );
m_Edit.ClientToScreen( &ClientRect );
int nMargin = ClientRect.left - WndRect.left;
I got nMargin as 2. I know that is the border width. But actually there is a space Inside the client left and text. I mentioned that as the margin. I set the font as Arial 14, and from screen shot of the control I can measure this margin is about 8 pixels wide.
- NS -
|
|
|
|
|
Look up CEdit::GetMargins() and the EM_GETMARGINS message. Also CEdit::SetMargins() and EM_SETMARGINS.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Wow...! It is working fine. Thank you.
One more question,
Can I guess it without having an EditCtrl. But the font is with me.
What I need is I have to make an static text control to be same as edit ctrl.
Hope you got what I meant.
- NS -
|
|
|
|
|
NS17 wrote: What I need is I have to make an static text control to be same as edit ctrl.
Why do you want to do this? A readonly edit control should suffice!
Nibu thomas
Software Developer
|
|
|
|
|
But I dont need the text caret and text selection.
- NS -
|
|
|
|
|
NS17 wrote: But I dont need the text caret and text selection.
Then CBS_DROPDOWNLIST should be it.
From the docs:
CBS_DROPDOWNLIST: Similar to CBS_DROPDOWN , except that the edit control is replaced by a static-text item that displays the current selection in the list box.
Nibu thomas
Software Developer
|
|
|
|
|
Exactly pal...
But the problem they are not the same.
- NS -
|
|
|
|
|
NS17 wrote: But the problem they are not the same.
Why do you think they are not the same? It what way do they differ!
Nibu thomas
Software Developer
|
|
|
|
|
Just a simple example can show the difference. If we place two ComboBoxes, one CBS_DROPDOWN and other CBS_DROPDOWNLIST, and the font to be Arial 14, we can see the difference in margin.
- NS -
|
|
|
|
|
NS17 wrote: If we place two ComboBoxes, one CBS_DROPDOWN and other CBS_DROPDOWNLIST, and the font to be Arial 14, we can see the difference in margin.
I am still confused as to what you want to achieve? Lol.
Nibu thomas
Software Developer
|
|
|
|
|
I have created a custom combo box from CComboBox. It should fully ownerdrawn. So I have to make all colors configurable. For DropDown ComboBox there is no problem yet. But in DropList this is not the case. When this combo is disabled the colors cannot be configured. So I put a static text control above the text area of that combo as child programatically. Now I need to give a margin in the left side.
- NS -
|
|
|
|
|
NS17 wrote: So I put a static text control above the text area of that combo as child programatically. Now I need to give a margin in the left side.
Instead of putting another static control why don't you use the existing one!
Nibu thomas
Software Developer
|
|
|
|
|
Actually there is not such a one. ComboBox is painting the text itself.
- NS -
|
|
|
|
|
Does vc++ allow nested comment as in Boraland
any compiler option for that.
/*some comment
/*second line*/
*/
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
the C++ language specification tells that:
- every comment that begins with // will end and the end of the line it was found, unless the last character on the line is \ ; in this case, the comment continues on the next line.
- every comment that begins with /* will end at the first occurence of the sequence */ .
so, the only nested comments allowed are the following :
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
NS17 wrote: Yes, it supports.
No compiler options are needed for that.
Are you sure?[^]
Nibu thomas
Software Developer
|
|
|
|
|
Yes, you are right.
I will delete my answer.
- NS -
|
|
|
|
|
Hi,
while Loading my project in visual studio 6 Iam getting two dialog boxes with OK button.
The first box telling that,
"Lines ending with only a carriage return have been detected. These will be modified to include a line feed"
And second Dialog box Showing a message of,
" This file contains invalid charracters that will be converted to ' . 's. "
What might be the Reason ?
|
|
|
|