|
Dear all,
I have written a program and try to run it but get this Dos
screen and message
" Program too big to fit into meemory"
Anybody pls help!!!
thanks you
|
|
|
|
|
what do you do in the program?
[]D [] []D []
|
|
|
|
|
Operating sytem? (Dos 3.1?)
How big is your program?
Do you have any global static arrays?
|
|
|
|
|
Well, i add a few clines for helps files in my project, and complie no problem, but when exe, the message appears
Any expert can solve this problem???
btw,the system i used is p2 500mhz, os win2000 pro ram 256MB
thanks
|
|
|
|
|
Are you using 98 with > 512MB of memory? I seem to remember a friend getting these error messages when he upgraded his PC. There is a "system feature" with 98. i.e. you can't have > 512MB of memory.
It is always worth trying the prog on another PC.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Does anyone know a good unique Encrypting technique to encrypt a string? or a article to read about it?
[]D [] []D []
|
|
|
|
|
|
Hola Willem:
Yo tengo dos alternativas:
1. Uso
CString stFrase;
stFrase.Replace("e", " ");
...
//Esto reemplaza la letra "e" por un espacio, lo hago varias veces con varias letras y al final queda encriptado.
Nos vemos
Saludos desde el Caribe Mexicano
|
|
|
|
|
Hi
I'm trying to create a CSplitterWnd within a CFrameWnd, but I have some problems with that... or MFC. I'm creating the CFrameWnd by calling the Create function, and passing a NULL to the pContext parameter because i don't know how to fill the CCreateContext with valid data.
But my problems starts in the OnCreateClient of the CFrameWnd, when i'm trying to create the CSplitterWnd.
Doing something like this:
<br />
BOOL CMyFrameWnd::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)<br />
{<br />
<br />
<br />
m_MySplitterWnd.CreateStatic (this, 2, 1);<br />
<br />
m_MySplitterWnd.CreateView (0, 0, RUNTIME_CLASS(CMyView), CSize(100,100), pContext);<br />
m_MySplitterWnd.CreateView (1, 0, RUNTIME_CLASS(CMyView), CSize(100,100), pContext);<br />
<br />
<br />
return TRUE;<br />
}<br />
As expected, the pContex is NULL and apparently i'm not allowed to call CreateView and pass NULL to the pContext. CreateView returns FALSE, and after that i'm getting a bunch of assertions and an access violation. So what am i supposed to do to get this to work?
|
|
|
|
|
I guess you create frame wnd from parents OnCreate() method. If so, you should be able to obtain CCreateContext from LPCREATESTRUCT:
CCreateContext* pContext = (CCreateContext*)lpCreateStruct->lpCreateParams;
|
|
|
|
|
Well, I'm doing a MDI app so that would work if I create the CFrameWnd from the MDI child window. But I want to create the window before any MDI child window i created... and the lpCreateStruct->lpCreateParams == NULL in the OnCreate() of the MainFrame for some reason. Any other idea?
|
|
|
|
|
Hi,
I'm using CRegKey to read a value from the registry. It's the name of the Citrix ICA Client:
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client
and the key is ClientName.
I use the following:
CRegKey regKey;<br />
LONG Errr = regKey.Open(HKEY_LOCAL_MACHINE, "Software\\Citrix\\ICA Client", KEY_READ);<br />
ASSERT(ERROR_SUCCESS == Errr);<br />
<br />
CString csValue;<br />
LPTSTR lpBuf = csValue.GetBufferSetLength(MAX_PATH);<br />
ULONG length = MAX_PATH;<br />
<br />
Errr = regKey.QueryValue(lpBuf,"ClientName", &length);<br />
ASSERT(ERROR_SUCCESS == Errr);<br />
<br />
csValue.ReleaseBuffer();<br />
MessageBox(csValue);
And the messagebox displays an empty string!
What am I doing wrong?
Thanks,
-- narada
|
|
|
|
|
Forget about this, it works perfect!
I mistyped the name of the key!
Sorry!
-- naradaji
|
|
|
|
|
Basically I want a pointer to a bmp that has the graded shades of gray in it, and is to be of a certain number of rows and columns of pixels.
How do I generate such a pointer? Are there any links to creating a thing like this in code? I dont have the bmp already...I need to generate it in code.
Appreciate your help,
ns
|
|
|
|
|
I've had to do something similar to this, and it isn't too hard. (I'm recalling from memory here.) You need to look at creating a BITMAPINFO structure, with BITMAPINFOHEADER and color table. These define the dimensions in x and y, and specify your color depth, etc. If you use 8-bit depth and a palette, you can add a color table, which is an array of RGBQuad structures (defining the red, green, and blue components) and then each pixel in the bitmap has the value of the corresponding index into the color table.
If you use more than an 8-bit color depth, then each pixel is not an index to a color table, but the actual RGB triple. Then, allocate enough memory to hold the X-by-Y pixel data for the given color depth. Fill the allocated array with whatever pattern you want (rainbow, stripes, concentric circles, repetitive squares, etc), and you can fwrite the header and the contents of the array to a .bmp file.
It's not too different from creating a DIB in a memory DC. I can probably dig out some code samples if absolutely necessary, but this may be enough to help out (?).
Good luck,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
I followed the procedure you outlined and got it ! Many thanks! Looking at the output inb a hex editor helped debug
Appreciate your help,
ns
|
|
|
|
|
Where in your program it is called?
|
|
|
|
|
Just off the top of anyone's head.
Are there any clever standard method or algorithm to detect a recurring series of numbers?
One of the programs that I work on uses an iterative function, with the resulting number being fed back in, to reach a set solution. Trouble is that sometimes it gets into an infinite loop whereby it 'toggles' between one, two, possibly three series of numbers.
So, are there any standard (and rel. easy!) mathematical methods to 'detect' numerical 'bounces'?
|
|
|
|
|
Are you asking if there is a mathematical way to fix your program's logic?
|
|
|
|
|
Not really a fix.
Just seeing if there are more efficient and standard methods to test recurrance. Otherwise brute (but clever brute) force is necessary.
|
|
|
|
|
I do not know about math, but if I understood you correctly you are looking for
std::count_if or std::count
|
|
|
|
|
Hi,
I would like to control the toolbar (highlights and presses) by using the keyboard. (Left/Right and Enter).
I can do all the UI of it, but i would like to simulate a button press ( and have it call thre relevant function ) right now all that I can do it make it look like the button is being pressed. Any Ideas?
Cheers
Asim.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
There is a TB_PRESSBUTTON Message which should do the job.
Try this @ home. (B&B)
|
|
|
|
|
I'm using the MFC version of the function CToolBarCtrl::PressButton( int nID, BOOL bPress = TRUE );
It does give the UI of a button in a pressed state.
How do I actually call the function associated with a toolbar button (without clicking on it with the mouse button)?
Cheers
Asim
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Hi,
I'm using a normal windows progress bar with my program (common controls - CreateWindow(PROGRESS_CLASS...) etc). However, I would really like to jazz up the progress bar with a gradient fill - ie instead of being all one colour, it should blend from one colour to another. Does anybody know of a good way of doing this?
I'm not an expert programmer by a looong shot, and I'm only using the basic Windows API with no MFC. I've looked at articles here and over on codeguru, such as the gradient progress class by Matt Weagle, but they all seem to be for use with MFC and, because the explanation that comes with them is very brief, take a greater understanding of classes and programming than I have, unfortunately.
If anybody has any links or advice on how to go about this, I would be very grateful.
Many thanks,
KB
|
|
|
|