|
gangar wrote: I tried to use PostData parameter in CwebBrowser.Navigate(...) method but no success
That is the way to do it. Don't give up too easily.
SafeArrays are a pain in the behind but a necessity if you want to post data.
|
|
|
|
|
bob16972 wrote: SafeArrays are a pain in the behind but a necessity if you want to post data.
Thanks bob for your reply. I built postdata param as follows:
CComVariant postData("MyInput=My Custom Input");
char* postDataString = "MyInput=My Custom Input";
int len = strlen(postDataString);
postData.vt = VT_ARRAY;
postData.parray = SafeArrayCreateVector(VT_UI1, 0, len);
void HUGEP* safeData;
SafeArrayAccessData(postData.parray, &safeData);
memcpy(safeData, postDataString, len);
SafeArrayUnaccessData(postData.parray);
May be i am doing something wrong on ASP side to retrieve this postdata. I am novice in ASP. Can somebody tell me ASP command to retrieve it?
|
|
|
|
|
I have 32 bit application which is hanging on custemer's 64 bit vista. How can I get minidump file from freezed application? There is such option in process manager, althought it generates full dump for the application, I cannot open it in visual studio because it tells me that it cannot debug 64 bit dumps. Is tehre a way how to get 32 bit (mini) dump in vista for my 32 bit application?
Thank you.
|
|
|
|
|
You may try to send this question to operating system form...
|
|
|
|
|
Use WinDBG[^]'s ".dump" command.
Steve
|
|
|
|
|
I would like to move my project (well 3 projects in one solution 2 are Client and Server) from Windows Visual Studio .Net to a GNU C++ environment on a Unix platform.
Are they any way of generating a make file to build the code on the Unix system. I know only a little about Make files.
I know I need to get rid of all the Windows only stuff out of the code.
Any suggestions please.
Andy.
|
|
|
|
|
VS6 has an Export Makefile option. Surely VS200x has a similar option.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The Export Makefile appears to have been dropped in Visual Studio 2005.
All I can find is reference to VS 6.0 and this facility.
But surely they must be a method to generate a make file within VS .Net
Andy.
|
|
|
|
|
Hi I am reading all the emails and having problem identifying the type of the email.
I use MAPIFolderPtr and browse all the email items.
I used UnManaged C++
MAPIFolderPtr MFolder
_ItemsPtr mItems;
_MailItemPtr mItem;
_AppointmentItemPtr aptItem;
.....
.....
mItems = MFolder->Items;
for(int index=1;index<mitems->Count;index++)
{
if (MFolder->DefaultItemType == olMailItem)
{
mItem = mItems->Item(x);
....
}
else if (MFolder->DefaultItemType == olAppointmentItem)
{
aptItem = mItems->Item(x);
...
}
....
}
However MFolder->DefaultItemType is always returning olMailItem.
I also used MFolder->DefaultMessageClass(), etc. but Dont' know how to find out what type of item it is. How can I find out itemType so I can get the right mail item?
Thanks.
|
|
|
|
|
I found this link
http://vb-helper.com/howto_copy_all_browser_text.html
I tried to imitate the function DoEvents as so
<br />
void DoEvents(int milisec=5)<br />
{<br />
MSG msg;<br />
DWORD dwStart=GetTickCount();<br />
while (true)<br />
{<br />
if(GetTickCount()-dwStart>milisec)return;<br />
if(!PreTranslateMessage(&msg))<br />
{<br />
::TranslateMessage(&msg);<br />
::DispatchMessage(&msg);<br />
}<br />
}<br />
}<br />
But when I call the functions - it's not working...
How do I do it in C++
Thanks in advance
|
|
|
|
|
The good news is you posted this in the correct forum. The bad news is you don't have the first idea what you are doing.
Good luck, you're going to need it.
led mike
|
|
|
|
|
What in the world does this code snippet have to with this thread's subject?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
yytg wrote: I tried to imitate the function DoEvents
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
yytg wrote: I tried to imitate the function DoEvents as so
yytg wrote: But when I call the functions - it's not working...
How do I do it in C++
I've had a need to implement DoEvents in C++ myself, and wrote something that works. Here is what I came up with.
namespace
{
void DoEventsPumpMessage()
{
CWinThread *pThread = AfxGetThread();
if( !pThread->PumpMessage() )
{
int nResult = (int)AfxGetCurrentMessage()->wParam;
::PostQuitMessage(nResult);
TRACE("DoEvents Received quit message\n");
CQuitMessageException::Throw();
}
}
}
void DoEvents( bool bAtLeastOne )
{
if( bAtLeastOne )
{
DoEventsPumpMessage();
}
MSG message;
while( ::PeekMessage( &message, NULL, 0, 0, PM_NOREMOVE ) )
{
DoEventsPumpMessage();
}
}
Many message loops I've seen just assume there won't be a quit message, but in my case, I really wanted to avoid runaway background threads.
Nathan
|
|
|
|
|
I'm using Visual C++ 6.0. to create a MFC win32 .exe SDI application. I would like to display my own string in the title location of the Window that gets displayed when the program is run. I only need to do this one time so setting things during compile is fine. I tried changing the main frame caption parameter during the Visual C++ setup of the workspace. That string then appeared as the caption, but it was preceded by the word "Untitled". How do I remove the word "Untitled" so that only the string I want is displayed. I'm a C programmer who has somewhat migrated to C++ (not by choice). Thanks!
|
|
|
|
|
Kwanalouie wrote: How do I remove the word "Untitled" so that only the string I want is displayed.
In the frame's PreCreateWindow() method, remove the FWS_ADDTOTITLE style.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks for the quick replies but I'm a little slow.
When I search for the PreCreateWindow Method I find the following code:
BOOL CTestProgramView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CScrollView::PreCreateWindow(cs);
}
However, I cannot locate where CREATESTRUCT ... is located, so the comment about removing FWS_ADDTOTTITLE style is somewhat cryptic to my level of skill. How do I removed FWS_ADDTOTITILE? Where in the world is that located?
Thanks
|
|
|
|
|
Kwanalouie wrote: However, I cannot locate where CREATESTRUCT ... is located...
It's passed as a parameter to PreCreateWindow() .
Kwanalouie wrote: ...so the comment about removing FWS_ADDTOTTITLE style is somewhat cryptic to my level of skill. How do I removed FWS_ADDTOTITILE? Where in the world is that located?
See here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks again, but did I mention that Forrest Gump was the top student in my programming class? I looked up the Visual C++ help, and modified my test code to the following:
BOOL CTestCodeView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style = WS_OVERLAPPEDWINDOW;
return CView::PreCreateWindow(cs);
}
This compiles and links but when I go to run the code, it results in a
"Debug Assertion Error" in line 65 of viewcore.cpp. When the line cs.style = ... is commented out, it runs (but of course my title for the window isn't displayed).
Thanks
|
|
|
|
|
I found out there were two different PreCreateWindows calls. When I put the code in the following it worked like I wanted it to, but I don't understand the difference between these two calls:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style = WS_OVERLAPPEDWINDOW;
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return TRUE;
}
and the other one:
BOOL CTestProgramView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
// cs.dwExStyle = WS_OVERLAPPEDWINDOW;
// cs.style = WS_OVERLAPPEDWINDOW;
return CView::PreCreateWindow(cs);
}
Thanks!
|
|
|
|
|
Kwanalouie wrote: cs.style = WS_OVERLAPPEDWINDOW;
This simply replaces whatever value cs.style had (before PreCreateWindow() was called) with WS_OVERLAPPEDWINDOW . To remove the style, use:
cs.style &= ~FWS_ADDTOTITLE;
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
In PreCreateWindow add (sorry that's remove) FWS_ADDTOTITLE to the window styles
led mike
|
|
|
|
|
Hi,
I am using MSHFlexGrid in my application(VC6).
To edit any particular cell I want to float an edit box in front of the cell.
Please help me how to float the edit box?
Thanks in advance.
Sunil.
|
|
|
|
|
Like this:
CEditWnd *pBox;
CSldFlexGrid objMyGrid;
long lHeight;
long lWidth;
long lCol;
long lRow;
int nY = objMyGrid.GetRowPos(lRow);
int nH = objMyGrid.GetRowHeight(lRow);
int nXBt = objMyGrid.GetColPos(lCol);
int nWBt = objMyGrid.GetColWidth(lCol,0);
CRect NewListRect(nXBt, nY, nXBt+nWBt, nY+nH);
pBox->MoveWindow(NewListRect);
pBox->ShowWindow(SW_SHOW);
pBox->SetFocus();
I hope that helps.
modified on Thursday, April 17, 2008 11:00 AM
|
|
|
|
|
I am using CPropertySheet class. In this for removing 'Apply' button
on propertysheet someone i.e. my senior written following code. But I
can't mean it.
AFX_OLDPROPSHEETHEADER* psh = dlg.GetPropSheetHeader();
psh->dwFlags |= PSH_NOAPPLYNOW;
psh->dwFlags &= ~PSH_HASHELP;
Plz explain me this code. Means what AFX_OLDPROPSHEETHEADER and
GetPropSheetHeader() does?
|
|
|
|