|
One way would be to run a registry-watching program (e.g., Process Explorer) while this piece of code executes. Then you can see what key(s) are being read.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Very good idea. I think I would try this solution too, however, the location from HARDWARE\... seem to show what I need it.
|
|
|
|
|
What if the underlying API retrieved the information from the registry?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
That is why I guess I can get this information directly from registry, not from API. It is a presume though ...
|
|
|
|
|
You can find the vendor identifier with CPUID. The same mechanism can be used to find out what features the CPU supports, which is normally more useful than merely knowing the vendor, obviously it depends on what you want.
|
|
|
|
|
- As someone already mentioned, the CPUID instruction gives you this information. It may be called using compiler intrinsics (#include <intrin.h>) on the Microsoft compiler. See here for fuller documentation. Pay attention to the EAX=0 function (Get Manufacturer ID).
- It appears that the same information may be found in the Registry at HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\VendorIdentifier
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
|
please, help me .i cant find the 1000 factorial program.
|
|
|
|
|
Assuming you mean 1 * 2 * 3 * ... * 998 *999 * 1000, then I have bad news for you. The result when written out has 2568 digits in all. That is far more than even a 64 bit integer can express. So, either you have misunderstood your assignment, or you are supposed to be working with some arbitrary precision library. In either case, we don't do homework for you. If you have tried something and are stuck, we're happy to help point you in the right direction.
|
|
|
|
|
You may have a look at boost multiprecision library . This page gmp_int - 1.58.0[^] looks promising (see the code sample).
|
|
|
|
|
It's in the top cupboard by the door.
|
|
|
|
|
Developers don't find programs; they create them. Get started!
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
hello every one please am working on a project where by on one of the class am ask to creat class board with enum so i have struggle but am not able to display. the question is " in class booard Define a C++ enumeration (enum struct) with values for no meals, breakfast, half pension and all inclusive as well as a related overloaded binary output operator."
expected output "
a all inclusive
b breakfast
h half board
w without meals
your choice:h "
please i need some one help
|
|
|
|
|
What about The Documentation?
And other resources?
.
|
|
|
|
|
I have created a CCombobox drop down and added three data through wizards and disable editing. I wanted to display some data/word initially in the edit ctrl part of the CCombobox before selecting the data present in the drop down.I having difficulty achieving this, could I have some pointers regarding this.
Thanks in advance.
|
|
|
|
|
To display some existing (in the combo listbox) item use CComboBox::SetCurSel.
To display some arbitrary text you could use SetWindowText method.
|
|
|
|
|
Thanks for replying.
Yes, I've tried using SetWindowText method. It's not showing in the combo box.
What I wanted was when I start my application it shows something like "please select something" before I select anything.
For edit ctrl box... We assigned something to the CSting variable and do UpdataData(FALSE).. I wanted to do something similar like this.
Thanks again.
|
|
|
|
|
Member 14575556 wrote:
What I wanted was when I start my application it shows something like "please select something" before I select anything. Are you doing something like:
m_list.AddString(_T("Item 1"));
m_list.AddString(_T("Item 2"));
m_list.AddString(_T("Item 3"));
m_list.AddString(_T("Item 4"));
m_list.InsertItem(0, _T("please select something"));
...
m_list.SetCurSel(0);
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Member 14575556 wrote: Yes, I've tried using SetWindowText method. It's not showing in the combo box.
It does work for me.
Perhaps, you used DropdownList combo?
|
|
|
|
|
Victor Nijegorodov wrote:
Perhaps, you used DropdownList combo? Is that an MFC control?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Yes. I meant the MFC combobox with CBS_DROPDOWNLIST style.
|
|
|
|
|
Yes, I used MFC combobox with CBS_DROPDOWNLIST style.
|
|
|
|
|
Member 14575556 wrote: Yes, I used MFC combobox with CBS_DROPDOWNLIST style.
Then you will only able to display a string already inserted in the combo listbox. Use either CComboBox::SelectString or CComboBox::SetCurSel.
|
|
|
|
|
|
Thank you. This really match with what I wanted to do.
|
|
|
|