|
hi ,
In dialog based application i have added one menu bar. this menu working properly before apply the theme. but when i am applying theme to dialog then menu position will be changed and disappeared. y it is happening like this.
have any idea to reposition the menu bar?
or any way to solve this problem?
Regards,
Srinivas
|
|
|
|
|
Actually after 45 hours of endurance test of our application, a crash occured at SaveDC please let me know when the SaveDC fails.
Here the SaveDC is returning 0.
|
|
|
|
|
|
In what cases SaveDc returns 0?
|
|
|
|
|
Did you use of GetLastError for see error information?
|
|
|
|
|
No I didn't use GetLastError(), I will check with it. Thank you for reply Hamid.
|
|
|
|
|
You're welcome,I hope you can find it.
|
|
|
|
|
hello everybody
i have taken as input the wireless packets. it contains a two byte control field. i want to extract bits information from these two byte information. how can i do that.
Like control field has 2 bits of type information and 4 bits of subtype information . i want to extract these pieces of information. can anybody tell me how can i do that. in what data type should i take the bits information.
thanks
|
|
|
|
|
|
Hi,
I have a static CString variable declared in the dll.
static CString strUserName;
After which i make some modification to this CString inside the file. Now, I want to export this value.
However in the .def file of the dll, in EXPORTS i mention only the variable name.
EXPORTS
; Explicit exports can go here
strUserName
But i am getting linker error.
Linking...
AppProject.def: error LNK2001: unresolved external symbol strUserName
Kindly help
Priya Sundar
|
|
|
|
|
Priya_Sundar wrote: static CString strUserName;
Remove the static keyword from declaration. If the varaible is global, then there is no need of static isnt it?
|
|
|
|
|
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!
|
|
|
|