|
Sorry sir ,
but i m new in this field.
i checked all links those are r sending me.
but i n not able to get the source code because they use different-2 langages and platforms.
please help me
|
|
|
|
|
Did you see articles on the codeproject?(for avi files).
|
|
|
|
|
hi everyone,
good morning to all, i am savitri here. i am facing one problem in printing/reading the values from the card. please help me out.i used like this:
dStr="";
for(Ctr=0;Ctr<15;Ctr++)
{
dStr=dStr + CHAR(dataRead[Ctr]);
}
m_MemId=dStr;
in this m_MemId is a CString type and it is text box variable so the value of dStr is to print in that text box.
please help me out.
i am thankful u all.really i learnt many new things from u experts.
thanku,
savitri.
|
|
|
|
|
Call UpdateData(false); after m_MemId=dStr; . And then, there are real good reasons for you to Avoid UpdateData[^].
savitri wrote: i am savitri here.
You need not introduce yourself every time you post a question. You've made quite a few posts and people know you.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hello All,
I have a question.
Why every object of a class which contains virtual functions, should have a hidden VPtr in it? This VPtr will increase the size of object by 4 bytes. That VPtr will only point to the base address of VTable. Why an object requires this VPtr in it? Instead it can be put at class level like VTable.
Regards
Kishore
|
|
|
|
|
Kishore JP wrote: Why an object requires this VPtr in it? Instead it can be put at class level like VTable.
class level VTable, object level VPtr which points to VTable.
And why VPtr in objects, if not how the binding to the function happens if the object is typecasted to different Class types in its inheritance hierarchy.
|
|
|
|
|
I've tried:
1. ShowScrollBar(SB_HORZ)
It works, but when a item is added or removed, the scrollbar is automatically adjust (hide when not necessary).
There is another problem with this solution, though I've used xptheme.xml , it'll show non-xp style when first called.
2. WS_HSCROLL
Not work.
|
|
|
|
|
Compiling...
MocaTest.cpp
d:\Program Files\Microsoft Visual Studio 8\VC\include\wchar.h(1198) : error C2059: syntax error : ';'
d:\Program Files\Microsoft Visual Studio 8\VC\include\xutility(919) : error C2275: '_Iter' : illegal use of this type as an expression
d:\Program Files\Microsoft Visual Studio 8\VC\include\xlocale(629) : error C2143: syntax error : missing ')' before ';'
d:\Program Files\Microsoft Visual Studio 8\VC\include\xiosbase(463) : error C2143: syntax error : missing ')' before ';'
for
c1xx : fatal error C1083: Cannot open source file: 'for': No such file or directory
Generating Code...
Build log was saved at "file://j:\Human Movement Detection\Human\ImagProcessing\msvc\libmoca\MocaTest\Debug\BuildLog.htm"
MocaTest - 103 error(s), 19 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
although we installed vcpp_40904_install.exe
plz reply as soon as possible
|
|
|
|
|
How to use CDaoDatabase to open SQL server database?
the database is remote on the internet or local-area-network.
I need sample of connect string, eg. how to use ip-address etc in function:
CDaoDatabase::Open(LPCTSTR lpszName, BOOL bExclusive = FALSE,
BOOL bReadOnly = FALSE, LPCTSTR lpszConnect = _T(""));
any actual C++ code is help.
thx.
|
|
|
|
|
|
|
I have an EXE that has a hidden window.
Is it possible to obtain a handle to this window and post a WM_QUIT message.
The basic requirement that I have is that I need to un-install an application and before the process of un-install , I need to kill the process .
|
|
|
|
|
Something like this would work.
VOID YourClass::EnumerateWindows()
{
EnumWindows(EnumWindowsProc,0);
}
BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
{
DWORD dwPID = 0;
GetWindowThreadProcessId(hWnd,&dwPID);
if(dwTargetPID == dwPID)
{
if (!(GetWindowLong(hWnd,GWL_STYLE) & WS_VISIBLE))
{
::PostMessage(hWnd,WM_CLOSE,0,0);
}
}
return(TRUE);
}
|
|
|
|
|
act_x wrote: before the process of un-install , I need to kill the process .
cruel programming. 
|
|
|
|
|
Hi,
I am re-posting this because I am still having this problem and I am desperate to figure it out. I am trying to create a tray icon. I downloaded Chris Maunder's project and it works for me in my test dialog which is modal. Now I am trying to get it to work in a modeless dialog that ultimately I want to be hidden. I cannot get the tray icon create logic to work. The call to ::Shell_NotifyIcon() fails but I have no idea why. The NOTIFYICONDATA struct seems to be filled in correctly and GetLastError() returns 0. I have tried it with and without a visible modeless dialog. I need the tray icon only to let my user know that my service is running. My code is below.
I call the logic to create the icon below:
m_iconTray.Create( this, <br />
WM_ICON_NOTIFY,
_T("AutoFileHandler is running"),
::LoadIcon( NULL, IDI_ASTERISK ),
IDR_TRAYICON );
The Icon Create() logic:
m_tnd.cbSize = sizeof(NOTIFYICONDATA);<br />
m_tnd.hWnd = pParent->GetSafeHwnd()? pParent->GetSafeHwnd() : m_hWnd;<br />
m_tnd.uID = uID;<br />
m_tnd.hIcon = icon;<br />
m_tnd.uFlags = NIF_ICON | NIF_TIP;
m_tnd.uCallbackMessage = uCallbackMessage;<br />
_tcscpy(m_tnd.szTip, szToolTip);<br />
<br />
VERIFY(m_bEnabled = ::Shell_NotifyIcon(NIM_ADD, &m_tnd));
Any help appreciated
|
|
|
|
|
Is there anything on the modeless dialog? I had an interactive service that displayed a tray icon without any problem. The service called the following
CreateEx (0, AfxRegisterWndClass (0), "", WS_POPUP, 0, 0, 10, 10, NULL, 0);
m_notifyIconData.cbSize = sizeof (NOTIFYICONDATA);
m_notifyIconData.hWnd = m_hWnd;
m_notifyIconData.uID = 1;
m_notifyIconData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
m_notifyIconData.uCallbackMessage = WM_APP;
m_notifyIconData.hIcon = ::LoadIcon (AfxGetResourceHandle (),
MAKEINTRESOURCE (IDI_ICONTRAY));
m_notifyIconData.uVersion = NOTIFYICON_VERSION;
strcpy_s (m_notifyIconData.szTip, 64, "Service Name");
Shell_NotifyIcon (NIM_ADD, &m_notifyIconData);
where m_hWnd was returned by the CreateEx call.
The service regularly called a message pump on the m_hWnd
MSG msg;
while (PeekMessage (&msg, NULL, 0 ,0, PM_REMOVE))
{
TranslateMessage (&msg);
DispatchMessage (&msg);
}
The window procedure for the m_hWnd received WM_ messages so I could process a double click and the right-click.
NOTE - my responsiveness to answer any questions about this will be really bad this weekend since I have lots of time-consuming plans. Good luck
Judy
|
|
|
|
|
In addition to Judy's reply...
Have you checked all the relevant members of the NOTIFYICONDATA struct?
With a breapoint on the Shell_NotifyIcon() call, what are the values of the hWnd, hIcon, uID, and szTip members?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
The struct values are:
hWnd = 0x001A0230
hIcon = 0x0001000b
uID = 107
szTip = "AutoFileHandler is running"
The window has a static control and a button on it. More tomorrow.
|
|
|
|
|
hmm... Are you doing this from a service or is it not working in a regular app?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have it working in dialog app, but I need to get it working in my service app.
|
|
|
|
|
Ok now that I'm caught up...
Have you done everything required here[^]?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hy there!
i have a hughe problem in my company. i have a quite complex application (distributed, corba, mulithreaded, Boost, QT 3.3)
and after closing the program (int closeevent() pApp->exit())
the program closes but after ca 5 sec. there comes an ASSERTION
attached_thread_count == 0
in tss_hooks.cpp
the code in boost looks like that:
attached_threadcount == 0 in tss_hooks.cpp. the code there looks like this:
it is in on_process_exit()..
catch( ... )
{
boost::call_once(init_threadmon_mutex, once_init_threadmon_mutex);
boost::mutex::scoped_lock lock(*threadmon_mutex);
BOOST_ASSERT(attached_thread_count == 0);
return -1;
even with the help of some c++ gurus and DevPartnerStudio we could not find the problem.
actually it isnt that annoying because only at exit it happens. but we cant deliver it to the customer like that.
does enyone has an idea what to do against it, even a trick to just dont show the assertion?
unfortunately i cant make a release-version for different reasons.
ideas? suggestions??
thanx for any input!!
p.s. someone gave me the following input in an other board:
Anyway, the assertion comes from the thread_specific_ptr machinery. It means that something registered a thread-exit handler but it wasn't called. This might happen if, for example, you use a thread_specific_ptr from a thread that wasn't created with boost::threads.
andreas
|
|
|
|
|
The problem isn't the ASSERT but what thread is not terminated. It's the 1st priority to check which thread and what line in the thread is still busy when the exit signal has been fired.
And why does it enter the catch block?! What throws?
Maxwell Chen
|
|
|
|
|
andreas.schaerer wrote: even a trick to just dont show the assertion?
abort[^] should do the trick, but I would ask the question on a Boost mailing list to properly fix the problem.
|
|
|
|
|
I am trying to play a AVI file on status bar indicating the progress for the lengthy operation.
I am doing this in a button click event. it is working fine if no statements are there below the call and, if there are statements below the avi start.. the avi is not playing on status bar.
I tryed with thread, but of no use.
void TestPb::OnButton1()
{
CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
pFrame->StartAnimation( IDR_AVITEST ,1);
whie(1)//Say length process.... If i comment while(1) .. avi is playing on mainfram status bar
{}
}
|
|
|
|