|
The code whatever in net is not working..Here is the errors i got while running on Visual Studio 6.0
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/FFTExample.exe : fatal error LNK1120: 2 unresolved externals
|
|
|
|
|
You're not using the mutithreaded libraries.
- Select "Projects"->"Settings..." from the menu.
- Select the "C++" tab.
- Select "Code Generation" from the "Category" combo.
- In the "Use run-time library" combo select a multithreaded one.
Steve
|
|
|
|
|
I try to resize my CFrameWnd, but it doesn't work.
Can anyone tell me the reason, thanks
void CMyApp::OnAppAbout()
{
//here I want to resize and draw my framw window
SendMessage(AfxGetMainWnd()->m_hWnd, WM_SIZE, SIZE_RESTORED, MAKELPARAM(50, 50));
AfxGetMainWnd()->ShowWindow(SW_SHOW);
AfxGetMainWnd()->UpdateWindow();
}
|
|
|
|
|
SetWindowPos(AfxGetMainWnd()->m_hWnd,NULL,0,0,50,50,SWP_SHOWWINDOW);
|
|
|
|
|
Thank you for your advise.
If I call SetWindowPos, it indeed does work.
However, I feel very strange about why WM_SIZE message doesn't do any effect.
Won't it redraw the frame after I resize it?
|
|
|
|
|
richardye wrote:
However, I feel very strange about why WM_SIZE message doesn't do any effect.
From MSDN:
"The WM_SIZE message is sent to a window after its size has changed. "
Did you mean to call the windows API function MoveWindow() (Or it's MFC wrapper equivalent)?
CWnd* pWnd=AfxGetMainWnd();
if (pWnd) {
CRect rect;
pWnd->GetWindowRect(&rect);
rect.right=rect.left+50;
rect.bottom=rect.top+50;
pWnd->MoveWindow(rect);
}
|
|
|
|
|
Do you know if I am using ATL classes, should I put any dll/lib at a computer without VC7 (for runtime)?
thanks!
|
|
|
|
|
TalSt wrote: should I put any dll/lib at a computer
If you are talking about deployment of your application then you need to read the documentation[^]
led mike
|
|
|
|
|
Do you know how to check date validation?
I use COleDateTime and at environment without VS7 - it is wrong!!!
Do you know other calss for VC7 to check that? 1900-02-31 - wrong, 1900-02-28 - OK.
Thanks!!!
|
|
|
|
|
TalSt wrote:
Do you know how to check date validation?
Several ways exist. There's the COleDateTime class, and functions like mktime() .
TalSt wrote: I use COleDateTime and at environment without VS7 - it is wrong!!!
How so?
TalSt wrote: Do you know other calss for VC7 to check that? 1900-02-31 - wrong,
Are you implying that some functon is stating that 1900-02-31 is a valid date?
"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
|
|
|
|
|
Hello,
Our application developed using VC++ with COM. Our new requirement is to launch user written ASP forms from our application. To achieve this I added CWebbrowser2 control in our dialog and launched ASP pages using Navigate method. The problem is that we need to pass some input data to these ASP pages before it diplayed in CwebBrowser. This input is to fill out some fields on ASP form.I tried to pass this by appending input string to URL, but there is 2083 characters limit on URL. Is there anyway I can pass huge input string to ASP? I tried to use PostData parameter in CwebBrowser.Navigate(...) method but no success.
I am also open to any alternative approach for my requirement other than CWebbrowser2 control.
Advance thanks to responders.
|
|
|
|
|
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
|
|
|
|