|
Really thank you. You do me a big favor!
|
|
|
|
|
Hi,
I got this linking error trying to build a project using GLUI in VisualStudio2005 on a WinXP media center SP2 machine:
warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
All the needed .dll, .lib, .h files are in the correct folders.
The libraries glui32.lib, glut32.lib, etc etc are correctly linked in the project properties.
As shown in http://www.codeproject.com/KB/bugs/linkererrors.aspx[^] I used the option Multi-Threaded Debug DLL in the code generation field of the C/C++ tab, in Project settings.
Last, I tried to add the MSVCRT library to the ignore list, and the program actually builds, but results in a crash when launched.
The only differences I see are that I started as "empty project" (not win32 console application) and I used options for debugging (I used Program database for edit and continue, disabled all the optimizations, and used a x86 machine as a target machine).
I'm getting quite mad to solve this, thank you in advance for any help
L.
|
|
|
|
|
Did you check this link[^]? It seems helpful.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thank you Jijo,
I didn't notice that link but actually it didn't work out..sigh
Any other possible idea? Thanks
|
|
|
|
|
LostPitch wrote: Last, I tried to add the MSVCRT library to the ignore list, and the program actually builds, but results in a crash when launched.
What does the debugger tell you when you run it in Debug mode?
|
|
|
|
|
Thanks for the help Randor,
the debugger tells me
"Unhandled exception at 0x1023201c (msvcr80d.dll) in Robi.exe: 0xC0000005: Access violation writing location 0xcdcdcd00"
even if I ignored the libraries libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, libcmtd.lib, as suggested in the previous reply..
It is possible to obtain the same error downloading the zip available at http://www.css.tayloru.edu/%7Ebtoll/resources/graphics/opengl/xp/msvc/gluiProject.zip[^], and ignoring the libraries as I did...
|
|
|
|
|
Problem solved: I post to help other user that are having the same problem:
If the project uses GLUI, just import the GLUI header file avoiding gl.h, glu.h, glut.h.
Then set c++ -> code generation -> runtime library -> multi-threaded DLL (/MD).
Don't use multi-threaded debug or it will conflict with MSVCRT, ignore the library will not give any result.
That should work fine.
If you're instead working with glut remember to put in the project properties -> c++ -> preprocessor definition use GLUT_BUILDING_LIB: it solves a conflict with the ridefinition of the exit() funcion in stdlib.h (more details on http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvc/thread/4cf463c1-5fee-4daa-b135-be8b06ab7f8f/[^]).
|
|
|
|
|
Hi everyone.
i wrote a little app which should check every button on the keyboard.
when pressing a key the key image on the screen will disappear.
In order to catch all the key strokes i use the PreTranslateMessage function
When i press the windows key the start menu appears
and then the PreTranslate function is called and the key disappears from the dialog.
I want to block this behaviour, and only remove the button from the dialog
thanks
Simon.
|
|
|
|
|
Try registering the windows key as a hotkey to your application using the RegisterHotKey[^] api call. Might fail though, since RegisterHotKey fails if you try to register keys already assigned to some task by another application and i don't know how windows (or maybe explorer?) uses the windows key.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Hi,
I have created a dialog application. i have rich edit text box in that dialog aplication. when the messages exceeds the size of the edit box, it automatically craetes a scroll bar. i want to keep the scroll bar at the endit selt, not moving up.
thanks,
balaji
SHivBAlAJi
|
|
|
|
|
I assume that you are sending text programatically to the rich edit text box. You need to scroll down using LineScroll . Since LineScroll will not let you scroll past the last line of text you could use MyEdit.LineScroll(MyEdit.GetLineCount(), 0) . That puts the last line of text at the top of the edit control. This probably isn't what you want - I assume that you would want the last line of text at the bottom of the display. To do this you need to the following every time the contents of the edit control is modified:
a) Get the number of visible lines in the edit control
b) Get the number of the first visible line using the GetFirstVisibleLine() method
c) Get the total number of lines in the edit control using the GetLineCount() method
d) If the number of visible lines plus the first visible line is less than the total number of lines then scroll by the difference using the LineScroll() method
The following code will do it
void MakeLastLineVisible(CRichEditCtrl& edit)
{
int LastVisibleLine = edit.GetFirstVisibleLine() - NumberVisibleLines(edit);
if(LastVisibleLine < edit.GetLineCount())
{
edit.LineScroll(edit.GetLineCount() - LastVisibleLine);
}
}
The only problem is how to implement the NumberVisibleLines function. This Microsoft article[^] shows how to do it properly. If the size of the edit control and the font used is fixed then you could just use a constant value (determined by experiment)
Graham
Librarians rule, Ook!
|
|
|
|
|
Hi graham,
Thanks for your resposne.
Sorry, Actually i have Rich text contol present in my dialog. I will get messages from the board, when the messages exceeds the size of the window, scroll bar automatically comes because of i had set the scroll bar(Vertical scroll bar) property of Rich Text Control.
My question is, when message exceeds the window size, the scroll bar automatically goes up. i don want scroll bar to move up rather it should go down, then only i can able to see latest updates form the board at time itself.
Thanks in advance,
Thanks,
Balaji
|
|
|
|
|
This is the question of the program.
Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1.
The function should not make use of any C library function calls.
Can someone help me.Appreciate for your effort
wizard zaw.
|
|
|
|
|
You could find a similar question in this Thread[^] which contains the answer also. Well, you could also look at the C++ implementation of strpos() here[^] and can modify it to match your required stricmp() function.
Well, I have to add one more - getting answers for the assignment by posting in forums will save for only for a while. By doing that you're just spoiling yourself. For this time its okay. But never do it again. I hope, you took it in right sense. Work hard and score marks!
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
|
Hello friends,
As I am beginner in threads utilization in VC++,therefore i need some assignments to go and can help myself.
Thanks In advance!
Sushrut
modified on Sunday, December 7, 2008 4:14 AM
|
|
|
|
|
|
|
sushrut83 wrote: ...i need some assignments to go and can help myself.
Search for a file in more than one location. Create a worker thread for each location that is being searched. Each thread reports back to the primary thread with its results.
Copy a set of files. Create a worker thread for each file to be copied.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
I have been trying to use the Vista's new Task Dialog and some how i get this error on when calling the TaskDialogIndirect in my code? I understand that this requires Vista and am doing it on Vista am wondering what could be the problem? Have anyone else seen this on vista?
The comctr32.dll version is not v6 on my vista machine (which as per msdn is required for the task dialog?) the question is how could it be and if how can i get the newer v6 dll???
Thanks in advance
Shoaib
|
|
|
|
|
|
Hey everybody!
I'm looking for a way to get FsContext of a file in the NTFS file system.
All the code I've found about FsContext was always for drivers, which I am not looking for...
I am not trying to do that from the kernel (as a driver), but in user mode, as an application.
Does anyone know how to do that?
Thanks a lot in advance!
|
|
|
|
|
Hi,
Unfortunately the FILE_OBJECT structure associated with open file handles is inside the kernel address space therefore not directly accessible to usermode applications. There is no way to access this information from usermode without requesting it from a device driver. Perhaps you can describe what your trying to accomplish? There may be a better solution.
Best Wishes,
-David Delaune
|
|
|
|
|
I am trying to find a way to uniquely identify files over the system.
|
|
|
|
|
Now you really have me confused. What on earth gave you the idea that you needed the FSRTL_ADVANCED_FCB_HEADER[^] structure to identify unique files? Perhaps you meant unique open files?
The windows kernel keeps track of files which are open with an internel FILE_OBJECT[^] structure which is created when ZwCreateFile[^] is invoked.
Can you be more specific? Are you atte,pting enumerate unique files on the disk? Or are you attempting to enumerate all unique open files.
Best Wishes,
-David Delaune
|
|
|
|