|
I'm Confused, are you importing GIF files or Illustrator native files ( vector )?
if they are GIF, there are tons of code that can be found here or with google that will do this.
if they are Illustrator file, then you will have to do a bit more coding to support vector display in your application, and vector file import; I don't know if Adobe has a SDK to read those files.
|
|
|
|
|
hi
i have two buttons on my dialog and an edit box. i need the buttons to move the cursor in the edit box left and right. how do i do it.its just like the left and right arrow keys of the keyboard. without using WM_KEYDOWN.
thanks
|
|
|
|
|
Preeti Mishra wrote: without using WM_KEYDOWN.
You can use WM_KEYUP or WM_CHAR, if you have an aversion to WM_KEYDOWN.
|
|
|
|
|
Ooops - I misread. The edit box has a property which specifies the cursor pos, I think it's selectionstart, but I could be wrong. That's what you need to change.
|
|
|
|
|
i'm not gettin it.
can you give me the code?
|
|
|
|
|
The other guy is right, I was thinking of .NET. You call GetCaretPos to find out where it is, change the number and call SetCaretPos to move it.
|
|
|
|
|
Preeti Mishra wrote: need the buttons to move the cursor in the edit box left and right.
Take a look at the following functions...
SetCaretPos, GetCaretPos, HideCaret, ShowCaret
|
|
|
|
|
If you really want it to work like left and right arrows, I don't think your want to use the caret functions.
Instead, use EM_GETSEL to find the current position, increment or decrement the postion variable, and use EM_SETSEL to set the new position.
int nStart, nEnd;<br />
::SendMessage( hwndEdit, EM_GETSEL, (WPARAM) &nStart, (LPARAM) &nEnd);<br />
<br />
nStart--;<br />
<br />
or...<br />
<br />
nStart++;<br />
<br />
::SendMessage( hwndEdit, EM_SETSEL, (WPARAM) nStart, (LPARAM) nStart );<br />
If you're using MFC, use GetSel and SetSel.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
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
|
|
|
|