|
[CoY0te] wrote:
really little changes in the code
what are those?(you had to do something to exceed 264 Mb)
|
|
|
|
|
Nothing that should have anything to do with the image size. I can't really tell when this warning message occured for the first time. Right now the application is working again but I still get this message. I did some changes in code, and then i've reconstructed one loop. Finally the code is almost the same as it was but somehow it works.
At one moment it was just just a matter of 4 calls to glVertex (OpenGL;) between glBegin(GL_QUADS) and glEnd().
These calls used no arrays - they used immediate arguments, but adding them caused the crash - unbeleivable.
I'm really getting sure it was it is a compiler or linker bug or something.
I have solved the problem (temporally) but still heven't found the real reason.
Thanks for your help.
[ CoY0te ]
Railgun is like a Gilette Mach 3 - it does the job with one, easy stroke.
|
|
|
|
|
It says return TRUe unless you set focus to a control. I imagine that if I have:
OnInitDialog()
{
FunctionThatsetsFocus();
<code> return FALSE;</code> ??
}
I should return False = correct? Since even if I'm not setting focus in OnInitDialog, a Function I call in it, does...
Appreciate your help,
ns
|
|
|
|
|
|
Is there any way to log off a user?
I need to log off the current user, so the system shows the logonscreen.
I'm working on Win2k/XP.
Just a hint would be great, as I can't find any way to do it...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
ExitWindowsEx(EWX_LOGOFF,0);
|
|
|
|
|
Oh yeah. On NT, make sure to enable the SE_SHUTDOWN_NAME privilege 1st.
e.g.
HANDLE hToken;
VERIFY(::OpenProcessToken(::GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY,&hToken));
TOKEN_PRIVILEGES tkp;
VERIFY(::LookupPrivilegeValue(NULL,SE_SHUTDOWN_NAME,&tkp.Privileges[0].Luid));
tkp.PrivilegeCount=1;
tkp.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED;
VERIFY(::AdjustTokenPrivileges(hToken,FALSE,&tkp,0,0,0));
|
|
|
|
|
Thanks a lot
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Try this:
ExitWindowsEx(EWX_LOGOFF, 0);
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hi,
I like to use ::SetTimer() with a callback function, rather than having a CWnd::OnTimer() handler. Is it still synchronized with my other window message handlers... all in one thread context etc, no overlapping calls?
I use ::SetTimer() in a class not derived from CWnd, that's why I ask. Hmm, I think it is synchronized, so I don't need to use mutex or a critical section. But I want to go sure!
MSDN says: "When you specify a TimerProc callback function, the default window procedure calls the callback function when it processes WM_TIMER". Since my class with the timer is not derived from CWnd, how does the timer callback work?
Thanks, Moak
|
|
|
|
|
It also says that "the default window procedure calls the callback function when it processes WM_TIMER. Therefore, you need to dispatch messages in the calling thread, even when you use TimerProc instead of processing WM_TIMER."
So the timer callback is called as part of the work of the default window procedure. Hence you must have a/be processing your message queue (no console apps) and it is synchronous.
|
|
|
|
|
Thanks Scott!
I also found this timer arcticle[^] describing: "After the timer is created, it sends WM_TIMER messages to the window message queue, or if no window was specified, to the application queue."
So... as long as I have a message pump, I should be lucky. Good news
|
|
|
|
|
Is anyone who knows how to create a phonebook entry (win98) without calling DialogBox (wizzard).
Please help
|
|
|
|
|
One solution is CFormView.
Kuphryn
|
|
|
|
|
When I use SafeArrayCreateVector(...) in order to create a safe array, should I free it using SafeArrayDestroy(...)?
Thank you in advance.
|
|
|
|
|
Hello,
I'd like to know where to find memory functions (in order to know free memory in the OS, memory occupied by my app...).
I've searched the MSDN but imagine the results when I've written down "MEMORY"...
Thank you in advance.
|
|
|
|
|
GlobalMemoryStatus() or GlobalMemoryStatusEx() on Win2K+.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
Hi,
I added a .h file and a .cpp file to my project to contain one function I needed. Somewhere along the line, I decided I needed it to be a class function instead, so I moved the declaration to the class header file and defined it in the class source file. Then I tried to delete the .h file and .cpp file with the delete key, and that seemed to work. However, the next time I built the code, a new folder showed up in the File View called External Dependencies, and it contained the .h file I deleted.
How do I get rid of that file, or just get everything back to how it was before I tried to do the deleting?
|
|
|
|
|
You are including the header file somewhere. Delete the #include statement from your source.
Pavel
Sonork 100.15206
|
|
|
|
|
Yes, it took me awhile, but I thought of that too, and I commented out a line with an include statement I found, but the External Dependencies folder wouldn't go away. After reading your post, I decided to take another look.
I had some other errors, from being in the middle of defining another function, and when I commented that function out, I didn't get anymore errors, and the External Dependencies folder disappeared.
Thanks.
|
|
|
|
|
Can anyone explain me how to use C functions in Visual C++?
Is there something special that I need to know?
Thanx,
Kind regards,
Geert
|
|
|
|
|
If you want to use C code or functions inside your C++ source files use the following:
extern "C"
{
//C code or function calls here
}
|
|
|
|
|
Your problem is not clear from the posted message. You can use c functions from Visual C++(Visual C++ is a tool built on c++ and c++ is backward compatible with c ).
If you have problems with using c functions from a library(link error most probably), that may be due to the name mangling brought about by the c++ compiler. You can ask the compiler to turn off name mangling for the library functions by doing the following :
extern "C"
{
#include "yourheader.h"
}
This asks the compiler not to mangle the names in the header file.
HTH
~ Vimal
|
|
|
|