|
HI Rage,
The message for Delete key is not arriving at all.
Thanx
Jitesh
Jitesh
|
|
|
|
|
hi,
I have to develop a program that reads some strings and write into the resource file at run-time.But i have no idea, how to do it(how to create an entry into the string table at run-time.
Can anybody help me regarding this.
Any help will be highly appreciated.
Thanks and regards.
|
|
|
|
|
By "resource file" do you mean the .RC file? If so, why would you want to write to this file at run-time?
|
|
|
|
|
This is not possible. You can't change it at run-time, ressources are compiled into your .exe in release.
~RaGE();
|
|
|
|
|
Hi,
you can read and update string from resource of exe using BeginUpdateResource,UpdateResource and EndUpdateResource etc... functions.
hardstone
|
|
|
|
|
Thanks a lot to David Crow, Rage and HardStone for their valuable suggestions .
|
|
|
|
|
Hi:
How can i disconnect a RAS-communication programmatically ? for example internet connection such as Norton AntiVirus after LiveUpdate.
is there any API or Message to do this ? please help me.
Best Regards.
|
|
|
|
|
There is an API for Ras communications. The functions all begin with "Ras". I think you will need to enumerate the opened RAS connections in order to retrieve a handle, and then close it.
|
|
|
|
|
Hi I hope someone can help, I am trying to convert a string of ascii characters to their decimal or hex equivalent. I am reading the characters from the serial port using the comms api, then storing them in a Cstring buffer. I then try to convert them using the following
char *szTheString = (char *) (LPCTSTR) m_sCommsOutput;
int array[100] = {0};
sscanf(szTheString,"%d",array);
This seems to interpret the whole string as a number and just stores a large number in the first array element. How can I convert each individual array element i.e. a = 30 or whatever? Any ideas would be much a appreciated.
Andy
|
|
|
|
|
I think you will have to parse the string m_sCommsput retrieving each char, and store it in the table.
~RaGE();
|
|
|
|
|
so do something like
for (int i = 0; i<=sizeof(szTheString);i++)
sscanf((szTheString+i),"%d",&array[i]);
??
Andy
|
|
|
|
|
yes. note that you can keep your original CString :
for(int i=0;i<=m_sComOutput.GetLength();i++)
{
array[i]=m_sComOutput[i];
}
mmhh... looks odd, but this should work (You make me doubt There must be a better way to do the conversion )
[edit]
Indeed, you just need to do :
char *array=(char *)m_sCommOutput.operator LPCTSTR();
..and array contains your ASCII codes... I'm dumb
[/edit]
~RaGE();
|
|
|
|
|
Not providing an example of what you are after, I can only assume. See if strtol() is of any help.
|
|
|
|
|
int nLen = strlen( szTheString );
for( i = 0; i < nLen && i < 100; i++ )
array[ i ] = szTheString[ i ];
This is very simple and it doesn't seem to me that I am understanding your question right. In case you are reading numbers as ascii characters, i.e. you have a stream of data going through your serial port, like 30, 40, 11, 100... etc., then it would be different. Could you please be more specific because I am not very sure about your question?
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
hello,
I need something like a table control to display data in line and
columns. How can I do ?
I tried a CRichEdit text but that's not the good way since I have
to used the protected property to avoid the modification of separators,
and I can't avoid insertion anywhere !!!!
Thanks,
Tabs
|
|
|
|
|
hai Anonymous,
Even i was trying for the same kind of utillity and used grid controls(an activex control utility) for this purpose . even u can try grid controls and see if it fits ur requirment.
I had some problems doing the above so if get or come across a better idea plz do share it with . I am trying to implements table just like in MS-Word.
Thanks in advance
|
|
|
|
|
this one[^] works great, and you can also use grid ActiveX controls provided with MS windows (flexgrid, dbgrid)
|
|
|
|
|
|
how to add user menus on right click event of the mouse in the web browser ctrl
|
|
|
|
|
|
Hi !
MSDN states that:
<<on certain="" versions="" of="" microsoft®="" windows®,="" the="" stretchdibits="" and="" setdibitstodevice="" functions="" allow="" jpeg="" png="" images="" to="" be="" passed="" as="" source="" image="" printer="" devices.="">>
But how can I load a JPEG or PNG image ?
Can I do it without using COM ?
|
|
|
|
|
The very best way IMHO is to use GDI+.
Regards,
BB
|
|
|
|
|
If you are using VC++7 (MFC) you can use the new MFC class CImage. It allows you to load and manipulate JPG, PNG, GIF, BMP formats.
Very simple.
Art
|
|
|
|
|
I'm not using MFC at all.
I only searched through the documentation on StretchDIBits and other bitmap API functions which reads:
Windows 98/Me, Windows 2000/XP: StretchDIBits has been extended to allow a JPEG or PNG image to be passed as the source image.
So I was wondering how to pass a JPEG pr PNG image to this function, maybe I can read from the disk ????
|
|
|
|
|
If not using MFC then I would suggest using GDI+ as was already suggested.
Image::FromFile("PathToYourImage.jpg");
Art
|
|
|
|