|
hey guys........
iam desperately in need of help guys......
am running short of time.
can anyone help me in this....?
|
|
|
|
|
better u create a control variable for the edit control. then usings GetWindowText function, get the text in edit control as string. then convert the string to double using sscanf or some other convertion functions..
nave
|
|
|
|
|
i need this value to be user-selectable so that I type in 3.45 on the Formview page.
If i get it as string then how do i select the values .....as they are randomly chosen values.
how do i do it?
|
|
|
|
|
sorry i didn't understand....
do u mean u want to limit the values in a range( say from 3-10 t0 4.45 )?
nave
|
|
|
|
|
thanks for ur response.
I want the range to be say -10 to +10 but i should be able to select values like for eg., 1.5, 4.6, etc.,
I have created member varaible as double for this and hence can limit the range from -10 to +10 but i cannot choose values like 1.5,7.8 .
if i do , the values get rounded to 2 and 8 repesctively.
these values are to be chosen at randon and during runtime ..
how do i do this?
|
|
|
|
|
there is some thing wrong with ur code...
I tried creating a double variable for the edit control. and its works fine.
in my code its not geting rounded..
if i give 1.5, it gives exactly 1.5 in the variable..
How did u examined the value in the variable u created?u debugged?
nave
|
|
|
|
|
I use VC++6.0
I created edit control on the formview page and then used class wizard to create the member variable for this edit control and chose it as double.
Now if I compile /build my program, then if i try to type in the edit button as 1.5 it rounds to 2 automatically. It is that I cannot type in values like 1.5 on the edit page.
I dont round it anywhere in my code.
How did u debug?
I am new to this programming n still in the learning curve.
|
|
|
|
|
1 .Put the following code in some place of the code.
UpdateData( TRUE );
double x = m_edit;
2. Put a break point in the line "double x = m_edit;" ( Break point can be inserted by pressing the f9 key )
3. Now press f5 to start debug
4. When the execution reaches the following code, it will break
5. Move the mouse cursor over to the m_edit variable. the value in that variable will be displayed as tool tip
nave
|
|
|
|
|
I have read that heavy using 'new' and 'delete' operators frequently could lead to memory fragmentation in the heap and hence whereever possible limit to using variables declared in the stack.....
So herez my question with regards to memory fragmentation in the heap:
Does this imply with CString as well???...
or does windows handle this using 'placement new' ??
|
|
|
|
|
|
toxcct wrote: hi, rateep,
how do u know his name is rateep?
nave
|
|
|
|
|
|
u were previously v2.0(an alien) right?
nave
|
|
|
|
|
|
haha, now now why should i possibly hide myself.....i am no shy type u know
FYI : 'namaaskaaram' is a malayalam word which has teh same meaning as that of "bonjour" in french. ;o)
|
|
|
|
|
hey naveen!...
hahha!...what a coincidence!...neeyum codeprojectil!!
cheerz!
|
|
|
|
|
|
Hi Everyone,
I'm looking for some help in displaying a process / program in the notification area of the toolbar. If anyone could point me too a web site or help out with some source it would be very kind.
Regards
Programm3r
|
|
|
|
|
|
hello every1,
I am new to VC++. I have assignement in which i am trying to port VC 6
code to VC 2005. Although I removed some of the common errors, I am
getting some linking errors while building the sol'n.
These are as follows:
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other
libs; use /NODEFAULTLIB:library
USBInfo.lib(USBInfoInterface.obj) : error LNK2019: unresolved external
symbol "__declspec(dllimport) private: void __thiscall
std::basic_string<char,struct std::char_traits<char="">,class
std::allocator<char> >::_Copy(unsigned int)"
(__imp_?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z)
referenced in function "public: __thiscall
CUSBInfoInterface::CUSBInfoInterface(void)"
(??0CUSBInfoInterface@@QAE@XZ)
USBInfo.lib(USBInfo.obj) : error LNK2001: unresolved external symbol
"__declspec(dllimport) private: void __thiscall
std::basic_string<char,struct std::char_traits<char="">,class
std::allocator<char> >::_Copy(unsigned int)"
(__imp_?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z)
..
...
......
........
I am using /MDD while bulding in /debug mode.
what should be done to remove these errors..
plz help me
Thx in advance!
|
|
|
|
|
First, that message is probably incorrect when it says "use /NODEFAULTLIB:library". Second, you can get a lot of useful information by searching the Help for "LNK4098".
I am not sure about the other link errors, but probably they are not directly related to the above. So try to resolve the above and if you still need help then I hope someone can help.
|
|
|
|
|
Hi,
I need to handle text box key down event which i have placed in MFC ActiveX control.
Please explain me.
|
|
|
|
|
Iam switching between tow different exe's by using Findwindow() function int two applications,
void CMainFrame::OnSwitchfod()
{
HWND hwnd = ::FindWindow(NULL, "Bitmap");
if (hwnd)
{
::ShowWindow(hwnd, SW_SHOWDEFAULT);
::BringWindowToTop(hwnd);
}
}
and i code precreatewindow in both application as follows,
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
/*cs.style = WS_POPUP | WS_OVERLAPPED | WS_CAPTION | FWS_ADDTOTITLE| WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_MAXIMIZE;
return CMDIFrameWnd::PreCreateWindow(cs);*/
if(!CMDIFrameWnd::PreCreateWindow(cs))
return FALSE;
if (cs.hInstance)
{
static const TCHAR className[] = _T ("UniqueWindowClassName");
// Get the existing WNDCLASS.
WNDCLASS wc;
VERIFY(GetClassInfo(cs.hInstance, cs.lpszClass, &wc));
// Change the name.
wc.lpszClassName = className;
// Register the renamed WNDCLASS.
VERIFY(AfxRegisterClass(&wc));
// Use the new one.
cs.lpszClass = className;
}
return TRUE;
}
Its working fine,but i click one button in one application,the second application come to front,but it is in minimize mode.I have to maximize that.
My problem is..when i click button it should open in maximized mode.What can i do?
|
|
|
|
|
Maybe you should use ShowWindow in this manner:
ShowWindow(hwnd, SW_MAXIMIZE);
|
|
|
|
|
Ya,
Its working...thank you..
|
|
|
|