|
Try casting your 0 to (float) 0
Now, they are int's.
|
|
|
|
|
CString strTemp
strTemp.Format("%-60s%-20.1f\r\n%-60s%-20.1f\r\n%-60s%-20.1f\r\n","Global Wall",(float)0.0,"Limiting Potential",(float)0.0,"Roughness Correlation",(float)0.0);
// important to case the CString since the TRACE does not know argument type
TRACE("output:%s\r\n",(LPCTSTR)strTemp);
|
|
|
|
|
All you need to do is replace each 0 with 0.0 instead. When Format() encountered the %f , it attempted to pop a float type from the stack but got an int type instead.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hello,
For my project I have to develop a DLL for printing receipts.
I use an ActiveX but for software design, I don't want this ActiveX will be managed throws a Windows .
Do you know if it is possible ?
Thanks for your help
|
|
|
|
|
Come back when you're sobber!
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
i am making a project on ado
i used these statements for linking:
BEGIN_ADO_BINDING(CCustom)
ADO_FIXED_LENGTH_ENTRY(1, adInteger,m_id,idStatus,FALSE)
ADO_FIXED_LENGTH_ENTRY(2, adInteger,m_regno,regnoStatus,FALSE)
ADO_VARIABLE_LENGTH_ENTRY2(3, adVarChar,m_fname,sizeof(m_fname),fnameStatus,TRUE)
but during compile time it is goving "undeclared identified: adInteger and same for adVarChar"
help to solve this
|
|
|
|
|
Looks like you are trying out the ADO tutorial in MSDN. The variables adVarChar etc.. are in msado15.dll. Did you import the "c:\Program Files\Common Files\System\ADO\msado15.dll" into your program?
|
|
|
|
|
I need to compile one file as Release in Debug project
How I can set propertis of one .cpp file in
Visual Studio .NET 2003?
|
|
|
|
|
Anonymous wrote:
How I can set propertis of one .cpp file in
Visual Studio .NET 2003?
Just right click the file in Solution Explorer and click 'Properties'.
You can't make the file compile with the Release settings while the project compiles as Debug. But you can make the file properties for the Debug configuration match those in the Release one.
Hope that helps,
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
UpdateDriverForPLugAndPlayDevices fails to upgrade the printer driver dll (language monitor) to the latest version provided (even with INSTALLFLAG_FORCE option.)
Can any one tell the reason for the this?
More Info : The driver I was trying to upgrade had the same driver version as already installed driver, but one of the dll was changed, which I needed to upgrade. I had the proper signed cat file for the changed dll.
Suma
|
|
|
|
|
Hi
Is there any restrictions on the packet size that the server can send to client?
Because when my server sends data of the size 5KB to client after some time a run time error is generated at my client side.
But when i change the data size to 2KB, run time error is not generated.
Why so?
Waiting for suggestions.
Regards
|
|
|
|
|
Is the buffer on your client side big enough?
Looks like that might be the problem..
|
|
|
|
|
Daniel vittori wrote:
Is there any restrictions on the packet size that the server can send to client?
Yeap, I have faced similar problem, when I was sending Image across Sockets.
Daniel vittori wrote:
when my server sends data of the size 5KB to client after some time a run time error is generated at my client side.
Through my practical exp., Data size more than 4.12 kb at one time might cause problem. Though, in my case, application doesn't crash and one more point is to be noted the destination Socket is based on PHP
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I am writing a program that opens a dialog based application (for which I don't have the source code), fills data in the edit boxes there and clicks the "OK" button.
I can open the application through ShellExecute function, but I am not able to fill data in the edit boxes or get the "OK" button clicked.
Can anybody help?? Please...
|
|
|
|
|
thevoyager wrote:
but I am not able to fill data in the edit boxes or get the "OK" button clicked.
1. First Find Handle to Remote Window Using FindWindow() and FindWindowEx Api's.
2. Now, Find the Edit Box and OK Button, In Which you want to fill your custom values off course using FindWindowEx or EnumChildWindow Api.
3. Using WM_SETTEXT message Fill the Edit Box of remote Window from your custom text.
4. After completing above task, Post BN_CLICKED message for OK Button to Remote Window
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Thanks Alok, it works
I got the Handle to Remote Window and also to the buttons on it, but...
i) I'm not able to get control of the edit box (I searched for the button based on it's caption, but editboxes don't have a caption and i don't know what to give in the parameter lpszClassName).
ii) Sending BN_CLICKED message for the OK Button doesn't seem to work.
I'm sending you my code. Could you please figure out the problem:
CWnd* pClientWnd = NULL;<br />
pClientWnd = FindWindow(NULL, "Login");<br />
CWnd* pControl = new CWnd();<br />
HWND hWndOk = FindWindowEx((pClientWnd->m_hWnd), NULL, NULL, "&OK");<br />
pControl->Attach(hWndOk);<br />
pControl->EnableWindow(TRUE);<br />
pControl->PostMessage(BN_CLICKED);
|
|
|
|
|
thevoyager wrote:
I'm not able to get control of the edit box
Try obtaining its Control ID by using Spy++ and then searching by this ID among pClientWnd's children.
thevoyager wrote:
pControl->PostMessage(BN_CLICKED);
BN_CLICKED is not a message. It's a notification code to be used in a WM_COMMAND message. Check the documentation for both BN_CLICKED and WM_COMMAND.
You should post a WM_COMMAND message to the button's parent window (not the button), indicating a BN_CLICKED code and the button's ID. In fact, for the OK button, this ID is most likely IDOK, so you wouldn't even need to search and obtain a handle to the button itself.
Hope that helps,
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Jose Lamas Rios wrote:
You should post a WM_COMMAND message to the button's parent window (not the button), indicating a BN_CLICKED code and the button's ID.
Yeap, You are Right, Thanks for Correcting me Again Mr. Rios .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ThatsAlok wrote:
Yeap, You are Right, Thanks for Correcting me Again Mr. Rios
He, no problem
But if you like my corrections, that would be "Mr. Lamas", or "Mr. Lamas Ríos"
Anyway, just "José" or "jlr" will do.
Cheers,
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Jose Lamas Rios wrote:
But if you like my corrections, that would be "Mr. Lamas", or "Mr. Lamas Ríos"
, So i Will refer you by Jlr
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
when i compile my project i get this error!!!
--------------------Configuration: Ado1 - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
Error executing cl.exe.
Ado1.exe - 1 error(s), 0 warning(s)
it is showing that error is in stdafx.h..
wat to do now...
i have only added one line to stdafx.h which is:: #include "comdef.h"
there is no #include <windows.h> in any of my project file...
please help and thanks
|
|
|
|
|
Use the < tags just above the emoticons because we cannot see which header file you included.
|
|
|
|
|
cedric moonen wrote:
< tags just above the emoticons because we cannot see which header file you included.
We Posted our comment at same Time
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Wow, that is synchronisation isn't it ?
|
|
|
|
|
smartymanav wrote:
have only added one line to stdafx.h which is:: #include
I am unable to see which file you have included in your project, please modify your comment with Do not treat <'s as HTML tags option checked
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|