|
|
Soliant wrote:
the OS version on your desktop, I wonder how they do that ?
Use Spy and figure out if it's a window or not...it could be using Active desktop (which i am not familiar with) or just a transparent window like you suggest.
How do I print my voice mail?
|
|
|
|
|
Try and check out GetDesktopWindow followed by GetWindowDC and DrawText
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
How about redrawing your text in a timer loop?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi
I have a binary file which is the result of writing an array of type double without formatting it to a text representation. Now I want to read the contents of this file and put them back to an array of type double. Could someone tell me how I can accomplish this? I have tried using ifstream opened in binary mode, and then I read the contents using >> operator, but it doesn't seem to work (all the array contents are still zeroes).
Thanks!
|
|
|
|
|
Post the code you've done so far.
Kuphryn
|
|
|
|
|
Hi,
Thanks for the reply. I managed to get it done using a similar way as described in the code below:
//Samples.dbs contains two double numbers in binary format
std::vector<double> vTest(2, 0.0);
std::ifstream fFile("Samples.dbs");
fFile.read((char*)&vTest[0], sizeof(double));
fFile.read((char*)&vTest[1], sizeof(double));
fFile.close();
If there are any better way to do this, I would be most grateful to know. Thanks!
|
|
|
|
|
Interesting.
You can try STL.
// Something like this
istream_iterator<<double>> streamDouble(file);
std::copy(streamDouble, istream_iterator<<double>>(), std::back_insert(vectorData));
You got the idea.
Kuphryn
|
|
|
|
|
I am trying to find samples and guides for miniport developement but neither Baker nor Oney cover this topic much in their books. Somebody pleasssseee HELP!!!
Hope to hear something... Thanks.
Ken
|
|
|
|
|
You will find little help regarding Drivers here, checkout microsoft newsgroup at msnews.microsoft.com and there are forum for DDK.
regards.
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
|
Guys,
Thanks for your response. I really appreciate that.
Ken
|
|
|
|
|
How do i edit a txt file in a shell application :
eg.
In the first line of the names.txt = john
I want to edit that to be johnny replacing john
|
|
|
|
|
use iostreams. Read the file into a string array, then perform your changes, and finally, write the file back out again.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hi All,
Anyone knows how to safely "Unplug or Eject Hardware" without having to click that green arrow icon on the system tray? I want to write an application using some window API to do it.
Normally that icon appear when i plug in my USB storage.
I have searched the web, some people use DeviceIOControl to eject, but it doesn't really remove the device as when i click the icon and "Stop USB Storage Device - Drive G:"
Can anyone enlighten me please? I refuse to believe that i cannot do this using some window APIs... Thanks!!
|
|
|
|
|
You will need the DDK to get the docs, headers, and libs.
The relevant functions are CM_Locate_DevNode() , CM_Query_And_Remove_SubTree() , and CM_Request_Device_Eject()
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Pinky, are you pondering what I'm pondering?
I think so Brain, but how will we fit the hamster inside the accordion?
|
|
|
|
|
I added an Edit Box to my Dialog. i'd like it only accept numeric input. when a non-numeric key is pressed a warning dialog will apear. i mean, just after press the key, not after my button 'Subject' is pressed, the dialog appears.
Hello World
|
|
|
|
|
If you only want it to accept 0-9 you can set it's style as "Numeric" in the resource editor.
Shuang. Wu wrote:
when a non-numeric key is pressed a warning dialog will apear
This isn't a good design idea. It would get pretty annoying having to close a dialog everytime you press an incorrect key. Setting the edit's style as numeric will produce a beep when an invalid key is pressed.
- Aaron
|
|
|
|
|
Yes, your suggestion sounds much better; and Thanks very much.
Hello World
|
|
|
|
|
monrobot13 wrote:
Shuang. Wu wrote:
when a non-numeric key is pressed a warning dialog will apear
This isn't a good design idea. It would get pretty annoying having to close a dialog everytime you press an incorrect key. Setting the edit's style as numeric will produce a beep when an invalid key is pressed.
BTW, i failed to do as my previous idea. I would like to know if there is some way to do it?
Hello World
|
|
|
|
|
You can do this using CWnd::SubclassDlgItem
Derive your own class say CMyEdit from CEdit and
add a WM_CHAR handler:
void CMyEdit::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if (nChar >= '0' && nChar <= '9') {
CEdit::OnChar(nChar, nRepCnt, nFlags);
return;
} else {
AfxMessageBox("Invalid Key");
}
}
In your Dialog class add this to OnInitDialog:
m_myEdit.SubclassDlgItem(IDC_EDIT1, this);
where m_myEdit is a Dialog member of type CMyEdit
and IDC_EDIT1 is the edit control id.
Hope this helps!
|
|
|
|
|
Mahendra_786 wrote:
In your Dialog class add this to OnInitDialog:
m_myEdit.SubclassDlgItem(IDC_EDIT1, this);
This is highly unnecessary, and is handled automatically when a member variable is mapped to a control (using ClassWizard).
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
That is HIGHLY correct and
my way in fact may be insufficient not just unnecessary. In fact
DDX_* somewhere calls SubclassWindow to do this.
Moreover the way I suggested I am not sure how
UpdateData will work beside other side-effects.
Due Regards
Mahendra
|
|
|
|
|
Hello guys and girls
I was wondering if it's possible to programatically adjust the privileges of an application, running on let's say 2K/XP, so it can perform actions like installations and other restricted operations when the app is running at accounts without proper permissions. Is that possible at all?
Any information is appreciated.
Thanks in advance
|
|
|
|
|
Maybe it it were running as a service.
Kuphryn
|
|
|
|