|
ID: Q231844
They suggest using SendMessageTimeout() and if it times out you know it is not
responding.
Stephen Kellett
|
|
|
|
|
Hello,
I was wondering if anyone knows of a way to get some kind of system id from a PC. I've looked at:
- GetVolumeInformation to get the hard-drive serial number but this is often the same if drives are ghosted from the same image.
- Netbios to get the MAC Address of the Ethernet Adapter. The problem is that Microsoft says that this "does not work reliably on Windows 95 or Windows 98".
Thanks,
Raed
|
|
|
|
|
How to write a WIN NT Service using MFC which will execute an application at bootup time?.
|
|
|
|
|
Hi ,
ODBC drivers Microsoft ODBC driver for Oracle or Oracle ODBC driver , which is best?
Thanks,
Kannan.A.
|
|
|
|
|
Anyone can tell me how i can compare the caption of string table element with a CString??
Thanks
|
|
|
|
|
Guess you could load the caption of the string resource into another CString with CString::LoadString(UINT nID) and go from there.
|
|
|
|
|
Hi,
I'm desperately seeking for a link where all DLL's are listed, installed by the Windows Installer.
Hope u can help me.
--
Alex Marbus
|
|
|
|
|
Hmmm...
On NT, in the Winnt\repair dir, there is a hidden setup.log file that might be useful if you're trying to see what windows itself has accumulated.
You'll have to weed through a lot of other files to find the dlls. I think there might be a reader utility somewhere - shouldn't be hard to write. Basically an .ini file with path, name, and checksum of installed files in the [Files.Winnt] section.
Also look for "Active Setup.log" on both NT and w2k.
|
|
|
|
|
i coded an application using hook events but when I trace events in debug mode, only the events sent by this application are catched!! The application doesn't catch others events from windows!!
My hook functions are in a dll, I don't understand!!
|
|
|
|
|
Hi
Anyone can tell me how i can grayed a Menu.
The problem is i don't have the ID
How can i do that.
Thanks
|
|
|
|
|
I look for a code sample using SetWineventHook() and SetWindowsEvent(). I've already samples from MSDN... Thanks!
|
|
|
|
|
hi,
Win2k protects the system files by detecting changes and replacing changed files from a cache. I see that there are ways to disable this feature. But is there a way to just disable this feature for one single file insted of all system files ?
thanks
karthik
ps: reason being inetinfo dlls stack size is set to 40000 , but some of my dlls need a stack size of 100000 ,so I want to change the stack size of this dll alone. win2k will not allow me to use this modified dll.
|
|
|
|
|
ummm ... i cant help wondering why such a huge stack is necessary ... is there a particular reason you don't want to allocate some memory or a memory mapped file?
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
In this software business there are times when you cant control what is already there, there are portions of code written years ago and no one knows a thing about it. you need to make things work first and then go do your research.
" This is what i call a "smart as*" syndrome, some one asks a question and the return is a wise as* question!"
|
|
|
|
|
hmmmmm
i know what u mean ... no offence taken ... i just get real nervous recompiling a system file as it will change with the next release or any other software that gets installed and uses the same file ... i would rather try to make the existing dll use a different stack or do the research and figure it out now ... it will prolly take no longer than farting around with the system files
imho
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
If you plan to distribute this, it would be against your EULA. You're not allowed to modify system DLL's.
Further, I can't help but think there has to be a different solution to the problem.
|
|
|
|
|
Is this simplified picture of message pumping correct?
1. The user clicks a mouse button.
2. The mouse driver puts an item into the system input queue.
3. A system thread, which handles user input, retrieves this item and, using
coordinates recorded by the driver, determines to which window this message
should be posted. Mouse messages are always sent to the window under the
cursor (unless another window has captured mouse input).
Given the window handle the system detemines the thread to which this window
belongs and posts WM_LBUTTONDOWN and WM_LBUTTONUP messages to the
message queue of this thread. Note, the message is posted to only one message
queue since the system knowns to which thread the window belongs.
4. The application object, derived from CWinApp, will pickup the message from its thread message queue. Then route this message to the appropriate controls/windows.
5. Button window procedure receives WM_LBUTTONUP message and do the following:
(i) update the display of the button (depressed state and then the release state.)
//QUESTION: SendMessage( ) OR PostMessage( )??
(ii) sends WM_COMMAND/BN_CLICKED notification to "the parent window" or a "particular" control.
(iii) posts WM_COMMAND/BN_CLICKED notification to the application/thread message queue.
5. Message map can be "expanded" to a subroutine that searches the message map upon reciept of a message/notification, then route the message to "appropriate" message handler in response a mapped message.
(This brings up the issue of message routing. ie. Things like searching the view class maps, then the document class, then the frame windows, then the app...)
//Example of a handler:
void CMyDlg::OnButton1()
{
// TODO: Add your control notification handler code here
}
Thanks
|
|
|
|
|
Can anyone explain why this template does not work with signed types?
template<class t=""> T IsolateBits(T x, int bit1, int bit2)
{
T v=0;
for(int b=0; b < bit2-bit1; b++)
{
v = (v << 1) | 0x01;
}
for(int b2=0; b2 < bit1; b2++)
{
v = (v << 1);
}
return (x & v);
}
Basically, the template is supposed to change all bits out of range bit1-bit2 to 0's...and it works perfectly unless the class inputed is signed. Any suggestions on how to fix this?
--Jesse
|
|
|
|
|
Your code won't work as a C function either.....I believe the high bit in signed integers is "latched" and will be rotated into the next bit position following a rotation.
|
|
|
|
|
How is this done? Do you have a link to an example?
|
|
|
|
|
i assume you mean 'how do i put a combo box on a toolbar' and that is easy ... just make it a rebar (CReBarCtrl) and plonk it on one of the bands ... s'easy really ... app wizard can generate it for you and all you have to do is edit the dialog template to add the combo box
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Actually, I wanted to put it onto a CToolBar. I finally found an example in the MSDN samples. Subclassed CToolBar and added a CComboBox to it. Created a new toolbar resource with just one button, and then when creating the CToolBar I replaced that button with the combo box.
|
|
|
|
|
I have derived a new static control where one can the font of the text contained in the static control. However if the font size is set very big then half the text is obscured. Is there a way I can find out the new dimensions of the text and as such enlarge the static control dynamically.
|
|
|
|
|
use GetTextMetrics() and adjust the size of your static control using MoveWindow()
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Does anybody know how to implement a ruler control such as found when one is editing or creating a dialog in MSDEV, or know of a sample application with source code.
|
|
|
|