|
I suspect you also need to declare in the CPP file that the variable will be exported, using __declspec(dllexport) .
But I've never actually exported a variable. Always a class, or a function which can modify or retrieve that variable. This gives me room at a later date to change how I work on the variable. Does it exist in the DLL? Do I interrogate some other resource (ie a DCOM object) for it, etc. It gives me more flexibility. Just a style recomendation, not a RULE.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
hi all,
i am trying to use a .lib file in dialog application by adding name of .lib in project settings linker tab and adding .h file in the project which is having declarations of functions this lib file contains.
i am receiving linker error , meaning that linker is unable to find definition of these functions.
i'll be thankful if somebody helps
|
|
|
|
|
How to get the system time in MFC?
Give me some samples r urls
Regards
Nisha.S
|
|
|
|
|
nisha00000 wrote: How to get the systemtime in MFC?
The solution resides in your query itself. See GetSystemTime().
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Have a look at COleDateTime too.
Regards,
Jijo.
|
|
|
|
|
hi use this it helps u.
// get as a CTime
CTime timeTime;
DWORD dwResult =m_retirmentdate.GetTime(timeTime);
// pCtrl->GetTime(timeTime);
if (dwResult == GDT_VALID)
{
// the user checked the box and specified data
CString str;
// is it a time-only control, or a date-only control?
if ((m_retirmentdate.GetStyle() & DTS_TIMEFORMAT) == DTS_TIMEFORMAT)
str = timeTime.Format(_T("%X"));
else
str = timeTime.Format(_T("%x"));
AfxMessageBox(str);
}
else
{
// the user unmarked the "none" box
AfxMessageBox(_T("Time not set!"));
}
|
|
|
|
|
|
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
|
|
|
|