|
|
Thanks, I am closer.
When I follow those instrutions, I place the variable (int iTest;) in a .cpp file outside form1 and form2. Also, place "extern int iTest;" in stdafx.h It allows me to assign "iTest = 6;" in form1, but when I insert "iTest = 23;" in a button_click on form2 I get: " 'iTest' : undeclared identifier" and " 'iTest' : redifinition; different basic types".
Thom
|
|
|
|
|
Did you try rebuilding the application? Things in stdafx.h are precompiled and will be regenerated only by a rebuild.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Actually ther problem I caused is that I had included the Form2 *before* I declared my global in stdafx.h. This caused the program to try and reinitialize the variable again.
Whew! I think I can actually do this!
Thanks guys, I am learning, but apparently I used punchcards to many times in the early days.
Thom
--"Late to bed, Early to rise,-- -Work like hell and Advertise."- Wernher von Braun
|
|
|
|
|
Hello, i am trying to build i client server application using winsock library but i thinkit will be easy by not using MFC.
Please give me tutorial about how to make a simple client and simple server.
At the client end i will be using GETCOmPuterNAme() and Username apis
and i want to transmit them to server.
Please help me out in this regard.
|
|
|
|
|
|
Beej's Guide to Network Programming is the standard reference for *nix programmers learning sockets, but it is still very relevant for windows programmers as well - not to mention being far better laid out than the winsock faq
|
|
|
|
|
I wanna supervise every drag_and_drop for information security...but how can i supervise it? or is it possible to prohibit of doing drag_and_drop?
Please help me to figure it out, thank you
|
|
|
|
|
atsuki wrote:
or is it possible to prohibit of doing drag_and_drop?
Yes, don't call DragAcceptFiles() in the first place, or call it with FALSE .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thank you for your reply, David.
I have called DragAcceptFiles() in the first place...
However, how can i prohibit the user of doing drag and drop???
like following procedure???
1.Get ON_WM_DROPFILES() message
2.Get Droped file list
nor
1.Notice begin drag
2.Using RegisterClipboardFormat to put data into clipboard
3.EmptyClipboard()
is there any easy way to prohibit it???
thank you
|
|
|
|
|
atsuki wrote:
However, how can i prohibit the user of doing drag and drop???
Call it again using FALSE . This is all spelled out in the documentation.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi alok
Thanx
Most of the tapi stuff talks in terms of telephone connected to modem and the networks.. I don't have to take into consideration the networking part of it.. In this application the telephone is connected to an adapter which is devised by the company for which i am developing the software application.. This adapter is connected to USB port.. I think i have to communicate with the standard USB driver to collect voice data from telephone..
regards
pallavi
|
|
|
|
|
mpallavi wrote:
In this application the telephone is connected to an adapter which is devised by the company for which i am developing the software application..
Have company which made that adpater provided you any interface or api to communicate with there adapter!!?
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Does the adapter show up in your phones and modems list in control panel?
- tareq
|
|
|
|
|
hi
Actually the things are going on simultaneously.. The phone adapter is recognised by the standard usb driver.. hopefully).. One of my colleague is developing a client driver for it.. The interface will be provided for my application.. But i have to wait for some days ..
What i was thinking of doing is.. to program a apllication for recording voice using microphone at present..
Please suggest me how to go about this project.. I am a beginner in VC++ and this project is part of my final semester MCA course..
Ragards
pallavi
|
|
|
|
|
I am trying to resize my desktop for a toolbar at the top. If I set the m_srceenrect and send either call, all is good for about a minute, then the desktop moves back up to original rect, anybody know why?
SystemParametersInfo(SPI_SETWORKAREA, 0, &m_screenrect, SPIF_SENDCHANGE);
SystemParametersInfo(SPI_SETWORKAREA, 0, &m_screenrect, SPIF_SENDWININICHANGE);
shotgun
|
|
|
|
|
You're doing it the wrong way. Read up on "application desktop toolbars" or "appbars" in MSDN, there is a well-defined interface for reserving screen space.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Hello . I want a simple program with 2 form
1. ask User name and password and if it is true then I have permission to use second form
2. in the second form I have registration form and database permission for user that after they registered they can recive one user name and pass then they can use the application .
thank you for your help .
Hello
|
|
|
|
|
Offline or Online?
Offline apps that ask for username and password can use simple file i/o for login if you wanted to... the second form (registration form) could also be easily done with fstream and calling the login part to read from exact file... dats if u wanna do it easily... Online, im stuck on that as well but ill let u know when i get it
If you need help with offline logins then i could help you with what you need, im sure others here will be glad to give u links to articles thatll help you with server logins... There are many articles relating to login authorization, just use the search button
/* Just a Human Trying to Live in a Computers World. */
|
|
|
|
|
Can anyone who have or know where i can get the header file of <unistd.h> help me with it. I tried to search it but the search was fruitless
-oam-
|
|
|
|
|
which header file ?
qcha0s
|
|
|
|
|
Sory i thought i posted it
#include unistd.h
thanx
-oam-
|
|
|
|
|
Are you developing on UNIX? .. I Tlooks like it's a UNIX specific header file
see: [^]
for my google results... I also found this http://aegis.sourceforge.net/doxygen-html/unistd_8h-source.html[^] which is *A* uninstd.h file .. but i have doubts that it's the one specific to the application you are trying to compile ....
IF you can provide details about the application / source / where it was obtained from / what platform your working on etc... I will do my bes to help you out ...
Regards
qcha0s
|
|
|
|
|
Question is, what good is a header file to him anyhow ? I suspect he's got code that includes it, and he has no idea that the header file needs at least a lib file to link to before it's worth anything.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
infact i wanted to compile this code below but now i am working hand in hand with unix machines. But now i wanted to try this application on windows
<br />
#include <stdio.h> <br />
#include <stdlib.h> <br />
#include <unistd.h> <br />
#include <string.h> <br />
<br />
main()<br />
{<br />
char *restart_name, *restart, old_restart_name[BUFSIZ];<br />
FILE *restart_file;<br />
int n;<br />
<br />
<br />
<br />
if (! (restart = getenv ("RSAVE_RESTART"))) {<br />
printf ("Starting a new run.\n");<br />
n = 0;<br />
}<br />
else {<br />
if (! (restart_name = getenv ("RSAVE_CHECKFILE"))) {<br />
fprintf (stderr, "error: no checkpoint file for the restart job\n");<br />
exit (1);<br />
}<br />
else {<br />
printf ("Restarting the job from %s.\n", restart_name);<br />
if (! (restart_file = fopen(restart_name, "r"))) {<br />
perror (restart_name);<br />
exit (2);<br />
}<br />
else {<br />
if (! (fscanf (restart_file, "%d", &n) > 0)) {<br />
fprintf (stderr, "%s: input file format error\n", restart_name);<br />
exit (3);<br />
}<br />
else {<br />
fclose (restart_file);<br />
}<br />
} <br />
}<br />
}<br />
<br />
printf ("n = %d\n", n);<br />
printf ("\tcomputing ... "); fflush (stdout);<br />
sleep (5);<br />
n++;<br />
printf ("done.\n");<br />
printf ("n = %d\n", n);<br />
<br />
if (! (restart_name = getenv ("RSAVE_CHECKFILE"))) {<br />
printf ("checkpointing not requested, exiting...\n");<br />
exit (0);<br />
}<br />
else {<br />
if (restart) {<br />
strcpy (old_restart_name, restart_name);<br />
strcat (old_restart_name, ".old");<br />
printf ("renaming old restart file to %s\n", old_restart_name);<br />
if (0 > rename (restart_name, old_restart_name)) {<br />
perror (old_restart_name);<br />
exit (4);<br />
}<br />
}<br />
printf ("saving data on %s\n", restart_name);<br />
if (! (restart_file = fopen (restart_name, "w"))) {<br />
perror (restart_name);<br />
exit (5);<br />
}<br />
else {<br />
fprintf (restart_file, "%d\n", n);<br />
fclose (restart_file);<br />
}<br />
}<br />
exit (0);<br />
}<br />
<br />
-oam-
|
|
|
|