|
HA,
Well, you have cut that permutation count down to 62 factorial. Good luck.
As with any decryption, you need to know the language it was written in in order to see if the proposed decryption makes any sense. This is why encrypting something twice, with two different algos, is such a bitch to decrypt. The first decryption will give you an intermediate text that is still encrypted so you don't know if the first decrypted correctly until you try to decrypt the second time.
Dave.
|
|
|
|
|
Look into some kind of character frequency analysis (works for simple encryption schemes). That might cut down the computational complexity a bit. And no, I'm not going to tell you how to do it, since it's a homework.
|
|
|
|
|
Hello, I'm not too experienced C coder, so I have a question:
Where I should define those strings I'll be using? In the header or where it's used? If I wrote them in the header, the result would be much like that string pooling flag in the compiler options, right? I'm trying to code a GUI (with WinAPI) and I started wondering this.
Here's an example:
main.h:
const TCHAR g_lpErrorText[] = TEXT("Error!"); main.c:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, g_lpErrorText, g_lpErrorText, MB_ICONEXCLAMATION|MB_OK);
return 0;
}
OR
main.c:
WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, TEXT("Error!"), TEXT("Error!"), MB_ICONEXCLAMATION|MB_OK);
return 0;
}
|
|
|
|
|
I tend to prefer the latter. If combining strings is turned on in the optimizer, which it usually is, it won't matter, though if the instances of using the string are separated, I tend toward a version of the former:
LPCTSTR pErrorText = _T("Error!");
or if you want to make it more obvious:
const TCHAR* pErrorText = _T("Error!");
(For strings that may be localized (translated), I make them resources.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
modified on Sunday, May 3, 2009 8:19 PM
|
|
|
|
|
Joe Woodbury wrote: (For strings that may be localized (translated), I make them resources.)
You actually answered my second question too, which I forgot to ask, hehe. Many many thanks!
|
|
|
|
|
Hi,
I trying to make make my rich edit control wide enought to contain a certian amout of characters
I have read and understand the article on this site by Thales Carvalho
that plays around with the Hieght of the Rich edit control until the
desired width is returned
Howevers since I would ike to display a certain amount characters on a
Line it would be nice to know where I can get the Font used by Rich
edit
I have tried the following code
CFont* fontobject = Myricheditctrlptr->GetFont();
LOGFONT lf;
fontobject->;GetLogFont(&lf);
but get NULLS returned for fontobject
this code lives in My ::onInitDialog rtn after I have created my rich
edit and Used EditStream to populate the edit window
Any insights would be apprecaited ...
|
|
|
|
|
|
thankx
charformat structure only has a Height paramter as rich edit is bottomless and will break up words
woncder I can create CFONT class for this font and get the logfont which would give the lfwidth for this font type
I think I got a better idea of how to get what I want
thankx again
|
|
|
|
|
Hi
I have a MenuBar that is in English and is created using CommandBar::InsertMenuBar. It all works fine but I want to be able to change font of MenuBar main buttons that are shown at bottom. I can change individual menuitems by subclassing the menu but can't seem to be able to change the buttons.
If I could get handle to those buttons, I could subclass them to override font myself.
Also, is there a way to override system font only for my application. I don't want to change it in registry.
-----------------------------
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
New MFC is missing a CMFCListView class that would be able to use the new CMFCListCtrl. The reason for the attempt to use CMFCListCtrl is due to it's new header that does supports nice ordering and other stuff.
I followed the article from here[^] but it looks like it doesn't work if you are using LVS_OWNERDATA.
I created a sample application using the wizard just for this test. There are 4 configuration you can build Debug,Release,Debug-New,Release-New - the ones with new will try to use CMFCListCtrl instead.
Some problems I saw are: the new CMFCListView is that it doesn't receive LVN_GETDISPINFO, the new header is not displayed but if you scroll it will show it. Any hints on this?
The project is located here: http://nusunt.eu/download/mfc/cmfclistview_test_1.zip[^] and to compile and test you need VC2008 SP1+FeaturePack.
Best regards,
Sorin Sbarnea
|
|
|
|
|
How can I configure visual studio 2005 so that if I create a windows API application, it would run on windows xp system that does not have any .net framework installed. With visual c++ 6, this problem does not occur but with visual studio 2005, the application can run only when .net framework is installed on the user's system. How can I configure visual studio 2005 to avoid such problem. Please help.
|
|
|
|
|
Which type of Windows application are u making?? MFC application or CLR application?? For standard MFC application you need to install Visual C++ runtime libraries and for standard CLR application .NET is required. Compiling MFC application by static linking may avoid the need to install C++ runtime libraries. A way to avoid libraries for VC++ can be found here[^]>. This method may be tried in VC++ 2005
modified on Sunday, May 3, 2009 11:16 AM
|
|
|
|
|
The application was programmed neither as MFC nor CLR but rather, in the old style of Win32 API Programming (Windows Application). A typical Win32 application is a very short application shown below.
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "I want to make configurations to Visual Studio 2005", "Help", MB_ICONINFORMATION)
return 0;
}
The above application, if compiled with Visual Studio 2005 (VC++ 2005) does not run on a system running windows that does not have .net framework installed. The system reports that the application configuration is incorrect, and that the application needs to be reinstalled.
However, the same application if compiled with VC++ 6 can run on any system running windows that does not have .net framework installed on it. It can even run on Vista, which I have tried myself. I need to make this configuration so that the application does not require .net framework before it runs.
|
|
|
|
|
You can either statically link your application to the C-runtime libraries or install the VC redistributable package on the target computer. This executable can be found here[^].
By the way, this is not the .NET framework which is required but the C-runtime libraries.
|
|
|
|
|
how can i generate a file of my program after a specific time mean i keep do use my program but in the back after suppose 2 min its automatically creat file
|
|
|
|
|
Wouldn't you just use SetTimer and then either provide a pointer to the callback function or just handle WM_TIMER messages in the main window function?
|
|
|
|
|
In addition to SetTimer() , check out CreateTimerQueueTimer() .
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I want to know how to convert a process handle to the process id.
is it possible?
|
|
|
|
|
Do you need to GetProcessId ?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
GetProcessId, i do need it someone has told me about it , but in the msdn
i can't find any document of this api,why? can this api be used in xp?
|
|
|
|
|
|
in msdn oct 2001 ,this function is not documented.why?
|
|
|
|
|
Um, er, ah, Just to hazard a guess -
Minimum supported client is WinXP SP1.
XP SP1 was released on Sep 9 2002, not quite sure how it would make it into the MSDN that was released 11 months prior.
Well, that's my uneducated take on it anyway...
The thing I'm curious about, is why you would want to know how to (a)hide your program from the task-manager programs list and (b) how to get a processId.
Me wonders if you aren't producing a piece of malware?
modified on Sunday, May 3, 2009 9:39 AM
|
|
|
|
|
i am not producing a malware.I work on a office lan control app.I don't want the employee to stop my client part.so i need these technics.
thank you to your help.
|
|
|
|
|
tyr2000 wrote: office lan control app
Well, that sounds like malware to me
|
|
|
|