|
- Thanks, Nish pal!
- Your reply helps a lot. I still have a question. In MSDN (Ti: GlobalMemoryStatus), it is said, "// There are 150960 total Kbytes of paging file.".
- I do not know what means "paging file". Can you show me an example?
- Regards,
Maer
|
|
|
|
|
There's a tool that comes with VC that can simulate this if you're wanting to test your code under the extreme conditions (which is a very good thing btw).
Todd Smith
|
|
|
|
|
- Thanks, Smith pal!
- Your reply helps a lot. I still have two questions.
- 1. What is the tool? Where can I find it?
- 2. What means "btw"?
- Can you help?
- Regards,
Maer
|
|
|
|
|
Man, this question is a lot harder than it sounds. The quick answer is 2GB if you don't use AWE.
GlobalMemoryStatus is a start, but there are other issues. First would be what is the total number of pages a process is allowed to allocate. Second, even if you could in theory allocate tons and tons of memory, fragmentation of the address space will limit you to the total amount of memory.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
- Thanks, Smith pal!
- Your reply helps a lot. I still have a question. What means "AWE"?
- Can you help?
- Regards,
Maer
|
|
|
|
|
howdy, i'm still learning alot about MFC and some c++ and i have looked through the forms and found answers to my other problems but not this one, so sorry if its been asked before.
might seem simple but i'm have trouble setting text for a subitem in a list control, i have 2 comlumns, name and status i add items under name fine but have tried a few different things to add items under status, any help would be great, thanks
muz
|
|
|
|
|
Use SetItemText(). This example assumes the list control already has an item at index zero.
CListCtrl* pListCtrl = (CListCtrl *) GetDlgItem (IDC_LISTCTRL);
ASSERT (pListCtrl != NULL);
VERIFY (pListCtrl->SetItemText (0, 0, "Ravi Bhavnani"));
VERIFY (pListCtrl->SetItemText (0, 1, "Geek"));
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks for the quick reply, it worked
thanks again
muz.
|
|
|
|
|
I have written a static library with a CDialog divivative in it, and drawn a grid on the dialog, I then wanted to traverse my grid and needed to capture key presses e.g. UP '1' '2', I did this using entries in an accelerator table. I can now capture the key presses, but each key press makes a beep, is there any way to disable this beep?
also is there any way to stop the up,down,left and right keys from changing the currently focused button or component??
cheers!!
Andy
Andy
|
|
|
|
|
I'm using a CRecordset with three parameters to read and write data to a database table, but I'm having some problems selecting records where one of the columns contains no value (NULL).
How do I set my filter when I want one of my specified paramters to be NULL in the database?
This is my filter now:
prsFoo->m_strFilter = "ColumnA=? AND ColumnB=? AND ColumnC=?";
prsFoo->m_ColAParam = m_ColumnA;
prsFoo->m_ColBParam = m_ColumnB;
prsFoo->m_ColCParam = m_ColumnC;
But what should I set m_ColCParam too if I want that column to have no value (NULL) in the selected set? My member variable m_ColumnC is a CString and when it's empty I want to select the records without a value in column c.
Any help would be greatly appreciated! Thanks!
|
|
|
|
|
|
When using SetParamNULL I get the same result, ie. a new record is created when one should just be updated.
I also get the wrong id back when doing a requery to find the id of the added/updated entry.
If I remove the parameter from my recordset, or give it a value, everything works just fine.
|
|
|
|
|
The problem may be related to the fact that you're trying to compare a column in DB to NULL. While some databases permit that, others do not - generally, you should use IS NULL instead.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Yes, it might be. But with my current design, building on CRecordsets and filters with parameters, it's difficult to manually compare the field with IS NULL.
I'm using MS SQL server so I really don't think this should be the problem. But as it looks right now I'm probably wrong.
Thanks for your help though!
|
|
|
|
|
|
Jimmy:
The Filter is the where of a SQL Sentence.
When you make a select you need to make this
Select * from Table where Field1 = anyvalue and Field2 Is Null
Is for this that you need to use
prsFoo->m_strFilter = "ColumnA=anyvalue AND ColumnB=anyvalue AND ColumnC Is Null";
Best Regards....
Tomorrow is Friday!!! Party and
Carlos Antollini.
|
|
|
|
|
I have now got SetFocus calling when my mouse leaves my window, and TrackMouseEvent when I am in it. The trouble is that in MouseMove I check to see if I am in the rect, and if so, check if TrackMouseEvent is set, and set it if I need to. Otherwise I call SetCapture. Unless I comment out the call to _TrackMouseEvent that sets it in MouseMove, I cannot click on any of the buttons in my PropertySheet, nor can I drag the title bar or press the close button. I tried sending the message via the property sheet, but it didn't make any difference.
Can anyone tell me how all this junk is supposed to work ? I can't find an implimentation that allows me to capture the mouse outside my dialog, act normally within it, AND drag the dialog if I want to.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Can anyone tell me how all this junk is supposed to work ?
I can't. But I can smell the global hook around
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I need to hook the mouse move so I can set/release the capture there ? That sounds like a fine idea. Actually I've always wanted to learn about hooks, but never had an excuse to.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
I need to hook the mouse move so I can set/release the capture there ?
No - with a global mouse hook your procedure will receive all mouse messages. The need for SetCapture disappears, everyone is happy. The only drawback is that global hook must live in a DLL.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
OK, will I be able to turn it off and on ? I only need all messages in one specific dialog.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
OK, will I be able to turn it off and on ?
Yes, UnhookWindowsHookEx has a nice name and does the magic
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks for the info. This will save my bacon nicely, as well as giving me a good excuse to finally learn how to put together a dll, and a Windows hook.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Arrggghhh....
On one of my dialogs, I've got a combo box with its type set to Drop List, and Owner Draw set to No. There's nothing unusual about the combo box, it contains four items (for now), but, for some reason, when you make the combo box drop, you can only see one item in the list. There are the usual scroll bars on the right, and all the items are there, but what I'm really after is having the box display all four items without the scroll bars (when dropped). I've tried disabling Vertical scroll, enabling Disable no scroll, and just about everything I can think off, but none of them give the desired effect.
Any ideas folks? Its such a basic thing and really doing my head in!
|
|
|
|
|
when you are in your dialog resource window (the window where you were when you first put the combobox on the dialog) click on the arrow of the combobox as if you were going to drop it down and the bottom 'handle' should turn from white to blue. Take that and drag it down and the 'mask' around the combobox should have a bunch of empty space under the box. The empty space is how far down your combobox will drop down during runtime.
Hope this helps.
-Zack
|
|
|
|