|
put a getchar(); to wait for keyboard activity
I am that is
|
|
|
|
|
add following:
(you have to include conio.h!)
<br />
printf("\nPress any key to continue...");<br />
<br />
while( !_kbhit() );<br />
<br />
_getch();<br />
Phil
|
|
|
|
|
Hi All....
How to get the currently logged on user of remote system??
I had been try out this by Netbios call. But the data that i receive in the NameBuffer are not consistent.... How to get it ? can u please help??
Thanks.
Regards,
A.Ilamparithi
|
|
|
|
|
Check out MSDN.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/network_management_functions.asp
Kuphryn
|
|
|
|
|
Hi Kuphryn,
Thanks for your help...
But, those APIs are not supporting All versions of windows... I need the code to work from Windows 95 to 2000,NT,XP....
Anyway thanks for ur valuable help
Regards,
A.Ilamparithi
|
|
|
|
|
can any one please tell me how to load a jpeg image from the resource , iam not being able to do that for quite a time now.
Please help me .
satadru.
|
|
|
|
|
Take a look at;
http://www.bcbdev.com/faqs/faq90.htm
Jeroen.
|
|
|
|
|
hi ,
thanks for the reply , since i am working in vc++ environment could you please refer some relevent sites as i am unable to understand what is TJPEGImage object as described in the site.... and also regarding the jpeg.hpp header file that they have included....
it would be realy helpful if its in the vc++ environment.
thanks .
satadru
|
|
|
|
|
Excuse me
This should help;
http://www.codeguru.com/bitmap/CPicture.html
(http://www.codeguru.com/bitmap/index.shtml)
J.
|
|
|
|
|
hi ,
that was really great .. now i need a bit of your advice..shud i draw these images in OnPaint message handler of a dialog based application ... and in that case how do i draw an image in the OnPaint of teh parent window from the child window..for example from the child window i select the desired picture to be loaded in the parent window ( to be drawn using OnPaint function, as the picture has to repainted on WM_PAINT message)
It would be very kind of you if u could please lend your aadvice.
Thanking you,
Satadru
|
|
|
|
|
Hi,
I am working on a problem has to do with manipulating large files. Essentially, the program will open up any give files and append, insert, and delete data from the file at random position.
What is the most efficient solution?
I have tried memory mapping, but it does not work as expect. Memory mapping works only when the program change a byte in the file. It does not work for inserting and delete bytes from the file at random position.
Thanks,
Kuphryn
|
|
|
|
|
Unfortunately there are no direct API's for inserting into and deleting parts from a file, file mapping is not be advisable because of large files.
Help yourself with constructing new files from the needed parts of your original files/data.
If your files are large compared to the available memory then you should use in a loop small chunks of data (~1MB) at a time in order to avoid unnecessery memory overhead.
Use SetFilePointer to mark the position of current reading/writing operation.
In order to not block the UI, put the whole operation into a worker thread.
Peter Molnar
|
|
|
|
|
|
I'm pretty much a complete newbie to the programming scene. I can't for the life of me work out how to play a wave file. Preferably during the startup of the application but even if it was on the press of a button. I have read about the PlaySound and DirectSound classes/functions (whatever they are) but cannot get them to work. Also i have come across what looks like a really good class (cSound) for download on this website but apparently it doesnt work in Windows XP, and i cant get that to work either. I need to know everything i would need to do (initialisation and all that) coz im completely lost and this is getting very frustrating. even a link to a class i can use or step by step tutorial would be a big help.
o and im using VC++.net
Cheers
jace
|
|
|
|
|
Whether you beleive or not it is really as easy to play a wave file from your app as writing the following:
sndPlaySound("c:\\yourwavetoplay.wav",SND_ASYNC);
Put it into your OnInitDialog override to play it on application startup.
However, in order to use it, you have to add the windows multimedia library to your project
So, BEFORE you call the above line, add to your code:
#include "mmsystem.h"
#pragma comment(lib,"Winmm.lib")
Peter Molnar
|
|
|
|
|
does anyone know the code for a calculator like the one microsoft uses in the accessories file I am interested in how they get the plus and equal buttons to add the values using only one edit box.
thanks JKohm
|
|
|
|
|
They use a spare variable in addition to the display, and also an operation variable (i.e. three variables). By clicking on an operation button (+,-,*,/) the contents of the display are put into the spare variable, and the the button is stored in the operation variable.
The equal sign calculates: spare variable OPERAND display, where OPERAND is the operation variable.
Peter Molnar
|
|
|
|
|
I haved binded the MSHFlexGrid with a recordset, and now I want the result that if I scroll the mouse wheel, the record showed in the MSHFlexGrid would scroll(like the effect as we scroll the mouse wheel while we read a web page,the scrollbar move up or down);I have coded below:
BOOL Class::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
{
// TODO: Make the mouse wheel take the MSHFlexGrid scroll
this->m_cHFlexGridPerform.SetScrollTrack(true);
//Would u tell me how can I make it work please
return CFormView::OnMouseWheel(nFlags, zDelta, pt);
}
thank you in advance;
|
|
|
|
|
//code
Bitmap *bmp;
bmp=Bitmap::FromHICON(imglist.ExtractIcon(0));
grapics->DrawImage(bmp,x1,y1,x2,y2);
//imagelist is globe variable
Upwards code,Memory leak out,why?
|
|
|
|
|
Bitmap *bmp; is a pointer to a bitmap ... u havnt allocated any memory for the actual bitmap
"there is no spoon" biz stuff about me
|
|
|
|
|
Wrong with imglist.ExtractIcon(0)?
|
|
|
|
|
In MFC for VC++ 6.0, how can I get information about the processor on the current computer such as the name and speed of the processor? How can I find out how much RAM the computer has and how much disk space is available on the primary drive?
|
|
|
|
|
|
Thank you! I can understand how to use those functions but how would I access the data in
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor ?
|
|
|
|
|
That's just a regular registry key. If you haven't used the registry before, there are many articles here on CP on the registry and wrapper classes for reading it.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|