|
As far as I can see that value is only the predefined, initially reserved memory for the stack. At least for all my applications SizeOfStackReserve is 1048576 Bytes (= 1 MB) and SizeOfStackCommit is 4096 Bytes. I've gathered that information with the following code which analyses .exe files:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q90493
I'd like to know how big at a certain point during runtime my stack is...
-- modified at 6:54 Wednesday 29th March, 2006
|
|
|
|
|
this topic show how to read data from excel file by using ODBC: http://www.codeproject.com/database/excel_odbc.asp.
This program runs very good, but when i Open "ReadExcel.xls" from "Microsoft Office Excel" and then insert some rows(not change struct of file), and then close it. Next i go back the program and read again, the new data could not load. The program show three row only, and when i debug. I see, Recordset have three row only.
Why? How to correct it?
|
|
|
|
|
You would have more luck in getting an answer if you ask your question in the article's forum at the bottom of the article page. You just might get the attention of the author....
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
Thanks for your suggest.
But i have found it from other topic in this forum.
See: http://codeproject.com/database/cspreadsheet.asp
The problem is: the select sentence is not enough for read all change data(all excel file):
origin:
sSql = "SELECT field_1, field_2 "
"FROM demo_table "
"ORDER BY field_1";
I correct it to:
sSql = "SELECT field_1, field_2 "
"FROM [demo_table$A1:IV65536] "
"ORDER BY field_1";
|
|
|
|
|
hi everyone
im developing an MFC project that(among other things) displays a bitmap directly on the form.
the problem is that when i draw a large picture and move the windows several times it stops displaying!! or display a part of the picture.
any help ??
|
|
|
|
|
Hi Amr Shahin,
Stop display? do you use WM_PAINT
Can you be more specific
|
|
|
|
|
Are you using a CStatic object or you draw it directly by OnPaint method? The first is a sure way to do the drawing but for the second method you need a double buffered DC to erase any flickering on the screen / window. Good luck and good coding!
|
|
|
|
|
im using the onpaint method; so i guess i should use the double buffered DC; the problem that i dont know what the double buffered DC is !!! :$.
i only use regular DC!
can u plz tell me how to use a double buffered DC ??
thanks alot
|
|
|
|
|
|
I have just spent the last 2 weeks developing a class which is able to monitor all changes within an edit box. I know it sounds like nothing big but trust me it is.
I am able to trap, monitor and change most messages that deal with this and all is working well. Until I tried inserting Unicode text with the aid of an IME. Here is the problem. When the IME window is open, due to the nature of this class it is forced to close. This is preventing the user from changing their compostion.
What I need to do is quite simple, just prevent my class from executing until the composition has been finalised. In theory I just need to check if the compostion window is open, but I am unable to find any such function or message which is able to do this.
Please help, I really need to find an answer to this.
|
|
|
|
|
Not entirely 100% clear on the issue, but assuming you are running windows you can do something like enumerate all the windows and search for a caption or similar. This isn't the best solution, but is about all you can do if you don't have full control of whatever is spawning/closing the window.
In order to enumerate the windows you can take a couple of approaches: If you know what process owns the window, you can call EnumProcessWindows(), otherwise you will need to call EnumWindows() and check for child windows with EnumChildWindows(). I'm a little short on time at the moment so sorry I can't give a good example, perhaps later tonight. Anyway I hope this helps a little.
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
Assuming you are running windows you can do something like enumerate all the windows and search for a caption or similar. This isn't the best solution, but is about all you can do if you don't have full control of whatever is spawning/closing the window.
In order to enumerate the windows you can take a couple of approaches: If you know what process owns the window, you can call EnumProcessWindows(), otherwise you will need to call EnumWindows() and check for child windows with EnumChildWindows(). I'm a little short on time at the moment so sorry I can't give a good example, perhaps later tonight. Anyway I hope this helps a little.
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
Assuming you are running windows you can do something like enumerate all the windows and search for a caption or similar. This isn't the best solution, but is about all you can do if you don't have full control of whatever is spawning/closing the window(unless you want to apply some hooks ).
In order to enumerate the windows you can take a couple of approaches: If you know what process owns the window, you can call EnumProcessWindows(), otherwise you will need to call EnumWindows() and check for child windows with EnumChildWindows(). I'm a little short on time at the moment so sorry I can't give a good example, perhaps later tonight. Anyway I hope this helps a little.
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
I have read what you have said and it does not make since to me. First, stop getting down on yoyrself (A bad habit of mine). When you say "it sounds like nothing", you are correct (for some of us, in part), but that does not mean that it is. That is a matrer of who is reading your post.
I believe your problem is a bit more complecated than that.
What you are looking for is not as simple as you think, when deling with IME. It sounds like you waont to mix the two, which you (theoretcicaly) can not.
INTP
Every thing is relative...
|
|
|
|
|
Like I said the solution is simple, I just need to find the IME window and check if it is open.
Finding the window is not so simple as searching for the window title, since all the IME really is is an edit box which floats around on the screen positioning itself (usually) over the caret. This actually changes from system to system, depending on the IME version, OS and users settings.
the solution was infact very simple, and I blame myself for not seeing it in the hundreds of IME specific messages and commands.
HIMC hImc = ImmGetContext(hEdit);
if(ImmGetOpenStatus(hImc) )
return false;
|
|
|
|
|
Whoa! Major blond moment! Just ignore the stupidity below. I found the problem. I just had to change the property for this file to ignore the precompiled header.
----- stupid question follows ---------------------
I'm using Monty's HTML List Control (a real rockin' control) and I keep running into a problem with the DrawHTML.c file getting the error:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Yesterday I was somehow able to convince the compiler to accept this file, but today I keep getting this error. There must be some sort of compiler parm that's needed, but I couldn't see anything that jumped out at me by inspecting Monty's example program.
What is going on? Can anyone shed some light on this?
Thanks.
-- modified at 1:40 Tuesday 28th March, 2006
|
|
|
|
|
Abu Mami wrote: fatal error C1010: unexpected end of file while looking for precompiled header directive
It is missing the stdafx.h header file. Including this could solve your problem.
Nibu thomas
Software Developer
|
|
|
|
|
Hi Nibu, thanks for responding. However, I had already tried your suggestion and that didn't work. Since, or course, the file is a C file and not a CPP file.
Read my original post again. I found the answer and modified my original post.
Thanks
|
|
|
|
|
Abu Mami wrote: Since, of course, the file is a C file and not a CPP file.
Why do you think it won't work with a C file.
Nibu thomas
Software Developer
|
|
|
|
|
Nibu thomas wrote: Why do you think it won't work with a C file. Because when I tried it, the compiler complained that I couldn't use the precompiled header with a C file. Call me naive
|
|
|
|
|
You can give the option 'Not Using Precompiled Headers' for the file and then try to build it.
Vini
|
|
|
|
|
Thanks Vini - That in fact is what I discovered and it works just fine. Just took me a little while till I stumbled across this option.
|
|
|
|
|
Under VS2005, create a ATL project and add a simple ATL object into it.
Compile it using the x64 Configuration, all are ok! But if i add IContextMenu interface to it: first add--
public IShellExtInit,
public IContextMenu
and then add--
COM_INTERFACE_ENTRY(IShellExtInit)
COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
then the functions
STDMETHOD(Initialize)(LPCITEMIDLIST, LPDATAOBJECT, HKEY);
STDMETHOD(GetCommandString)(UINT_PTR, UINT, UINT*, LPSTR, UINT);
STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO);
STDMETHOD(QueryContextMenu)(HMENU, UINT, UINT, UINT, UINT); and in cpp file write their definitions.
All can be compiled, but the Explorer didn't load the DLL at all. And i tried using regsvr32.exe to register it, it is successful. But explorer is still didn't load the DLL, why??
I wrote nothing but "::MessageBox(NULL,NULL,NULL,MB_OK); return E_INVALIDARG:" in all function, but whenever i right click the mouse, no message box showed.
Enemy down! Go go go!
|
|
|
|
|
This trouble is already fixed, but why couldn't i use the Dll in this project, i mean invoke another dll's function in this project, it will show that:
Linking...
Creating library x64\Debug\PWContext.lib and object x64 Debug\PWContext.exp
Embedding manifest...
Registering output...
Project : error PRJ0050: Failed to register output. Please ensure you have the appropriate permissions to modify the registry.
And i am just logon as administrator and can modify the registry! Who can help me?
|
|
|
|
|
Fixed!
|
|
|
|