|
I don't get it. Can you explain in more detail?
Steve
|
|
|
|
|
the screen must be like dis:
Enter 13 digit number: 1234567890123 //let say user enter this number
randomized to: 0123456789123
0123456789123
0123456789123
0123456789123 //the randomized numbers must diplay in four rows...the same ranomized number
show in one row: 0123456789123 0123456789123 0123456789123 0123456789123
//the result must be shown in one row...
//then continue wuth next randomized number from the same 13 digits entered
next randomized number : 3456789012123
3456789012123
3456789012123
3456789012123
show in one row: 3456789012123 3456789012123 3456789012123 3456789012123
//repeat the same task.
|
|
|
|
|
I'm still not sure what you mean but this might help:
-----
// Console.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
void DoStuff()
{
// Get the input from the user.
cout << "Enter string: ";
string s;
cin >> s;
cout << endl;
for (int i=0; i<10; ++i)
{
random_shuffle(s.begin(), s.end());
cout << "Randomised: " << s << endl;
}
}
int main(int argc, char* argv[])
{
DoStuff();
return 0;
}
Steve
|
|
|
|
|
thank u...but i still cant get it..anyway it help me a little..
|
|
|
|
|
What is the difference between what you want and what this program does?
Steve
|
|
|
|
|
okies...ur program helped me to find da solution...i ve done it...thank u brother..anyway wer ya frm...wut ur profession!
|
|
|
|
|
I'm from Australia. My profession is a programmer - Does that make me a professional?
Steve
|
|
|
|
|
I am having problems using the IStorage interface with multiple writers. I've reviewed and used all the info on MSDN regarding these but regardless if I have two writers at the same time, I lose the changes of one.
In particular I've noticed problems using multiple writers and TRANSACTED mode, I was wondering if anyone has done any work with this?
Specifically, if I have two writers open the storage at the same time and the modify two different streams or sub storages, the writer that closes the storage last keeps their changes. It does not seem to matter what flags I specify and I can't seem to get this working with multiple writers. If you have any suggestions please let me know.
Thanks,
Dustin
DH
|
|
|
|
|
am i using sockets correctly?
<br />
class CMySocket : public CAsyncSocket<br />
{<br />
public:<br />
CMySocket() : CAsyncSocket() {}<br />
<br />
void OnAccept()<br />
{<br />
_tprintf(_T("incoming connection\n"));<br />
}<br />
};<br />
<br />
<br />
if( !AfxSocketInit() )<br />
_tprintf(_T("Cannot init sockets"));<br />
<br />
CMySocket* sock = new CMySocket;<br />
if( sock->Create(1935,SOCK_STREAM,FD_READ | FD_WRITE) )<br />
_tprintf(_T("Created!\n"));<br />
if( sock->Listen() )<br />
_tprintf(_T("Listening!\n"));<br />
delete sock;<br />
the thing is that listening doesn't seem to get aby results though another app connects to that port. i am sending data from my FLASH movie via XMLSocket object but no result
|
|
|
|
|
Some time ago when it was common that an application/game came on a single diskette one way to make it fit was to compress the executable and then inflate it on startup into memory.
Is something similar available for Win32 executables?
Thanks Andre
|
|
|
|
|
|
Hi All,
The project I am working with is a Win32 in Visual c++ 6.0.
I am calling the API GetEffectiveRightsFromAcl:
dwResult = GetEffectiveRightsFromAcl(
ppDacl, // PACL pacl,
pTrustee, // PTRUSTEE pTrustee,
&dwAccessMask // PACCESS_MASK pAccessRights
);
It is returning with error code 1722 (RPC_S_SERVER_UNAVAILABLE).
The parameters ppDacl and pTrustee seem to be set properly.
Other APIS, such as GetExplicitEntriesFromAcl and LookupPrivilegeValue can be called with no errors returned.
Any help is appreciated.
Edward
|
|
|
|
|
|
I have a dialog box with a button. I want to handle the following event: the right button mouse click on the dialog box button. How can it be done?
AMV
|
|
|
|
|
Subclass the button and handle the WM_RBUTTONDOWN and WM_RBUTTONUP messages. There are several articles on subclassing controls here on CP, just do a search.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
|
void CssDlg::OnContextMenu(CWnd* pWnd, CPoint point)
{
HMENU hmenu,hmenuPopup;
hmenu = LoadMenu(AfxGetApp()->m_hInstance,(LPCTSTR) IDR_MENU1);
//you can use like this
if(pWnd->m_hWnd==m_Button1.m_hWnd)
hmenuPopup = GetSubMenu(hmenu, 0);
else
if(pWnd->m_hWnd==m_Button3.m_hWnd)
hmenuPopup = GetSubMenu(hmenu, 1);
TrackPopupMenu(hmenuPopup, TPM_LEFTALIGN | TPM_LEFTBUTTON,
point.x,point.y, 0, pWnd->m_hWnd, NULL);
DestroyMenu(hmenu);
}
|
|
|
|
|
I'm trying to decide when it's best to use a dialog based app and when to use a normal window.
What are the advantages and disadvantages of both methods ?
What basic rules should I use to decide which method to use ?
|
|
|
|
|
Just found the following article by Nish
http://www.codeproject.com/dialog/pretransdialog01.asp
which indicates a key difference "...is that in a dialog based application the focus is always on one of the child controls and not on the main dialog window."
He also gives a couple of ways to handle keyboard messages and accelerators.
Aside from this, are there any other big differences ?
|
|
|
|
|
What do you mean by a normal window ? A dialog box is also a normal window .
Are you speaking about the SDI (single document interface) framework ?
|
|
|
|
|
I mean a non-dialog window (eg. SDI or MDI).
|
|
|
|
|
Then it depends of the complexity of your program. The advantage of SDI/MDI apps is that they have the document/view architecture that can help a lot writing complex applications. But also, if you have a very simle app (two buttons and an edit box for example ), then it is a little bit overkill.
Of course, I'm speaking here about a SDI (or MDI) app when the view class inherits from a CFormView (to have a something similar as a dialog box).
-- modified at 15:56 Tuesday 2nd May, 2006
Also, what I forgot to say is that SDI/MDI apps offer more support for toolbars, menus, serialization, ...
|
|
|
|
|
I will be thankful if anyone can describes me the coding of " scientific calculator by Tahir Naeem".specially MFC functions in this calculator..........plzzzzzzzzzz.......
before 4th may 2006........plzzzzzzzzzzzzzzzzzzzzzz
I m waiting.........
|
|
|
|
|
Could you stop begging? plzzzzzzzzzz plzzzzzzzz plzzzzzzzz?
|
|
|
|
|
Is it possible to open Shared Memory in a C# Windows application, that was created in a C++ app using the CreateFile, CreateFileMapping API.
(& if it is possible, can I get a hint where to start looking for some "instructions" (e.g., sample code)?)
|
|
|
|