|
Try
HANDLE OpenProcess(DWORD dwDesiredAccess, // access flag
BOOL bInheritHandle, // handle inheritance option
DWORD dwProcessId // process identifier
);
Crivo
Automated Credit Assessment
|
|
|
|
|
Thanks. I don't know how I missed it. It was right in front of me the whole time. Having my 7 month old son (who is teething) yelling in my ear probably had something to do with it.
Thanks again,
Mike
|
|
|
|
|
How can my app know that D: is my CD-ROM??
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
Take a look at GetLogicalDriveStrings .
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
After getting the drives from GetLogicalDriveStrings, you need to use GetDriveType and test if the return value = DRIVE_CDROM.
Like it or not, I'm right.
|
|
|
|
|
Jason Henderson wrote:
After getting the drives from GetLogicalDriveStrings, you need to use GetDriveType and test if the return value = DRIVE_CDROM.
Yes,you're right.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Aah!
That wasn't too much difficult!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
You can use GetVolumeInformation as an alternative!
Best regards,
Alexandru Savescu
|
|
|
|
|
Hello,
I have to develop a dialog based MFC app in which several dialogs are linked using next/previous buttons, like in all those install apps.
As i dont have much time to do this, and as i havent used C++ in 3 years, i was wondering if a framework, or even some sample source code for such an app existed somewhere.
Thank you for your time.
|
|
|
|
|
you want to look at CPropertySheet and CPropertyPage..
basicly you use the resource editor to create dialogs, but instead of creating dialogs you create Property Pages (set to child instead of popup).. you create these for each of the pages you need.
then to put it all together you do:
CPropertySheet MySheet("This is my installer");
CMyPage1 page1;
CMyPage2 page2;
...
CMyPageN pageN;
MySheet.AddPage(&page1);
MySheet.AddPage(&page2);
...
MySheet.AddPage(&pageN);
MySheet.SetWizardMode();
MySheet.m_psh.dwFlags |= PSH_NOAPPLYNOW;
if (MySheet.DoModal() == ID_WIZFINISH)
{ AfxMessageBox("woop!"); }
the CMyPage1,2,3 are the classes you created from your dialogs(proppages)
in your first page you need
BOOL CMyPage1::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_NEXT);
return CPropertyPage::OnSetActive();
} in your middle pages you need
BOOL CMyPage2::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
return CPropertyPage::OnSetActive();
} in your last page you need
BOOL CMyPageN::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_FINISH);
return CPropertyPage::OnSetActive();
}
theres enough code to get you started.. if you can't get there from this then you prolly need to read a book or somethin.. there are examples on this stuff in the articles on here..
-dz
|
|
|
|
|
hi
For the EditBox with the style ES_PASSWORD, WM_GETTEXT works fine in case of win98 like versions. But in windows 2K it not works.can anybody explain me the reason?
VIKS
|
|
|
|
|
vikrams wrote:
can anybody explain me the reason?
Security? Are you trying to send WM_GETTEXT from other process?
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
YES I am. But what shouid I do to get text from other process
VIKS
|
|
|
|
|
Why do you need this? Are you going to steal somebody's passwords?
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Actually I lost my own password. Trying to retrive that by this message
VIKS
|
|
|
|
|
As your already mentioned this does not work on Win2k and above.
But there are some hacks (i.e. hooks, what a nice play on words ) here at codeproject.
Maybe someone knows a direct link, I don't find the article right now.
greets
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
What kind of password it is?
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
actaully long ago I configured my INBOX to POP3 mails of my many accounts .Now I forgot my passowrd . I want to access my emails through normal browser.So thought that using WM_GETTEXT I will able to retrive it ! coz it is present in the POP3 configuration dialog box in "*******"
VIKS
|
|
|
|
|
I'm trying to come up with a way to have a popup come up when my edit box receives focus.
I've tried the OnFocus, but there were problems with that.
What I want is a soft-keypad to come up so the user and input data.
Any ideas.
Thanks in advance.
Jim
|
|
|
|
|
Use some kind of static boolean flag variable in OnFocus handler and don't allow renentry into code which opens keypad.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
I see that this is probably the only way with an edit box. But I think there will be a problem of the focus staying on the edit box and the dialog coming up when the window looses then recieves focus will the "cursor" is still in the box.
Is there a command to move the focus to another "safe" place?
|
|
|
|
|
just set focus to another field when the dialog closes?
CEdit* pNextField = (CEdit*)GetDlgItem(IDC_ANOTHERITEM);
pNextField->SetFocus();
??
-dz
www.dzgraphics.com
don't hurt me im a newbie
|
|
|
|
|
Hi,
Anybody knows how create a modal dialog box initially invisible ?
Thanks,
Cristiano
|
|
|
|
|
Well, if it's modal and invisible your UI will be effectively frozen. Why do you want to do this?
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
I want to use somes functions and received messages WM_USER in a only function, that will return when all functions and messages have been processed, but no appear the dialog. Like this:
BOOL fMyFunction()
{
//This dialog box have the functions and the
//messages to be processed.
CClassDlg objDlg;
if (objDlg.DoModal() == IDOK)
return TRUE;
else
return FALSE;
//My function will return when all done.
}
[]'s
|
|
|
|