|
If the users PC has a Internet connection you could query Internet Time Server (NNTP I think this is). You can also get time info from HTTP requests.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
i'm a beginner and i have to write a program that contains buttons that draw a square and a circle and a clear button but i cant use a GUI application, any ideas on how to approach this. i have no idea how to create a button
alp
|
|
|
|
|
|
glowskull03 wrote:
i have to write a program that contains buttons that draw a square and a circle
Check out Rectangle() and Ellipse() respectively.
glowskull03 wrote:
...but i cant use a GUI application
Meaning that you are not allowed to, or that you do not know how?
glowskull03 wrote:
i have no idea how to create a button
How about CreateWindow("Button", ...) ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello there! Does anyone experienced a communication problem between Win2003 and Win2K? I have this program using server and client socket (using CSocket). The server is Win2003 and the clients are WinXP and Win2K. I have this LED indicator (bitmap image) wherein it indicates if there is a communication between server and client. If the LED is green there is connection and if red there is no connection. It works fine if the connection is between Win2003 and WinXP. But the problem occurs if it is between Win2003 and Win2K. The Win2K is updated to service pack 4. Am I missing an update or something?
Thank you very much who can give me support.
|
|
|
|
|
this isnt a programming question this is more admin type stuff
unless you have code for us to look at
Bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
Hi
I want to load controls like Buttons and edit boxes to tree view, so that I can expand and collapse the controls on the GUI. Or else without using a tree view is there any other way to get this effect. I am unable to do this. Can anyone please help me to do this.
Thanks
Madhavi
|
|
|
|
|
There are two descriptions about the C memory map, which makes me confused. I wonder which one is the correct memory map in C. Should the stack and heap come on top of the program codes? Or should the program codes and global variables on top?
Map 1 is correct? or Map 2?
Thanks
/////////////////////////////////////////////////
--- Map 1 ---
Described in "C - The Complete
Reference" by Herbert Schildt
+-----------+
| Stack
| |
| v
+-----------+
| ^
| |
| Heap
+-----------+
| Global
| variables
+-----------+
|
| Program
| codes
|
+-----------+
/////////////////////////////////////////////////
--- Map 2 ---
Described in "Mastering Algorithms
with C" by Kyle Loudon
+-----------+
|
| Program
| codes
|
+-----------+
| Global
| variables
+-----------+
| stack
| |
| v
+-----------+
| ^
| |
| Heap
+-----------+
////////////////////////////////////////////////
-----------------------------
C++ without virtual functions is not OO. Programming with classes but without dynamic binding is called "object based", but not "object oriented".
|
|
|
|
|
The memory layout depends on the OS and the compiler. Each diagram may be correct for a particular OS/compiler combination. The C standard doesn't say which way the memory should be mapped.
|
|
|
|
|
Hi all:
The songs playing order of MP3 player is decided by the ordering you see after the DOS command "dir". So the song files that I want to listen first, I'll copy them fist to my MP3 player, then they'll appear at the top of the file list after "dir". It seems works well, but not perfect. And several times It turn out to be not the ordering in which I copying them in sequence.
Can anybody provides a different ordering method, any suggestions will be appreciated.
Regard.
|
|
|
|
|
The default order in which files are listed is dependent upon the file system. For FAT16 volumes, they are retrieved in the order in which they were written to the FAT. With NTFS, they are retrieved alphabetically. I'm not sure about FAT32. Now of course these are all overridden by using dir /o at the command prompt.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I invoked the format command of OS(XP) in my code.But evry time it display a console window and I have to click the Enter key to go on the function. So,I wonder if there is a way to perform carriage return automatically and we do not need to click the Enter key?
Thanks for help!
|
|
|
|
|
Are you talking about "\n"?
|
|
|
|
|
momer wrote:
I invoked the format command of OS(XP) in my code.
Are you talking about format.com that is used to format floppy disks? If so, how are you invoking it? Better yet, why are you using it when a perfectly good function exists?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hai,
I'm working in vc++ win32. I'm using two files..say file1.cpp and file2.cpp.
In file1 I'm defining a function and want to call in file2.
ie I'm doing as
//file1.cpp//
int myfunc();
.
.
.
int myfunc()
{
....
}
//file2.cpp//
#include file1.h
extern int myfunc();
....
int func2()
{
int xxx = myfunc();
}
If I do like this it is giving
LNK2019: unresolved external symbol_myfunc referenced in func2
fatal error LNK1120: 1 unresolved externals
Where did I went wrong..
Thanks in advance..
|
|
|
|
|
do you have the second cpp added to your project?
bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
Yes..I it is added to the project..
|
|
|
|
|
email it to me and i'll take a quick look (no promises) if you havnt got it sorted
bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
1.rebuild all.
2.check myfunc() in file1.cpp
|
|
|
|
|
hello,
a friend looks for a little program. this program sould give out beeps in different frequences over the soundcard. can anybody give me the code or other help to to this...just the line(s) i need.
thank enrico
BTW: excuse my bad english, i´m from germany
|
|
|
|
|
BOOL Beep(
DWORD dwFreq, // sound frequency
DWORD dwDuration // sound duration
);
bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
thanx bryce
i´v try to use this, but i don´t find any way to do
my idea was to use your code and replace the variables with frequences and durations (integers). always the same error: (i try to translate)
error C2373: 'Beep' : New Definition ; different modifier
hope it´s right....
ok ok, now the error is logical for me but how can i get the sound over the soundcard (not over the speaker) ?
any idea?
|
|
|
|
|
Is there a way to query windows to determine if a system shutdown is imminent?
I have a user interface application which provides the option to execute an upgrader application. This upgrader application deletes some system files and then transfers new system files in place. The problem is that due to driver install (upgrade files are stored on a pcmcia card and windows asks to shutdown after the drivers are loaded sometimes), windows will sometimes send a messagebox asking for the unit to be restarted, which is very bad if the user selects ok when systems files have been deleted and not replaced yet. I've already put a handler function for the WM_QUERYENDSESSION message in the upgrader app (which works fine), but I still need to trap the condition in which the WM_QUERYENDSESSION message is sent before the upgrader application starts (in which case, the application missed this message). If I can find out if the shutdown is imminent, I can prevent the file transfer.
Thanks,
Himanshu
|
|
|
|
|
If any application returns zero for the WM_QUERYENDSESSION message the session will not be ended.
To determine if the system is shutting down , Handle WM_ENDSESSION message and a non zero value for "lParam" says the system is shutting down.
There is no spoon.
suhredayan
|
|
|
|
|
Thanks for the suggestion, but I don't think that will be sufficient for my case. I need to know before the upgrader app gets WM_ENDSESSION. The reason is that the the message could come at some finite time after I have started, and if the timing is right, then I could be somewhere in between deleting and replacing the system files (The upgrader actually updates a remote module that takes a total of ~40 minutes, so it wouldn't be essy closeout the processing in OnEndSession). I would like to use some sort of API fcn that I could call before I start the transfer, so that I know I can guarantee that windows is not shutting down before the upgrade starts. It looks like there might not be one available. I guess I'll try to use another application to capture the QueryEndSession and then have the information available to the Upgrader at startup.
Thanks,
Himanshu
|
|
|
|