|
vinaycool wrote: Can u please also tell me how to change it int to char ??
_ltoa
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Hi VuNic
_ltoa or itoa
whitesky
|
|
|
|
|
Can u please also tell me how to change it int to char ??
TCHAR buffer1[50];
int f=INDX.getTotalFiles();
_ltoa(f,buffer,10);
status->m_TOTAL_FILES.SetWindowText(buffer1);
Oops, I misunderstood his question. I thought he was asking about the line that does the conversion.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
yes
whitesky
|
|
|
|
|
_ltoa - Convert a long integer to a string.
_itoa - Convert an integer to a string
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
pleast look at my reply to whitesky. And Btw, you can still use ltoa for converting ints to chars. int is not something totally different from long. but Only the size
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Due to the differences in size of long and int C++ provides the seperate functions
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Hi,
In my application i connected server and client through sockets.In this,I have one seperate Config file that shows the IP address of different clients.i.e.,for server 1 should connected to CLient 1 IP addr,Servr2 must connected with Client 2 addr.Lile this i provide each client's IP address.So that the server must checked with that file to which client it must be connected.
My problem is, if the client is in my local machine i.e, in the server machine itself,it checks the Config File,In that i gave IPaddr of that server machine.But it does not work.
In my condition checking..I got IP address through GetPeerName().If the client is in another machine it returns IP as 192.168.3.33 like this.And if the Client is in sever itself it returns the LocalHost liek 127.0.0.1.
So,in condition checking it failed b'coz my COnfig File shows only format of IP addr.(192.168...)
Is there any way to get the Local machine IP addr instead of taking 127.0.0.1.
my code
pSocket->GetPeerName(curOpr,i);
if(curOpr.CompareNoCase(mOpListCurInstr[j])==0)
{...
}
mOpListCurInstr is the address noted in Config File.
|
|
|
|
|
Why not you use GetHostName in case if the client runs on the same machine?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
I have created a new resource CDialog box, I am working with VS 2005.
When I try to do a DoModal with this new Dialog Box it´s happen nothing and the function return -1.
What can I check to found the problem.
AutreChien
-- modified at 3:49 Thursday 18th May, 2006
|
|
|
|
|
can you show how to use
whitesky
|
|
|
|
|
I use often those DoModal and in this case I do not understand what happend. My class derived from CDialog look like the same as a other one that works.
The code:
class CurrentViewer_Dlg : public CDialog
{
//DECLARE_DYNAMIC(CurrentViewer_Dlg)
public:
CurrentViewer_Dlg(CWnd* pParent = NULL); // standard constructor
virtual ~CurrentViewer_Dlg();
// Dialog Data
enum { IDD = IDD_DIALOGCURRENT_VIEWER };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Generated message map functions
//{{AFX_MSG(CurrentViewer_Dlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
CDctlctrl1 m_DdeChangeDir;
public:
CDctlctrl1 m_DdeChangePos;
public:
// use to look if the app as to be showed
CDctlctrl1 m_DdeShow;
CChartCtrl m_ChartShape;
CChartCtrl m_ChartCurrent;
public:
virtual BOOL OnInitDialog();
};
AutreChien
|
|
|
|
|
Dear NorGUI ,
it seems not problem how to call your dialog
whitesky
|
|
|
|
|
hi!
Whath is your onInitDialog code?
if you call the CDialog::OnInitDialog() function in ?
|
|
|
|
|
put a breakpoint in the OnInitDialog of the dialog you are try to open, it might be in there somewhere... Or just do a search in that dialog for EndModal call with parameter -1 and see why it gets there
|
|
|
|
|
I have put a breakpoint in OnInitDialog and the function is never called ?
AutreChien
|
|
|
|
|
plz check whether ur dialog have any ActiveX controls. Dialog Creation fails if the active-x is not properly registered or didn't load correctly.
nave
|
|
|
|
|
I remove some control and it´s works. Now I have to found why this control is not working, this is a
Custom Control.
Thank you !
AutreChien
|
|
|
|
|
Hi all,
I am developing under winXP. i use a MFC class CComboBox which has 4 items.
in winXP the appearance of the open combobox (which displays the items when i press the arrow)
is ok. but testing it on win2K shows a shrinked arrow with only 1 line of items i can scroll down and up but it doesn't look good
any1 encountered with this problem? what is the solution?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Hi Geniuses,
We have developed an application in VC6.0 to configure a device (with single PCB) thru' serial communication (COM port). Now we need to provide USB interface also. So far I have searched a lot to get the information on handling USB devices in VC++ application. But in vain.
If anyone could guide me to get required information, it would be greatly appreciated.
Thanks in advance,
Sarvan AL
|
|
|
|
|
USB port is not managed the same way as serial port. What you have to do, is open the driver (with CreateFile) that is associated with your device (should have been supplied with the device) and send commands through DeviceIOControl function. All this information should have been supplied also with your device.
In a particular case, it can be used like a standard COM port: it is when you use a USB to serial converter. In that case, the driver will create a virtual COM port that you can open like a standard COM port.
If you provide more information about the device, it would be nice.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hi Cedric,
Thanks a lot for your reply.
Let me tell you about the device. It's a box like device with single PCB. As on now, only serial port has been provided. We are not writing the firmware of the device. We are developing only the GUI to configure the device. Hope we need to have the device drivers from the device manufacturer.
Could you tell me few more about DeviceIOControl? It would be more helpful to a newbie, like me.
Thanks once again,
Sarvan AL
|
|
|
|
|
Yes, but this device provide a USB port no ? With this USB port, there must also be a driver supplied in order to use it on your computer. Can you tell me more about that ?
DeviceIOControl[^] but documentation should be supplied with your driver that describes which command to send to the driver.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hi Cedric,
I'd like to know that other than device, what are all the things we should get from the USB device manufacturer, like DLL and LIB files, documents, etc.
Since I am new to USB interface, if you could provide still more information, I would be grateful.
Thanks & Regards,
Sarvan AL
|
|
|
|