|
|
hi,
use CHttpSession,CHttpConnection,CHttpFile. using these class u can able to read the content from the server. It's the easiest way.
Have A Nice Day
Murali.M
|
|
|
|
|
Did you mean CInternetSession or CHttpSession itself !!
greatest thing is to do wot others think you cant suhredayan@omniquad.com
|
|
|
|
|
Hi,
that's CInternetSesssion not CHttpSession.
Have A Nice Day!
Murali.M
|
|
|
|
|
|
Hi,
I should like know, what compiler for C/C++ that i can to use for compile the programs (C/C++) showed in this site?
----
How to do a equation editor, type, M$ Word Equation, or MathType, etc?
tanks.
|
|
|
|
|
OCARA wrote:
I should like know, what compiler for C/C++ that i can to use for compile the programs (C/C++) showed in this site?
Various code here will be more or less forgiving, a lot of my articles will compile on any C++ compiler, as they are about standard C++. Most will require Microsoft Visual Studio 6.0 or .NET.
OCARA wrote:
How to do a equation editor, type, M$ Word Equation, or MathType, etc?
Seriously dude, if you can't work out that a site that has articles on programming the Microsoft platform will need the Microsoft compiler, even if sommeone was silly enough to attempt the huge answer required for such a broad question, the odds of you understanding the answer are close to zero.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
OCARA wrote:
How to do a equation editor, type, M$ Word Equation, or MathType, etc?
This article should help for this one.
http://www.codeproject.com/miscctrl/formulactrl.asp?target=equation%7Ceditor[^]
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
tanks, tanks.
I going to try include LaTeX export...
|
|
|
|
|
Hello folks,
just moved from unix environment into win32, not quite comfortable with the feeling that i'm a dumb yet again
please, help! i need to get a full path to user's dir's like "My Documents". How can i do that? Just hardcoding the path "c:\\Documents and Settings\\USER_NAME_WHO_THE_HELL_KNOWS\\My Documents" is not good idea at all. And what about compatibility with different windowses (nt, xp, win2k or even win98)?
any help is greatly appreciated
alex,
debug - is my life style
|
|
|
|
|
Check out SHGetSpecialFolder and related functions. You can also nick the code out of my CFileSpec[^] class
Rob Manderson
http://www.mindprobes.net
Paul Watson wrote:What sense would you most dislike loosing?
Ian Darling replied.
Telepathy
Then I'd no longer be able to find out everyones dirty little secrets The Lounge, December 4 2003
|
|
|
|
|
|
You can also read the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal
I use this in my programs.
Geraldo.
|
|
|
|
|
Ack, don't do this. Microsoft might not always place that information there. Always use the proper API calls. It is hacks like this that cause programs to break.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
True, although sometimes the proper API doesn't exist... or only exists if you have version 5.5 or higher of IE, or the API works great on 2000 but crashes on 9x... some other such bull.
No single raindrop believes that it is responsible for the flood.
|
|
|
|
|
Oh, thanks Tim for the advice. From now on, I will use the API call.
|
|
|
|
|
See this[^] for a good explanation of why using that registry key is undesirable.
Rob Manderson
http://www.mindprobes.net
Paul Watson wrote:What sense would you most dislike loosing?
Ian Darling replied.
Telepathy
Then I'd no longer be able to find out everyones dirty little secrets The Lounge, December 4 2003
|
|
|
|
|
hi,
use this function call SHGetFolderPath. refer msdn for parameters.
Have A Nice Day!
Murali.M
|
|
|
|
|
I have been issued a new PC at work. It has both Visual Studio 6 and Visual Studio Dot Net 2003.
When I am running a Visual Studio 6 C++ program outside of the debugger and it crashes I get the abort retry cancel dialog. I press Retry to debug and I get a dialog asking me to select the debugger. Only Dot Net debugger is listed. How can I make Visual Studio 6 appear in this list?
Thanks
Josh
|
|
|
|
|
This may be of help:
Debugger reply[^]
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
When client shutdown,it will send a FD_CLOSE to server and the server receive this message,then the server invoke the function OnClose().In this function I want to destruct the server socket object.BUt how can I?
In my program(it's a dialog based program with socket support),the var m_ConnectList used to record how many ServerSocket have been create.
<br />
void CBBSServerDlg::ClientConnect()<br />
{<br />
m_pServer=new CServeSocket();<br />
if(m_Listen.Accept(*m_pServer))<br />
{<br />
m_ConnectList.AddTail(m_pServer);<br />
m_pServer->Init(this);<br />
UpdateData(FALSE);<br />
}<br />
else<br />
{<br />
delete m_pServer;<br />
m_pServer=NULL;<br />
}<br />
}<br />
this function will be called by a CListenSocket when it received a FD_ACCEPT.
So I want to destruct the serversocket object when client shutdown with the following code
<br />
void CBBSServerDlg::LostClient(CServeSocket* pSocket)<br />
{<br />
ASSERT(pSocket!=NULL);<br />
POSITION pos=m_ConnectList.Find(pSocket,NULL);<br />
if(pos!=NULL)<br />
{<br />
m_ConnectList.RemoveAt(pos);<br />
}<br />
pSocket->Close();<br />
delete pSocket;<br />
pSocket=NULL;<br />
}<br />
And of course the function is called by ServerSocket when received a FD_CLOSE.
<br />
void CServeSocket::OnClose(int nErrorCode) <br />
{<br />
m_pMainDlg->LostClient(this); <br />
CSocket::OnClose(nErrorCode);<br />
}<br />
<br />
Now I have a question that if I call the function LostClient,the ServerSocket will be destroyed ,and the where the function returned.
But if I don't do it this way,How can I destroy the ServerSocket object when client shutdown
Thank you very much for your help!
Don't look at me in that way!
|
|
|
|
|
I am not familiar with winsock wrapper classes. Under raw winsock, one solution is closesocket().
Kuphryn
|
|
|
|
|
As a matter of fact,I just want to know the things following.
I have two classes
<br />
claas B;<br />
class A<br />
{<br />
.......<br />
void create();<br />
void destroy(B *pB)<br />
}<br />
clss B<br />
{<br />
void SetAttach(A * pA){m_pA=pA;}<br />
A m_pA;<br />
}<br />
.......<br />
A::Create()<br />
{<br />
B b;<br />
}<br />
A::Destroy(B *pB)<br />
{<br />
pB->destroy();<br />
delete pB;<br />
pB=NULL;<br />
}<br />
and if I invoke A::Destroy(B *pB)from class B
<br />
b::someFunction()<br />
{<br />
m_pA->Destroy(this);<br />
}<br />
I think it will be throw out a error because the function can't be returned when pB was deleted.
So I want to get a useful method to delete pB
For my poor,wish you can understand me!
Don't look at me in that way!
|
|
|
|
|
Hi, I've never used label editing in TreeView & ListView before, so I guess it's a simple question. I used the EditLabels property (LVS/TVS_EDITLABELS) and create the controls. But a strange thing happens. I click on the label to edit and it's ok, but when I press any key (in both the TV and LV) the dialog is dismissed. Also, when I press ENTER (without any char has been pressed), they behave differently: the LV accepts it but the TV close the dialog.
What is happening ? What is missing here ?
I create a very simple test: a new Win32 App,typical HelloWorld, and include this lines in teste.rc:
CONTROL "List1",100,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
LVS_SHOWSELALWAYS | LVS_EDITLABELS | LVS_NOSORTHEADER |
WS_BORDER | WS_TABSTOP,7,7,132,30
CONTROL "Tree1",200,"SysTreeView32",TVS_HASBUTTONS |
TVS_HASLINES | TVS_EDITLABELS | TVS_SHOWSELALWAYS |
WS_BORDER | WS_TABSTOP,7,43,158,24,WS_EX_CLIENTEDGE
and include InitCommonControls(); at WinMain and
#include "commctrl.h" and put comctl32.lib in the project settings
finally I put this on the About function:
case WM_INITDIALOG:
LVCOLUMN col;
col.mask = LVCF_TEXT | LVCF_WIDTH;
col.pszText = _T("Col1");
col.cx = 100;
ListView_InsertColumn(GetDlgItem(hDlg, 100), 0, &col);
LVITEM lv;
lv.mask = LVIF_TEXT;
lv.pszText = _T("Txt1");
lv.iItem = 0;
lv.iSubItem = 0;
ListView_InsertItem(GetDlgItem(hDlg, 100), &lv);
TVINSERTSTRUCT tv;
tv.hInsertAfter = TVI_LAST;
tv.item.mask = TVIF_TEXT;
tv.hParent = TVI_ROOT;
tv.item.pszText = _T("root");
TreeView_InsertItem(GetDlgItem(hDlg, 200), &tv);
return TRUE;
and that's it. I didn't include the handlers to LVN/TVN_BEGINLABELEDIT and ENDLABELEDIT , but I think this is not the problem. Why the dialog is dismissed when I press any key ? Why the ENTER key is OK with LV but close the dialog in TV ? Did I forget to handle some message or notification here ?
Did they act differently in Windows and Dialogs ?
|
|
|
|
|
I think the Edit control of the TreeView (for label editing) on a dialog doesn't handle the ENTER and ESC keys, so they are processed by the system DefDlgProc and directed to DEFPUSHBUTTON. But I think that it's kind of a bug, because the ListView Control does handle the ENTER and ESC keys.
I will try to subclass the label edit control of the TreeView and handle the WM_GETDLGCODE message and see if it solves the problem.
|
|
|
|