|
You can do it with GDI+.
There are several articles here on CodeProject about GDI+.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
and without GDI+ ???
I've started my project without GDI+ and I don't want to use it now.
|
|
|
|
|
|
Hello Freinds
I have a question. Is it possible that I have an external variable(#extern) in my extension dll? I would be very glad if anyone help me.
Mohsen Kokabi
|
|
|
|
|
Hello, i tried making this app that sends a GET or POST command to a forum server to post a message.
Normally you would use the POST command since thats just what you use to post stuff. But i had made a program before that used the GET command to post things instead of the POST command like this:
Normally:
POST http://www.<theforum>.com/cgi/addmessage HTTP/1.0
Referer: blablabla
Host: blablabla
Content-length: blablabla
Cookie: blablabla
(these are not important)
fid=31613&name=me&subject=hello&message=mymessage // <--- the actual data
So thats what a normal POST command would look like, but you could also use GET for this like this:
GET http://www.<theforum>.com/cgi/addmessage?fid=31613&name=me&subject=hello&message=mymessage HTTP/1.0 // So basically just add a "?" to the url and put the data behind it //
Referer: blablabla
Host: blablabla
Cookie: blablabla
(the normal stuff again, not important, i know how to work this)
Now the problem is, i tried both these methods to post something, no cookies were involved and yes i do have a proxy but i just posted it there and that should work, because it does for the other application i wrote once, but it just doesnt seem to work for this one, now does anyone have any idea of what could be the cause, i was thinking maybe its the server, because you see, what i do is i build up a socket, i connect to my proxy, send the GET or POST header and i disconnect. Now this worked fine for my other program (where i used the GET to post data by the way) but it doesnt work here, so i thought maybe its because the server needs to terminate the connection and not me or otherwise it wont process the data sent? So i would have to receive on the socket i used for sending first and put it in a buffer? Or does this have nothing to do with it? Any ideas what might be causing it to fail?
Thanks for your help
Kuniva
--------------------------------------------
|
|
|
|
|
Just because a server supports POST does not mean it will support a GET. It is quite likely the server you are trying only accepts a POST for the particular URL
|
|
|
|
|
A couple suggestions :
- Are you sure the server still supports HTTP 1.0 ?
- Is the content-length header filled with the right buffer size ?
- Do you end the post data with a double EOL ?
- test with the Proxy-connection: keep-alive
Last but not least,
- Use wininet to manage all this for you
|
|
|
|
|
Thank you both for your replies, but i am sure neither of this is the problem. For the first reply: I tried both POST and GET, neither worked. For the second reply: I posted a message on the forum using my browser (internet explorer) and i captured the packets sent over my network. Then i sent the EXACT same data again using my application, so you see, it had nothing to do with Content-length, Proxy or whatever.
Thanks again for the replies but i'm affraid it will remain unsolved for now.
Kuniva
--------------------------------------------
|
|
|
|
|
I'm told in mbcs systems the file names are allowed to upto 32000 chars long, whereas I've been writing code that assumes they can't be more than MAX_PATH chars long. In order to create files we have to use the unicode version of CreateFile with "\\?\" prepended to a file name in case of local disks and "\\?\UNC\" prefix with paths having the Universal Naming Convention (UNC) format.
My question is is it enough for me to make sure I always use unicode versions of File I/O api's and check a file name if it starts with C:\ etc then I prepend "\\?\" to the file name without regard to the file length and if the filename starts with "\\" I prepend it with "\\?\UNC\" prefix? Do you see any gotchas here?
Mangu
|
|
|
|
|
Yes - this won't work on non-Unicode enabled systems (such as 9X.)
I have been dealing wiith multibyte and Unicode stuff for a while now, and have never come across a filename like "\\?\..." (even though I have seen references to it in documentation.)
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|
hi everybody.
I need to know if somebody is calling to modem on my pc,
for this i do following:
<br />
DWORD l_iResult = ::lineInitialize(&m_hTAPI ,NULL, lineCallbackFunc ,<br />
_T("MyApp"), &m_iNumberOfLineDevices);<br />
DWORD l_iResult = ::lineOpen( m_hTAPI , l_iDevLineID , &m_hLine , m_iTAPIVersion , 0 , 100 , LINECALLPRIVILEGE_OWNER ,LINEMEDIAMODE_DATAMODEM , NULL );<br />
DWORD dwLineStates = LINEDEVSTATE_CLOSE |LINEDEVSTATE_CONNECTED | LINEDEVSTATE_DISCONNECTED | LINEDEVSTATE_RINGING;<br />
DWORD lRes = lineSetStatusMessages(m_hLine, dwLineStates, 0);<br />
So , how can you see , I'll receive the event if somebody is calling to me , but i want to know who is it? that mean i want to know remote phone number.How can i do that?
Thanks to everybody who will react.
|
|
|
|
|
If your modem TSPI supports it, then you should recieve a LINE_CALLINFO message with the LINECALLINFOSTATE_CALLERID state.
You can use the lineGetCallInfo function to return the caller id.
A lot depends on the modem, and whether the telephone service provider is issuing the CLI. (Or if the CLI is blocked)
Michael
Wonder Woman, Wonder Woman.
All the world's waiting for you,
and the power you possess.
In your satin tights,
Fighting for your rights
And the old Red, White and Blue.
|
|
|
|
|
Arg.. getting a headache over this.. I create a static splitter window, and each pane loads another frame, and each frame loads another view.. I need to do this because both panes need independant toolbars. Anyways everything works fine untill you try and close the app.. then it blows up.. It fails when at CFrameWnd::OnDestroy(); and I can't figure out why.. If I replace one of the splitter panes with a standard CView then it works fine.. but if both panes are frames it blows up.. I just can't figure this out..
Any Ideas?
|
|
|
|
|
I had write a skinnable program which use bitmap to paint No-Client area, and i create
a RGN object from these bitmap, the problem is, when i sizing the window by mouse, it flicker,
how to solve this problem? Which message i need call SetWindowRgn to update the rgn of my window?
|
|
|
|
|
I have a CListCtrl in a tab within my dialog. I have hooked this list to the LVN_ITEMCHANGED message - ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST_SUBSCRIPTIONS, OnItemchangedListSubscriptions). However, my callback is not being called. I have other 'widgets' and they are working(ie buttons->ON_BN_CLICKED). I have my list displaying in report mode w/ columns,etc. I am running on Win2K/Visual Studio 6.0. Any help is appreciated
Thanks
|
|
|
|
|
LVN_ITEMCHANGED goes to the parent of the list - chances are, they are sent to the tab, rather than the dialog.
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
sighist | Agile Programming | doxygen
|
|
|
|
|
Could you please tell me a work around? Should I try and catch it with OnNotify. Example please -
Thanks!
|
|
|
|
|
First, please confirm that you create the list control indeed as child of the tab.
The "standard" solution would be to provide your own Tab Ctrl that handlöes the LVN_ITEMCHANGED message.
A "more advanced" solution would be creating a frameless child dialog (like a property page) as child of the tab, and the list ctrl as child ofthe "page" dialog. (If you're using MFC, this is encapsulated relitively well in CPropertySheet and CPropertyPage). This is recommended if you use multiple non-trivial tab pages.
A "dirty trick" would be to specify the dialog (instead of the tab) as parent of the list. You get in trouble quickly, but sometimes it works...
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
sighist | Agile Programming | doxygen
|
|
|
|
|
Thank you for your suggestion. What I have is a dialog with a tabctrl. For the tab 'pages', I have attached 2 "borderless" dialogs.
I have extended the CTabCtrl class for my purposes. How do I handle the LVN_ITEMCHANGED event if CTabCtrl does not handle it(class wizard does not show this event). I tried hand jamming the afx function, but it still does not work.
Thanks for your help!
|
|
|
|
|
what's the ralationship of ondraw and onpaint?
|
|
|
|
|
OnDraw() is called by OnPaint(). OnDraw() is also called by OnPrint(), that is how MFC allows you to use the same drawing code for the screen and printer.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Can anyone help me to some links/tutorials concerning skinning application using layered windows. Can't seem to find that much around on the net. Thanks.
|
|
|
|
|
MSDN is a good resource!
==============================================
SkinMagic SDK Library for C/C++
The better solution for write skinnable application
http://www.appspeed.com
==============================================
|
|
|
|
|
Which version of MSDN do I need? I currently have 6.0 along with MS Visual C++ 6.0. Do I need to upgrade both MSDN and visual C for all the goodies. I couldn't exactly find anything in the index for layered windows in my version.
|
|
|
|
|