|
beginner..
plz explain by example how to turn the buffer
|
|
|
|
|
Hi,
the most easiest way to do this is:
#include <string>
#include <algorithm>
using namespace std;
string buffer = "hello world";
reverse(buffer.begin(), buffer.end());
Regards
We can do no great things, only small things with great love. - Mother Theresa
|
|
|
|
|
hi..
i'm writing a program that restrict user from accessing all function in microsoft word. in other word, user can only use a certain function based on their level access. Is there any way to hide the original toolbars in microsoft word and how to create new button to replace the original toolbar.
~ NiNi ~
|
|
|
|
|
Hello EveryOne,
i have design one activex control in MFC having different event.
i have problem to passing structure to event MFC.
i have created one event CallChange and i want to pass user define
structure on that event. but when i add event it only show common data
type as parameter not user define struture.
i want to use that control in VB.
plz help.
Thanx in advance.
Rajesh Kapure
|
|
|
|
|
|
|
If you have the privileges ExitWindowsEx[^]
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
|
Hello All
Is there any command in SDK / MFC on passing the file name can execute with appropriate application.
For Example command ("a.wav") should open "a.wav" file in Real Player or what user has installed / configured to open the *.WAV files.
I can use, WinExec but it needs the executable path to be passed. User can install any type of player and configure different type of file format to open in different players.
One Clue is in the Command Prompt if we type the file name it automatically finds the application to be used and opens the file. If the file extension is not mapped with any applicaiton it automatically open the "Open With" dialog box.
So I there is any command which executes the string passed as in command line it will do.
Is There any command?
Thanks for your time
Ravi
|
|
|
|
|
|
Try it:
ShellExecute(NULL,"open","a.wav",NULL,"C:\\MyFolder",SW_SHOWNORMAL);
or
ShellExecute(NULL,"open","C:\\MyFolder\\a.wav",NULL,NULL,SW_SHOWNORMAL);
|
|
|
|
|
It is working fine... Thank you all...
-Ravi
|
|
|
|
|
|
can anyone help me.
i need to change the attribute of a folder. i need to deny the write access of the computer administrator of a certain folder. can anyone help me.
if you need further inputs. please do notify me...
thanks...
regards...
"a man is not judged by his looks but by the way he acts..."
moodsey211
|
|
|
|
|
My dialog have a button and I had edit the code like below:
typedef struct
{
SOCKET Skt;
SOCKADDR_IN AddrFrom;
int nAddrFromLen;
LPVOID ParamPointer;
}SOCKETDATA;
SOCKET ServerSkt;
void CTCPTestDlg::OnBtnstart(LPVOID lParam)
{
// TODO: Add your control notification handler code here
char szMessage[300];
wsprintf(szMessage, "(ListenThread) - Starting TCP/IP Initialisations.");
// WriteSysLog(szMessage);
ServerSkt = socket ( AF_INET, SOCK_STREAM, 0 );
if ( ServerSkt == INVALID_SOCKET )
{
//wsprintf(szMessage, "(ListenThread) - socket() Error. Unable to Create Server Socket.");
//WriteSysLog(szMessage);
printf("Error!");
}
else
{
SktAddr.sin_family=AF_INET;
SktAddr.sin_port=htons(ReadPortNo("[TCP.FLDATA.SRV.COMMUNICATION]"));
SktAddr.sin_addr.s_addr=htonl(INADDR_ANY);
if ( bind ( ServerSkt, ( LPSOCKADDR ) &SktAddr, sizeof ( SktAddr ) ) == SOCKET_ERROR )
{
//wsprintf(szMessage, "(ListenThread) - bind() Error. Server Socket Binding Failure.");
//WriteSysLog(szMessage);
printf("Error!");
}
else
{
wsprintf(szMessage, "(ListenThread) - TCP/IP Socket Binding Completed Successfully.");
WriteSysLog(szMessage);
if ( listen ( ServerSkt, SOMAXCONN ) == SOCKET_ERROR )
{
//wsprintf(szMessage, "(ListenThread) - listen() Error. Server Socket Unable to Listen for Connections.");
//WriteSysLog(szMessage);
printf("Error!");
}
else
{
wsprintf(szMessage, "(ListenThread) - TCP/IP Listening Stage Completed Successfully.");
WriteSysLog(szMessage);
hThread=AfxBeginThread (AcceptThread,lParam,THREAD_PRIORITY_NORMAL);
if ( hThread == NULL )
{
//wsprintf(szMessage, "(ListenThread) - AfxBeginThread() Error. Unable to Create AcceptThread() Thread.");
//WriteSysLog(szMessage);
printf("Error!");
}
else
{
wsprintf(szMessage, "(ListenThread) - AcceptThread() Thread Spinoff Completed Successfully.");
WriteSysLog(szMessage);
return 0;
}
}
}
}
return 0;
}
After I compile, it have 9 errors occur as below:
error C2146: syntax error : missing ';' before identifier 'Skt'
error C2501: 'SOCKET' : missing storage-class or type specifiers
error C2501: 'Skt' : missing storage-class or type specifiers
error C2146: syntax error : missing ';' before identifier 'AddrFrom'
error C2501: 'SOCKADDR_IN' : missing storage-class or type specifiers
error C2501: 'AddrFrom' : missing storage-class or type specifiers
error C2146: syntax error : missing ';' before identifier 'ServerSkt'
error C2501: 'SOCKET' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found
Error executing cl.exe.
I don't know how to solve it. Can somebody tell me
-- modified at 2:43 Tuesday 30th August, 2005
|
|
|
|
|
as it's already been said, you are missing a header file to include...
you must have a #include <> before using those types (they are declared somewhere ; C++ need those declarations before their use).
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 2:55 Tuesday 30th August, 2005
|
|
|
|
|
did u check the braces { } properly..?
Regards,
V
|
|
|
|
|
Hi,
Can any one kindly let me know this. I have one dialog based program. In that I have different Text Boxes. In one condition I need to make some text boxes readonly. At that time if I pressed tabkey, I don't want to enter into that text box(It should be only for some situations). I could able to do readonly based on conditions, but when I press Tabkey I could not able to trap the control from that Textbox programatically. Please let me know if any one know this.
Thank you.
-Haranadh
|
|
|
|
|
manually = at runtime ? Then you have to modify the style of the control and delete the WS_TABSTOP style
m_edit.ModifyStyle(WS_TABSTOP,0);
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Consider disabling the controls (EnableWindow(FALSE) ) instead of making them read-only. Being disabled, they would be automatically skipped when navigating with the tab key. Besides, it gives a better feedback to the user because the fact that there's no way to change the data is made more evident. The only drawback is that the user won't be able to select and copy the content to the clipboard.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
OK, two more then. I have managed to fix almost all my linking problems, except two, as follows:
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
Now, I've googled this message, but I've found nothing helpful, so any suggestions anyone has would be most appreciated.
Christian Graus - Microsoft MVP - C++
-- modified at 1:45 Tuesday 30th August, 2005
Wow - that's cool. The modification is as follows:
I'm building with /MT and using MFC in a static library. I found some stuff on google that says I need to use a shared library, but that's not possible, it will then not link with other libraries that I am using.
|
|
|
|
|
try including stdlib.h in the app's stdafx.h file.
|
|
|
|
|
Doesn't help, and I didn't expect it to - this is a *linking* error.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Sadly, no. I know about this problem, it's how I solved all my other linker problems. I need to use /MT or the program won't compile at all, and I am indeed using it everywhere.
Christian Graus - Microsoft MVP - C++
|
|
|
|