|
how can i get physic memory size and information of chassis
am
|
|
|
|
|
GlobalMemoryStatusEx(...)
Nibu thomas
Software Developer
|
|
|
|
|
Visible_Info wrote: Use GetSystemMetrics
How do you propose using GetSystemMetrics() to get the "physic memory size and information of chassis" as the OP has requested?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
how can i get physic memory size and information of chassisusing visual c++
am
|
|
|
|
|
Hi all,
How can i make a folder or directory inaccessible to be edited or viewed of its internal structure?
Kindly Guide.
Regards,
Ankush Mehta
|
|
|
|
|
I don't think you can do it.
Of course you can hide the folder but for making it inaccessible to be edited or viewed I don't think there is an API for that.
Nibu thomas
Software Developer
|
|
|
|
|
Are you wanting to do this programmatically, or use the OS to do it for you?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Programmatically..
Ankush Mehta
|
|
|
|
|
|
Hi Guys,
I have added one edit control to a dialog and attached a string variable to that. But i want only integers can be entered to the edit control and not characters.(N.B. I have attached a string variable to that edit control because i want that value to be received as string. Please help.
|
|
|
|
|
Subclass CEdit and handle WM_CHAR message.
If the char entered is a valid number then call base class implementation else you can ignore the char.
Nibu thomas
Software Developer
|
|
|
|
|
Instead of creating the control variable of edit box as string, use integer type. if u wan to get the number as string just use the "Format" function of the CString.
Then set Number (ES_NUMBER) style of the edit box, which only allows interger to enter.
nave
|
|
|
|
|
There is another way toooooooo
Add the Number style to Edit. Whenever you want text in the edit box, Just call
GetWindowText()
nave
|
|
|
|
|
Thanks a lot to all of you as all are good suggestions. But as per my requrement i feel "Add the Number style to Edit" will be the best solution. But i do not know exactly how to set it and also i am not able find the same.
Nave,
Can you please tell me how to set this style.
|
|
|
|
|
|
right click on the edit box -> take style tab
There u can find the a check box named Number
nave
|
|
|
|
|
on the resource editor, there is a "decimal" property which make the editBox accept only the 10 decimal digits...
if you'd like to allow the . character, or a sign character like + or - , you'll have to overload the WM_CHAR event...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
|
|
|
|
|
Hello i have a menu resource that i want to attach to a Window and i don't know how to do it
Thank you very much for your help
A C++ illiterate...
|
|
|
|
|
First Load menu resource using LoadMenu(...)
Second Set menu for the frame using SetMenu(...)
For eg:
CFrameWnd *pFrameWnd = (CFrameWnd *)AfxGetMainWnd();
CMenu cmenu;
cmenu.LoadMenu(IDR_MYMENU_RESOURCE)
pFrameWnd->SetMenu(&cmenu);
pFrameWnd->DrawMenuBar(); Nibu thomas
Software Developer
|
|
|
|
|
|
Mahhouraaaaaa wrote: dlg.SetMenu(&Menuone.m_hMenu);
dlg.SetMenu(&Menuone);
Nibu thomas
Software Developer
|
|
|
|
|
CTest1Dlg dlg;
CMenu Mymenu;
Mymenu.LoadMenu(IDR_MENU1);
dlg.SetMenu(&Mymenu);
dlg.DrawMenuBar();
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
//------------- Blablabla
this code is located in the main class of the program so that it shows NO ERRORS ..and NO MENU ... i'm sorry for buggin' you but i need help thank you
-- modified at 4:30 Tuesday 28th February, 2006
|
|
|
|
|
Mahhouraaaaaa wrote: CMenu Mymenu;
Mymenu.LoadMenu(IDR_MENU1);
dlg.SetMenu(&Mymenu);
dlg.DrawMenuBar();
Transfer the above code to OnInitDialog .
Nibu thomas
Software Developer
|
|
|
|
|
on the resource design editor, open your dialog/frame and check its properties ; you'll find a "menu " option... there, change it for you IDR_MYMENU
please, don't leave it as IDR_MENU1 as the wizard autogenerate ; give it a more significant name
TOXCCT >>> GEII power [toxcct][VisualCalc 2.24][3.0 soon...]
|
|
|
|
|
Thank you Nobi thomas and thank you txcct
Thank you very much
as i said i don't know anythin' in C++ :> :p
|
|
|
|