|
I am having a window application in which i am using ShChangeNotifyRegister API to get File system notifications.
It is working fine . but if the explorer is terminated from the task manager and started again I am not getting any notifications . I am able to identify that Explorer has been killed and when new explorer starts I am registering my applcation again with shell .But still I am not able to get any notifications . Any solutions on how to proceed doing it ?
|
|
|
|
|
Hello,
maybe this can be of interest for someone: my multi-threading mfc-app crashed sometimes not reproducable on systems with hyper-threading active. So it would be very nice if i could tell my app to use only one cpu even if hyper-threading is active. After searching msdn and the internet for a method to do this, i found this api-function:
SetProcessAffinityMask(GetCurrentProcess(), 1);
The first parameter is the handle to the current process (my app) and the second parameter is a 32-bit value (mask) where every bit represents a cpu. Calling this function solved the problem of my hardly to reproduce exceptions.
Of course it does not fix the problem at the root because my app isn't HT-compatible at least, but now i have more time to learn about the difference between using HT and not using HT. Maybe someone knows a good starting-point for this.
Best regards,
Tabor25
|
|
|
|
|
Nice to know, thx
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Good Thank you
if any one has idea
how to do a VPN connection
through a vc++ ??
Some special API's for it
are availabel for VPN connection?
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Situation: I have a windows application – C++ MFC Dialog based – which can be stopped by users from Task Manager. (Normally behavior)
Can you please provide me a piece of code or a web reference that I can include into my project in order to prevent the application stop from the Task Manager?
Thank you.
|
|
|
|
|
|
there are many
demo code availabe just
put a search in codeproject
or Google u get one ,
i have found one code
http://www.codeproject.com/system/Hack_Windows_Task_Manager.asp
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Thank you.
This might work.
Regards,
|
|
|
|
|
Hi all
I am totally confused about a string table entry giving problem !
I have a string table in the name lng049.rc . In that I have an entry IDS_VMUL_TE = "MyName" . This lng049.rc -->cimpiles as a lng049.dll . I changed the value from "MyName" to "YourName" but its still showing "MyName" during runtime !!
I cleaned all , rebuild all , even deleted debug/release folders and rebuild all . Still the same "MyName" is coming .
I dont understand where from the IDS_VMUL_TE value is taken other than the lng049.rc . I searched for the occurance of the string tabel entry BUT found only instance which now corresponds to "YourName" . Totally confused . Anyone to help me ?
redindian
|
|
|
|
|
Is there any problem with the paths?
|
|
|
|
|
How can we connect to a server through ADO and how can v get data.
Ur's
Raman
|
|
|
|
|
Venkata Ramana Raju wrote:
How can we connect to a server through ADO
strConnection = _T("Driver={SQL Server};Server=MyServerName;"
"Trusted_Connection=no;"
"Database=MyDatabaseName;Uid=MyUserName; Pwd=MyPassword;");
Venkata Ramana Raju wrote:
and how can v get data
ADO[^]
ADO at a glance[^]
-------------------------------
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Hi,
Thank you for u r reply. I connected to a local database through u r help. But i want to connect to oracle server and want to get data from an oracle table. Can u please tell how to do this
Ur's
Raman
|
|
|
|
|
Venkata Ramana Raju wrote:
Thank you for u r reply. I connected to a local database through u r help. But i want to connect to oracle server and want to get data from an oracle table. Can u please tell how to do this
Connecting to the database is half the battle.
This article should get you going. One of the major benefits to ADO is it doesn’t care what db your connecting to they all present the same interface. So what’s said in this article should apply to Oracle as well.
ADO at a glance[^]
If you have trouble connecting to the Oracle DB with the connection string I provided for you, see marcdev's post for more connection strings.
Good luck...
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Maybe this article [^]will help you.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Just like a firewall or a proxy, get all the IP packages from a computer.
Please give me some advice.
Thanks!
|
|
|
|
|
I am trying to make a CDialog appear to be (and act as such) part of a Child Form.
//Here I have am being passed the HWND to the form.
void CMyDLL::MakeNewPanel( HWND hwnd )
{
CWnd * myCwnd = CWnd::FromHandle( hwnd );
pPanel = new CPanel( CPanel::IDD, myCwnd );
BOOL worked = pPanel->Create( CPanel::IDD, myCwnd );
pPanel->ShowWindow( SW_SHOW );
}
// Panel (CDialog class)
CPanel::CPanel( UINT id, CWnd* pParent )
: CDialog( id, pParent )
{
// Do panel initialization
}
I do see the form, and the contents of the CDialog on the screen on top of each other. However, they only give the illusion of being attached... here are the problems:
1. It does not resize to the correct size of the CDialog
2. If I move the form, it moves independently of the CDialog contents, or if I move anything else, it moves in between them.
3. When I close the form, it does not respond to the WM_CLOSE function of my CPanel class.
Here's what I know...
- Obviously the form is not accepting the CDialog as it's new "device contents" per se.. no clue, this is driving me nuts!
- The 3rd problem relates to the need to Subclass the CDialog to the Form, but can I do this without wrapping it in a larger CWnd class? I would pressume so since CDialog is inherited from CWnd, but it causes a really nasty assertion failure!
Would love any and all help you can give, I'm stumped! Thanks!
-- modified at 23:11 Wednesday 28th September, 2005
|
|
|
|
|
Do you have the source files for the dialog? Have you look at CFormView? If you have the source files, it should be easy to convert it to a CFormView. If not, it might be easier to embed the dialog into a CFormView than into a generic CWnd or CView. Look for examples of subdialogs or something similar.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Yes, I designed the dialog, so I have the source files. I will look into CFormView, but how will this attach to the Child Form?
|
|
|
|
|
Hi, all
I got 14 warning look like this: anybody know what caused them? thanks!
Linking with coreLibraryAfxD
c:\program files\microsoft visual studio\vc98\include\xtree(199) : warning C4503: 'rbegin' : decorated name length exceeded, name was truncated
c:\program files\microsoft visual studio\vc98\include\map(46) : see reference to class template instantiation 'std::_Tree<class std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> >,struct std::pair<class std::bas
ic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> > const ,class std::list<class std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct="" std::ch
ar_traits<char="">,class std::allocator<char> > > > >,struct std::map<class std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> >,class std::list<class std::basic_string<char,struct="" std::char_traits<char="">,class std::allocato
r<char> >,class std::allocator<class std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> > > >,struct std::less<class std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> > >,class std::allocato
r<class std::list<class="" std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> > > > > >::_Kfn,struct std::less<cla
ss std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> > >,class std::allocator<class std::list<class="" std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> >,class std::allocator<class std::basic
_string<char,struct="" std::char_traits<char="">,class std::allocator<char> > > > > >' being compiled
c:\dev\c++\billing\taxreport\abscommbuffer.h(113) : see reference to class template instantiation 'std::map<class std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> >,class std::list<class std::basic_string<char,
struct="" std::char_traits<char="">,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> > > >,struct std::less<class std::basic_string<char,struct="" std::char_traits<char="">,c
lass std::allocator<char> > >,class std::allocator<class std::list<class="" std::basic_string<char,struct="" std::char_traits<char="">,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct="" std::char_traits<char="">,class std::all
ocator<char> > > > > >' being compiled
c:\program files\microsoft visual studio\vc98\include\xtree(201) : warning C4503: 'rbegin' : decorated name length exceeded, name was truncated
|
|
|
|
|
|
probably u may forgot to add the required namespace check it
|
|
|
|
|
This has got to be so obvious I cannot see it. Consider a sample code snippet:
.
.
.
CMyDialog myDlg(currentWindow);
myDlg.doModal();
.
.
.
Okay, if I have current window, how do I determine the immediate child that it is managing? If I had myDlg, I'd just say GetParent or some such call..... there has to be a direct hook. I've tried the GetWindow calls, but I'm iterating all over the place, and I don't want to do that, I just want the one immediate child. I know it is there.
frustrated
C. Gilley
Will program for food...
My son's PDA is an M249 SAW.
|
|
|
|
|
Will the EnumChildWindows function work for you? Perhaps the order the window handles are returned will be the z order and you can take the first?
|
|
|
|
|
I thought about going that route and promptly started deleting sibling windows rather than the children. What I did was use GetWindow, but this marched through top level windows. It seems absurd to me that that I simply reference the parent of a window but not the immediate child.
C. Gilley
Will program for food...
My son's PDA is an M249 SAW.
|
|
|
|
|