How could get scsi HDD serial number?
I wanna get the serial number of a scsi harddisk, but it makes an error! I work with VC++ on Microsoft Windows XP. What must i do for that? ...
I wanna get the serial number of a scsi harddisk, but it makes an error! I work with VC++ on Microsoft Windows XP. What must i do for that? ...
I'm creating a custom drawn window by specifying border style NONE and custom processing of WM_NCHITTEST. I've defined some area as 'my window caption' and returning HTCAPTION result for WM_NCHITTEST in this area. When window is in normal state the behavior is expected by me. The window can be moved by dragging 'my window caption' and ca...
I used the function - WNetAddConnection2A(n, UserName, Password, dwFlags) to programmatically map a drive and read the drive info out, and then used WNetCancelConnection2A(DriveLetter, dwFlags, ForceDisconnect) to unmap the drive. The first map and unmap were fine. But the next map will bring me the error 1202 - ERROR_DEVICE_ALREADY_RE...
When a console application is started from another console application, how does console ownership work? I see four possibilities: The second application inherits the console from the first application for its lifetime, with the console returning to the original owner on exit. Each application has its own console. Windows then someho...
Hi, I would like to have a line aligned in such way, that some first words are aligned left and some last words are aligned right, but all are in the same line: | text 1 text2 | | Lorem ipsum dolor sit amet | Is that possibile? How can I do that? ...
Evidently I've never had to delete a directory using win32 sdk before, because its apparently an impossible task. I've tried anything and everything - RemoveDirectory, SHFileOperation with FO_DELETE, etc. Currently I call CreateDirectory in one thread, start another thread, copy some files to this directory in the new thread, then delet...
Hi everyone, I have a popup menu which contains several menu items and one of them can have child items. This entry has a little arrow on the right and when you hover your mouse over it, a sub-menu will open (without clicking). Now I want to populate this sub-menu at runtime, but only if the user actually opens it. If the user never ope...
This is the same as this question, with one remark: We manage to get the printerSettings modified, but how can we save them back as the default printer settings? (the original question does not post/answer this) The code I'm using right now: <DllImport("winspool.Drv", EntryPoint:="DocumentPropertiesW", SetLastError:=True, _ ExactSp...
Can i know or create a message which tells if the cursor moved to up or down a line in edit control? ...
Basically I need a replacement for Condition Variable and SleepConditionVariableCS because it only support Vista and UP. (For C++) Some suggested to use Semaphore, I also found CreateEvent. Basically, I need to have on thread waiting on WaitForSingleObject, until something one or more others thread tell me there is something to do. In...
I have a modelless dialog that creates a thread, and if the cancel button in the dialog is hit, a variable bCancel is set which the thread in question periodically checks, and then immediately jumps to its clean up code. It works fine. I can even send a WM_COMMAND...ID_CANCEL to the dialog from other places and it works the same. But ...
A known bug with a Windows XP security update KB978037 can occur with Visual Studio 2005 (and 2008) where sometimes if you restart a debugging session on a console app then the console window doesn't get closed even though the owner process no longer exists. The problem is discussed further here: http://stackoverflow.com/questions/24028...
I added a context menu to a MFC CRichEditCtrl, it includes a delete option which does: ReplaceSel("",TRUE); It appears to work but when I look at the undo log, it's not the same... we end up with characters being lost at the end of the sequence. Any ideas how I can make my code be the same as what happens when you press DELETE? Or even...
I'm trying to send mouse clicks to a program. As I don't want the mouse to move, I don't want to use SendInput or mouse_event, and because the window that should receive the clicks doesn't really use Buttons or other GUI events, I can't send messages to these buttons. I'm trying to get this working using SendMessage, but for some reason...
W32API.HWND targetHwnd = User32.INSTANCE.FindWindow('SunAwtFrame', 'Frame') W32API.HWND sourceHwnd = User32.INSTANCE.FindWindow('triuiScreen', 'EVE') W32API.HANDLE thumbnailH = new W32API.HANDLE() NativeLibrary dwm = NativeLibrary.getInstance('dwmapi') dwm.getFunction('DwmRegisterThumbnail').invoke(targetHwnd, sourceHwnd, thumbnailH) ...
i need to know when my application recieves a WM_SETTINGCHANGE message (formerly known as WM_WININICHANGE). Problem is that the message pump in TApplication sends it down a black hole (default handler) before i can get a chance to see it: procedure TApplication.WndProc(var Message: TMessage); ... begin Message.Result := 0; for I...
Hello. Is it possible to somehow change standart I/O functions handle on Windows? Language preffered is C++. If I understand it right, by selecting console project, compiler just pre-allocate console for you, and operates all standart I/O functions to work with its handle. So, what I want to do is to let one Console app actually write in...
Hi, I have a parent form, with some child windows (not forms - just windows, for example label controls) inside it. Under certain circumstances, I want one of those child windows to be drawn "above" the others, to display a message over the entire main form. I've tried setting HWND_TOPMOST and HWND_TOP on the child windows, but it does...
Let's say I have ten child windows within a form. How do I make sure one of those windows is drawn over all the others? For example, how do I make sure that window 6 always overdraws windows 1-5 and 7-10? I don't want the window to be drawn over everything else on the screen, just everything else within that form. I've already tried usi...
I did a little digging and found stuff like this. However the advice to switch to LBS_OWNERDRAWFIXED style wouldn't work if the Listbox items don't all have the same height, would it? Is there any fix to this? ...