|
Something like :
int table[m][n];
FILE *f=fopen("file.txt","rt");
if (f!=NULL)
{
for (int i=0;i<m;i++)
{
for (int j=0;j<n;j++)
{
sscanf(f,"%i[here is a tab]",&table[i][j]);
}
}
}
fclose(f);
This is pure C, since I do not know what our app is like. This does not work as is, but it should give you a way to implemente it.
~RaGE();
|
|
|
|
|
Hello,
I need to convert icons to bitmaps. I have written something that works OK on 2000 and other systems but that fail on XP: the transparent color is replaced by black instead of being well transparent. Maybe it is related to getting a "too many color" icon were the 256 colors version is enough for what I am doing...
Does anyone has something to suggest?
Regards
|
|
|
|
|
Can you send me the code?
I worked on somthing that does this exact thing some time ago and i might be able to help you....
|
|
|
|
|
Does your stuff work? My code is just around 10 lines of code where I build a DC, select an empty bitmap into, draw the icon with DrawIconEx in DI_NORMAL mode and that's it. Do you do something similar?
|
|
|
|
|
If you haven't already, you need to look at GetIconInfo. This function fills in a structure
with two bitmap. One is the colour info, and one is the transparency map. The transparent
part *should* be black on the colur bitmap, but you can separate it using the 2nd bitmap
for reference.
Iain.
|
|
|
|
|
Iain,
I saw this one and definitly wanted to take a look at it... Thanks for the infor.
Regards
|
|
|
|
|
Okay tested it but it appears that the bitmaps returned are wrong. Basically I get my icon from the system image list in where the icons are 32 bit with alpha. When I get them I get a 256 color version but the conversion is wrong: some parts of the mask that are gray become black where as in the icon the matching pixel gets black also. So I get black.
What I need now is to force the extraction in 256 colors. The problem is that I get a handle to an icon in the system image list and I do not know where this icon is located on disk so I can't really extract it from the .ico file.
Anyone?
|
|
|
|
|
Hi,
can anybody let me know how to send a text just like popup message to another system(by selecting the username from dropdown box) in LAN through program.
thanx in advance
Thomas.
ThomasKennedyBose
|
|
|
|
|
I don't know special api-calls for this ...
but maybe you can use the Windows command "net send" ???
(translated from a german windows ...)
NET SEND {Name|*|/DOMAIN[:Name]|/USERS} Message<br />
Example:
NET SEND ThomasBoseKenn "Do you need further help ?"
cr97
|
|
|
|
|
thanx...but it should be done through programatically...slect an user name from the dropdown box which displays all the users in one domain,when we click on "Send" button ,string in the edit box should be sent to that user just like a winpopup message(just like NET SEND cr97 "Ya..I need your help?" command works)....
BR
Thomas
ThomasKennedyBose
|
|
|
|
|
And why don't you make a dialog, where the you can select the text and the user ???
And after pressing "SEND" you concatenate all the strings like
<br />
strCall = "NET SEND "+strUserName+" \""+strMessage+"\"";<br />
then you can execute "strCall" ...
is it a solution for you ?
cr97
P.S. Sprichst du deutsch ?
|
|
|
|
|
ya....I have already done that code.....any how I don't leave you ..now you tell me how to get the machine name(like "\\mdpworkstn64")by selecting the username....any APIs??
BR
Thomas
ThomasKennedyBose
|
|
|
|
|
IMHO if you have the user name it is not necessary to know the machine name ...
cr97
|
|
|
|
|
ok ..ok ....sorry for that scenario...actually what I want is I will give the machine number(or name like //mdpwksrnd64)and I want to get the user name who has logged in to that machine...is it possible??
ThomasKennedyBose
|
|
|
|
|
At moment i don't know if this s possible but i think so ...
why do you wanna know who is logged in at a special machine ???
cr97
|
|
|
|
|
suppose I want to send personal message to my friend who is supposed to be on that machine...but unfortunately some other person logs in....!!!!in that case first I will check for the logged in user by giving the machine name....hope you can understand the situation..
ThomasKennedyBose
|
|
|
|
|
You can try to send the message to the user ...
NET SEND bob "Hi ... are you online ?"
This sends the message not to a machine but to a user in the network !
In this case it doesn't matter on which machine "bob" is logged in.
Try it at the DOS-Prompt ...
cr97
|
|
|
|
|
))))))
ok ....leave this scenario...I just want to know who has logged in on a perticular machine(I know the machine name)....then how it is possible through program??
ThomasKennedyBose
|
|
|
|
|
Good question ... ähm ... next one ...
Therefore at the moment i don't know a solution ...
maybe you find something in the "google groups" ???
cr97
|
|
|
|
|
older applications like PopUp utility on Win95 use mailslots (Popup creates mailslot named "messngr", and periodically checks if there are new messages in mailslot. when sending messages, it simply writes to messngr mailslot on another machine)
you can also use messenger service on Win2K and later, but i never used that, so i can't go into details (this is what is used when you issue a command like "net send <machine> hi" at command prompt).
|
|
|
|
|
Hello All,
I want to share HBITMAP bitween 2 applications (IPC) using memory mapped files. but i m getting problems.
anybody can tell me how can i share HBITMAP b/w 2 application ?
thanx in advance.
|
|
|
|
|
Hi.
Anyone knows a good book to start learning DirectX from ?
I mean from a beginner level...
Thanks,
Lior.
|
|
|
|
|
Did anyone use
NSExt.Awx: The Shell NameSpace Extension AppWizard v3.1
written by Krishna Kotipalli for namespace extension. When i try to use in app wizard, the message comes
"App wizard failed to load the custom appwizard 'C:\program files\vstudio\common\msdev98\template\nsext.awx' "
Can any body tell me whats the problem
|
|
|
|
|
What is the best Encryption library and where can I get it??
Also where do I find samples on how to use it??
Thanks,
grahamoj.
|
|
|
|
|
Don't know if the best, but it is damn good anyway: Crypto++[^] comes with lots of docs and samples, it is totally free and suffers from none of the export restrictions applicable in the US.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|