|
Hi
How can I get mother-board serial number, programmaticaly?
Ernst
Thanx
|
|
|
|
|
My second attempt at this question ( Internet at work is screwed, especially for CP ).
I have a combo box in Win32, and I want the edit control to work. It appears I need to catch the <enter> key being pressed and impliment the behaviour I want. Spy++ can find WM_KEYDOWN?CHAR?KEYUP being called, but it is not called to the combobox ( subclassed it, nothing ) or the parent dialog ( nothing again ). Can anyone tell me what the (%#(%(# is going on and how I am supposed to do this?
Thanks.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Gotta ask the obvious first - Have you set the combo style correctly (should be drop-down, not drop-list)?
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and ![Beer | [beer]](https://codeproject.freetls.fastly.net/script/Forums/Images/beer.gif)
|
|
|
|
|
Fair cop - yes, and yes, I can edit, but <enter> beeps and that's all. No messages anywhere, as above.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
hmm, I'm not quite clear on whether the edit box portion works at all. When you type, do the characters appear at all? Or do you just get a beep? Or both?
To answer your original question, you don't have to do anything special, since the combo box manages the edit box portion itself.
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and ![Beer | [beer]](https://codeproject.freetls.fastly.net/script/Forums/Images/beer.gif)
|
|
|
|
|
I've created a box with CreateWindow and the style "COMBOBOX", and the DROPDOWN style. I can add and remove strings programatically, and select them. I can type in the edit box and strings appear. When I hit enter I get the bell, but the text I have typed remains and does not appear in the list box.
If the combo is supposed to handle it, it sounds like something has gone horribly wrong.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
The edit control is a child of combo - are you subclassing a combo itself or edit control hosted in the combo?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I've created a Combobox with a call to CreateWindow, with the COMBOBOX class. The resulatant HWND passed back is what I have subclassed using SetWindowLong. I don't know how to get to the edit HWND from where I am, or subclass it, and I think that is my problem.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
AFAIR, the child ID of the edit is 1001. Use Spy++ to check this; it's not documented, but remains the same since Win 3.x.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks. Michaels comments have left me worried I have a deeper problem, but I'll try that tomorrow and see how I go.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Could you tell me how to encode/decode Mpeg4.
Now I want to develop a Mpeg4 encoder/decoder.Is there any dll file and user guide for me. If you have pls email me. Thanks!Xiaodi80@yahoo.com.cn
|
|
|
|
|
|
Hey all!
I developed an ActiveX control for IE.
However - IE uses CTRL+B, CTRL+I, CTRL+TAB and CTRL+F4 as accelerators - and I need to get those keystrokes in the ActiveX!
I tried subclassing one of IE's windows (the parent of the parent of my ActiveX's window) - and I managed to trap the WM_COMMAND that is generated by those key combinations and keep it from reaching its target.
That was really fun, BUT -
1. It's a bit impolite + those commands won't work even from IE's menu right now - and I prefer not to block them completely.
2. I was wondering if the notification code used in the WM_COMMAND for those commands is the same across all version of IE, and what the chances are of it STAYING the same, in case that it is.
I also thought about modifying the accelerator table that IE installed - but I didn't find any way to retrieve it (except for retrieving it directly from the resources).
Any idea? Please?
Thanks!
|
|
|
|
|
There is a great article located here:
http://www.codeproject.com/combobox/customcombo.asp
I have demo project of the code implemented. It's a custom drawn
CListBox. My problem is, I have text which is sometimes really short, just one line and sometimes really long, 3-4 lines. I want to expand the above article so that it has multiple lines for a row. There is an article
here:
http://www.codeguru.com/controls/multiline_listbox.shtml
which shows how to create multiple lines for a row in a CListBox. But I am having a really hard time combining the two articles into one.
Please, please, please, please, please, please, please, can someone help me combine the two articles into one demo project? I have demo projects of both.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
I need to know when the text in a CEdit control is too long to display in the control. The control has the ES_AUTOHSCROLL style set and is read only. The problem is that EN_MAXTEXT is only sent when the text length exceeds the value returned by GetTextLimit() as the number of chars but as the control uses a proportional font the number of chars that will fit in the control will vary depending on the actual text.
So how can I do this?
The text is being added programmatically.
Thanks,
Parish
while (!asleep)
code();
|
|
|
|
|
You could monitor EN_CHANGE (or is it EN_CHANGED?)
Get the current text. Use one of the GetTextExtentPoint32 routines to get the length of that text.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Hmmm, I was beginning to think that I would have to do the size comparison myself. This is not good, IMHO, as this fuctionality must be built into the control so, when the WS_HSCROLL is used with a multi-line control, it can determine when to enable/disable the horizontal scrollbar.
Thanks for the quick reply, I'll take a look at GetTextExtentPoint32.
Regards,
Parish
while (!asleep)
code();
|
|
|
|
|
Sure, it is code already in the control, but not exposed to the developer. (Unless I missed it.)
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Hi Tim,
I followed your suggestion and used GetTextExtentPoint32() but something's not quite right. Can you help out please?
This is my code:
CString line;
// Code to populate ``line''
m_edit3.SetWindowText(line);
RECT rect;
m_edit3.SendMessage(EM_GETRECT, 0, (LPARAM)&rect);
CDC *cdc = m_edit3.GetWindowDC();
HDC hdc = cdc->GetSafeHdc();
SIZE Size;
GetTextExtentPoint32(hdc, (LPCTSTR)line, line.GetLength(), &Size);
but the following values are returned:
rect.left 4
rect.top 1
rect.right 394
rect.bottom 14
so the formatting rect of the edit control is 390 x 13, but Size contains the following:
Size.cx 552
Size.cy 16
The string (line) contains 72 chars and only the last 3 chars are outside the edit box.
Do these 2 values (rect & Size) use different units?
Any help would be greatly appreciated.
Regards,
Parish
while (!asleep)
code();
|
|
|
|
|
I'm trying to put strings in a richedit box I made with the Microsoft's Active X control in MFC, but it just won't work. Hope somebody can help me.
Thx. Lio.
|
|
|
|
|
Post your code.
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and ![Beer | [beer]](https://codeproject.freetls.fastly.net/script/Forums/Images/beer.gif)
|
|
|
|
|
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
When did he say that ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
That's from the last radio show, when the Lintillas and the anticlones get married so the anticlones can kill the Lintillas.
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and ![Beer | [beer]](https://codeproject.freetls.fastly.net/script/Forums/Images/beer.gif)
|
|
|
|
|
??
I have an owner drawn control. It calls SetFont, then MeasureItem, then DrawItem for each item. Is there any way of calling MeasureItem each time DrawItem is called? Or is there a way to get a handle on
LPMEASUREITEMSTRUCT lpMeasureItemStruct
So that I can call MeasureItem again.
Please, please any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
I was wondering if anyone could recommend an array class\template that would work with the following array classes within classes?
class Third
{
public:
int m_data;
double m_price;
};
typedef CArray< Third > ThirdArray;
class Second
{
public:
int m_data;
ThirdArray m_ThirdArr;
};
typedef CArray< Second > SecondArray;
class First
{
public:
SecondArray m_SecArr;
};
CArray does not like this because of the protected copy constructor. I need to be able to make copies easily of the class First.
Any ideas?
Giles
|
|
|
|