|
make a path from what ?
have a look at _makepath
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I have Visual C++ .net Standard, but I can't set any of the optimization options, they are all grayed out. Someone told me that they were disabled in the "standard edition", but I don't see that documented anywhere.
Is this true? What version would I need to get to have full optimization? I just need C++, I don't want VB, C#, java or anything else. Just C++, and I don't want to spend $1700 for a bunch of crap I will never use.
|
|
|
|
|
The VC++ Pro compiler itself is free. However, I don't think you can access it via the VC++ Standard IDE. MS used to produce standalone Pro versions of their languages in previous versions of VS but they dropped this. The same approach appears to apply in the new VS 2005. However, I don't know whether those Standard editions will be similarly crippled.
Only way to get Pro 2003 with an IDE is to get VS Pro 2003. In theory you could get this by spending about $400 for an upgrade version. (In the UK I spent about £375 for VS 2003 Pro last year..)
Kevin
|
|
|
|
|
I've got a function that will put any text into a list box. It's set so that it will set the horizontal scroll depending on the length of the string.
<br />
void CDataXFerDlg::OnWriteToListBox(CString pLstString, CString strError)<br />
{<br />
if (m_cSentLst.m_hWnd)<br />
{<br />
if (m_cSentLst.GetCount() > 100)<br />
{<br />
m_cSentLst.DeleteString(100);<br />
}<br />
m_cSentLst.InsertString(0, pLstString + strError);<br />
m_cSentLst.SetHorizontalExtent(pLstString.GetLength() + strError.GetLength());<br />
}<br />
<br />
}<br />
However it will not work. I can only get it to work if I put in some int like 300. Then the scroll works fine. Am I supposed to do something else?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
This is because the SetHorizontalExtent 's input parameter is in pixels, not number of characters.
I Dream of Absolute Zero
|
|
|
|
|
but it's still asking for an int. which is what I'm passing. what should I multiply it by to equal chars......how many pixels are in a char...on average?
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
You need to use the GetTextExtent function to calculate the width of the string...
<br />
CClientDC dc(this);<br />
<br />
CFont* pOldFont = dc.SelectObject(GetFont());<br />
<br />
TEXTMETRIC tm;<br />
dc.GetTextMetrics(&tm);<br />
<br />
...<br />
<br />
nHorizontalExtent = dc.GetTextExtent(strText).cx + tm.tmAveCharWidth;<br />
<br />
... <br />
<br />
dc.SelectObject(pOldFont);<br />
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
hi, may i noe is there any API enable me to know the status of a thread through its handle?
HANDLE h = CreateThread(...
GetThreadStatus(h) == ALIVE || GetThreadStatus(h) == SLEEPING || GetThreadStatus(h) == DEAD
Currently, i create a thread A (with handle hA) in MAIN thread, and let the thread A run in funA. My thread A will set the hA to null at the end of funA.
This is the way for my MAIN thread to see whether thread A is alive
if(hA != NULL) ALIVE;
this method is quite cumbersome, can anyone share out better technique?
thank you very much!
cheok
|
|
|
|
|
Why would you need to know the status of the thread? The main thread should not be concerned with what any secondary threads are doing. If the secondary thread needs to communicate with the main thread, it should post a message. Once a secondary thread exists, you can use GetExitCodeThread() to get its termination status.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi!!
I must admit your site has been very usfull to me :p
any way I have been looking throught the MFC GDI+ articles you have, and throught them I have manged to convert a 24bit Colour bmp to a greyscale 24bit bmp.
I was wondering if there is a way to convert the bmp to a 2bit dithered bmp?
I have looked about but not found anything that I can undestand(and mainly all .NET code )
I have seen the Bitmap::ConvertFormat and the Image.SetPalette but these require a ColorPalette structure and I cant seem to find a useful article on how to create one.
any help is appriciated :->
Junior Programmer (Newbie)
From Scotland
|
|
|
|
|
Hello
You can look at my image processing library [^]. There are several dithering methods implemented. The library is on C#, but it's not hard to understand these algorithms.
You can also look at CxImage[^], which is written on C++.
Andrew
|
|
|
|
|
Thanks I'll look into those!!
Junior Programmer (Newbie)
From Scotland
|
|
|
|
|
write a c++ prog thathandles 3 types of objects.
-trucks
-cars with engine cappacity greater than 1200cc
-cars with engine cappacity less than 1200cc
the annual road tax for a truck is $3000,those with engine cappacity gretaer than 1200cc is $300 and that with less than 1200cc is $180
a text file holds the infomation on all vehicles within the company as shown
T w123mgb 5200 12(T stands for a truck object)
L k670kvc 2200 7(L stands for car with engine cappacitiy >1200cc
S y317jnb 1100 (S stands for a car with engine capacity <=1200cc)
the requirements of the program is to
a)read all records from the file and create an object for each type of vehicle
b)to provide a display method which given a registration number prints the details of that particular vehicle
c)as an additional measure, it should be able to calculate hte total ammount of road tax paid in a year.
develop a program to impleent this specification. the prog should use inheritance or polymorphism if appropriate. the number of records in the file should not exceed 100
|
|
|
|
|
START BY HELPING YOURSELF!!!!!!!
Ok. Now go and do your own homework. If you have specific questions, post them here.
By the way, a subject line describing your problem is preferred, rather than just shouting for help.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
good joke continue like this, i love your humour...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
go to rentacoder.com If you want someone to do your homework at least pay them.
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
I'll help you if you'll help me to retire by the time I finish your program..
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hi
Im using SetCapture() to capture mouse events, so when the user clicks the program writtes something in that place.
Thats working great, but i would like to change the mouse cursor until user clicks.
I tried using SetCursor() but just works in my client area.
And WM_SETCURSOR is only sent to my window if the user has a button pressed.
Any sugestions?
Thanks in advance
|
|
|
|
|
Put a transparent window over the entire desktop and have it set the cursor. Once user clicks, translate it into the coordinate or whatever you want, and then hide the transparent window. I am pretty sure winow overrides the cursor shape for each window the mouse goes over, so you need to cover the entire portion of your 'working area' with a window that can 'force' the cursor to your desired shape.
OTHERWISE, take a look at some of the samples that use the 'window finder' tool, since they seem to be able to change the mouse cursor regardless of the window it is over. I am also pretty sure they rely upon the left mouse button being down for some reason - maybe merely to know when user has made a selection when the button is released, but since I never had occasion to use one of these, you will have to reasearch that part yourself.
|
|
|
|
|
Good idea, i gona try it
Thanks for the suggestion
|
|
|
|
|
Create a handler for WM_MOUSEMOVE , this gives you both local position and button states.
Elaine
The tigress is here
|
|
|
|
|
Thanks for the suggestion Elaine
But WM_MOUSEMOVE is sent to your application just if a button is pressed once the cursor leaves your client area.
That's why you have to drag the target cursor in programs like spy++
|
|
|
|
|
You will get events every time a new mouse position is regsitered by your application then reads the mouse button states and can detect a click that way.
You could also use OnClick and follow the last position given by your OnMouseMove handler.
The tigress is here
|
|
|
|
|
At last i found a solution...
I just simulate a drag operation, to do that, when the user clicks my button i simulate that the user press the right button using
mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0, GetMessageExtraInfo());
Then when the cursor is outside my client area im still able to set the cursor shape.
Once the user clicks in the other window, i simulate that the user releases the right button using
mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0, GetMessageExtraInfo());
And after that, i simulate the click the user has just done
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0, GetMessageExtraInfo());
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0, GetMessageExtraInfo());
This work great for me, maybe if you have a Context menu, this isn't going to work, you could try using the middle button...
Ok, i wrotte this because i saw a lot of post similar to mine, and very few answers to this problem.
Thx to all for your suggestions
|
|
|
|
|
Hello,
i am developing inbound application using Tapi 2.0. now i want to
convert that application in Tapi 3.0. i don't know much about com.
any one know how to create inbound application using Tapi 3.0.
Any source code available. Plase send me source code for handling
incoming call.
please help me.
Best regards
Riya jain
dafdd
|
|
|
|