|
can you give me the code?
|
|
|
|
|
Preeti Mishra wrote: can you give me the code?
You can find samples in MSDN . Just search through MSDN .
Even the documentation for SetCaretPos has got samples attached to it. Scroll through it and see.
|
|
|
|
|
the member variable of the edit box doesn't take GetCaretPos() or SetCaretPos().
|
|
|
|
|
Preeti Mishra wrote: GetCaretPos() or SetCaretPos().
Caret is a shared resource. A window should have the caret blinking inside it to move it. Since SetCaretPos is a member of CWnd so all classes inheriting from CWnd can access this function. I don't know why you can't access.
Before working on carets read through this article[^]. This will help you understand better what carets are. It's very interesting.
|
|
|
|
|
thanks for the help... i'll try and get back. thanks.
|
|
|
|
|
Preeti Mishra wrote: can you give me the code?
What is it with people on here? Do they think we have nothing better to do than sit in front of the computer waiting for somebody to ask us to write code for them?
I will say it once again. Do the work yourself! If it doesn't work, then show us what you did, maybe we can help you fix it. But under no circumstances would anybody on here hand out code, especially not after a question like "Can you give me the code", and certainly not if you want to be cheeky enough to not even say 'please'!
|
|
|
|
|
very correct... i vote in full for your post..
|
|
|
|
|
When we connect VC++ with Mysql libMysql.lib error
but when we download Mysql there is not any library
how we manage is
Please help me
mailing me
Yogendra
|
|
|
|
|
You're getting an error sayng you need a lib ? MySQL probably doesn't come with it, there's probably an SDK you need.
|
|
|
|
|
yogikaushik wrote: When we connect VC++ with Mysql libMysql.lib error
Did you try googling the error? I did and there are lots of results. Google: libMysql.lib[^]
There are a couple of hits that talk about the exact issue your having.
Good luck
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
here is an article found on the internet:
http://www.herdsoft.com/ti/davincie/leon5i44.htm
which has following code:
//----------------------------------
TDib * theDib = new TDib( "MEINE.BMP");
HGLOBAL hg = HANDLE( *theDib );
LPBITMAPINFOHEADER pbm=(LPBITMAPINFOHEADER)GlobalLock(hg);
//----------------------------------
is it necessary or useful to lock a "new" pointer as code above?
|
|
|
|
|
It's actually locking a handle returned from the TDib * ( presumably an operator is defined to do this ).
|
|
|
|
|
do no type sentence which says nothing.
|
|
|
|
|
includeh10 wrote: do no type sentence which says nothing.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
erm...whats the process for creating a regular dll in visual 2005 express edition?
seems to be something which should be a doddle....
Bryce
-- modified at 20:32 Monday 13th November, 2006
|
|
|
|
|
Maybe the express edition is different, I am not using that one, but I have to do File->New->Project...->Win32->Win32 Project->Ok->Application Settings->Dll->Finish
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
correct there is a difference...the dll option is disabled.
i'm leaning to the thought that expess edition doesnt allow you to build something as basic as a dll
Bryce
|
|
|
|
|
Well that sucks;P
Here is something you can try, no guarantees it will work though:
Create a Win32 windows app, Then go to windows explorer, find the vcproj file for your project. Open it in a text editor, find the line that says "PreprocessorDefinitions=" and add the _USRDLL preprocess definition.
Then goto the source files and remove WinMain and add DllMain.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Also, while you are in the vcproj file you should also adjust the linker options.
Look for the linker tool section, change the output name to a dll extension, and add the line:
ImportLibrary="$(TargetDir)$(TargetName).lib"
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
I created a very simple program in C++ that displays math problems the user must answer. I am trying to use a timer to diplay the time elapsed and fprintf() the time to a file for high scores (or low scores). I have included timer.h and I can display the time to the screen, but cannot write the time to a file. The timer displays the correct time, so I know it is working, but I cannot figure out how to assign the timer a variable or export it directly to the file. Any help would be appreciated.
Kenny
jmarkey@iastate.edu
|
|
|
|
|
If it's a console application and you're using SetTimer see this[^] article.
Steve
|
|
|
|
|
jmarkey wrote: I can display the time to the screen, but cannot write the time to a file.
If you are using fprintf(stdout, ...) to write to the screen, why not just replace stdout with a FILE pointer?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am trying to read and write to the same file. Could this be a reason it is not writing? I open and close the file twice, once to read the scores "r" and once to write a score in "w". This is inefficient, but quick enough for my purposes. Is there any reason this will not work?
|
|
|
|
|
jmarkey wrote: I am trying to read and write to the same file. Could this be a reason it is not writing?
I doubt it.
jmarkey wrote: I open and close the file twice, once to read the scores "r" and once to write a score in "w".
Shouldn't be a problem. You could also open the file once in read+write mode, but that is unrelated to your problem.
That said, what exactly is the problem you are seeing?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am trying to extract a value from a timer to compare it with other values (high scores). However, all timers I have tried return a double that cannot be manipulated, and displayed only by using the code-
cout << "\n\nYour time is " << t;
I don't know how exactly that code operates, so I would like to be able to use printf() to display the time. If you know of a timer that returns a value (to the hundredths place) that can be manipulated, please reply.
|
|
|
|