|
with win32 ...
any one have example ...
|
|
|
|
|
Hi
Is it possible to get Admin rights for the process...If not possible, is there any api call for executing "RunAs " command ie, run a command with different user credentials...
Please suggest me how to get admin rights for the non-admin user...
Best regards,
nag.
|
|
|
|
|
|
Is it possiable to debug a dll?
How to do it. can any one help me with links.
Thanks.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
G Haranadh wrote: to debug a dll?
Not quite sure but
1) DLL has to be a debug-build one.
2) Debugger has to locate the .pdb file which came from building the DLL.
3) Source code (not sure)...
Maxwell Chen
|
|
|
|
|
Yes - those three things are all needed. Another thing needed is an application to host the DLL and "exercise" its exported functions, classes, and resources.
What I usually do when I am debugging a DLL is make it a subproject of the app's solution. I find that it becomes easier to make changes and rebuild both the app and the library when I do this.
|
|
|
|
|
I manage my project this way:
[Folder hierarchy]
<br />
.\exe\<br />
.\dll_a\<br />
.\dll_b\<br />
.\dll_c\<br />
.\sys_a\<br />
.\sys_b\<br />
Maxwell Chen
|
|
|
|
|
Here I am giving the step by step procedure to debug a DLL.
For simplicity ,assume the DLL name is test.dll and application that is using the Dll is testapp.exe.
In the vc6
1.open the dll source
2.Project->Settings and goto Debug tab,
3.Under executable for debug section, browse the testapp.exe.
4.under link tab,output file name path shoud be the same path as that of the exe path.
5.Now you can start debugging , by keeping breakpoints.
Hope this helps.
AppU..
|
|
|
|
|
Hi,
How do I use the database connection in modal dialog boxes when I've created the connection in OnInitDialog() of main dlgbox.
Iam able to dynamically retrieve the records from a database in main dlgbox,but failed to do so when there are multiple dlgboxes with continuity.
I've included the header file of main dlgbox,it doesn't work.
Thanku..
swapna_signsin
|
|
|
|
|
How are you using the connection handle(s)?
Maxwell Chen
|
|
|
|
|
Hi,
I've just a generic class and used CreateConnection method.I've used CDatabase and CRecordset objects.
|
|
|
|
|
hi swapna,
can u post some code?
Regards,
Prashanth.v
|
|
|
|
|
I'm a bit confused as to what the problem is. You should have a class derived from CRecordset , and a member variable of that type in your dialog class.
swapna_signsin wrote: ...multiple dlgboxes with continuity.
What does this mean?
swapna_signsin wrote: I've included the header file of main dlgbox,it doesn't work.
The presence/absence of a header file is going to affect the compiler. Are you having a compiler or a runtime error?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hi,
Nothing like multiple dlgboxes,Imeant modal dlgboxes.
Now,,my problem is,Iam not able to retrieve records into these modal dlgboxes,while I get them inti main dlgbox.
I didn't get any errors,its just showing empty boxes.
To be more precise say if there r 2 dlgboxes,dlg1 & dlg2,in which dlg1 is main dlgbox,with OnInitDialog(),I've made all connections using DSN,SFile,CDatabase object etc. in this.
Iam able to retrieve records ,offcourse using certain methods.
But,I can't retrieve the records into dlg2 dlgbox,while I use the same methods to retrieve ,say LoadProjects().
I hope U got it.
swapna_signsin
|
|
|
|
|
If the dialogs are modal, only one of them can be active at a time. Each control on the dialog will need a member variable (e.g., CEdit , CStatic ) associated with it. Use the SetWindowText() method to update the control with data from the record set.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hi,
Here I send the code written.This works in main dlgbox(dlg1),but displys empty boxes in dlg2 dlgbox.
//This is used for connection//
void CClientsDlg::CreateConnection(CString czDBPath)
{
_glbDB.sDriver ="MICROSOFT ACCESS DRIVER (*.mdb)";
_glbDB.sFile = czDBPath;
_glbDB.sDsn.Format("ODBC;DRIVER={%s};DSN='';DBQ=%s",_glbDB.sDriver,_glbDB.sFile);
_glbDB.database.Open(NULL,false,false,_glbDB.sDsn);
}
//method to retrieve data dynamically from a database
void CClientsDlg::LoadProjects()
{
CString czProjName;
CString lProjID;
CString SqlString;
CRecordset recset( &_glbDB.database);
// Build the SQL statement
SqlString = "SELECT * from tbl_Project order by ProjectName";
recset.Open(CRecordset::forwardOnly,SqlString,CRecordset::readOnly);
m_cboProject.ResetContent();
while( !recset.IsEOF() )
{
// Copy each column into a variable
recset.GetFieldValue("ProjectID",lProjID);
recset.GetFieldValue("ProjectName",czProjName);
// Insert values into the list control
m_cboProject.SetItemData(m_cboProject.AddString(czProjName),atol(lProjID));
// goto next record
recset.MoveNext();
}
// Close the database
recset.Close();
}
swapna_signsin
|
|
|
|
|
If CClientsDlg is dlg1, then this code snippet is doing exactly what it is supposed to do. Why would you think it could populate controls on another modal dialog box?
You need to explain further what it is that you are after.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Now I want to insert another dlgbox say dlg2,with a combobox that displays the data as the combobox of CClientDlg,I am not able to retrieve the data into the combobox of 2nd dlgbox.
Wht do I need to do for that.
swapna_signsin
|
|
|
|
|
In one of dlg1's methods:
dlg2.m_strValue = some_value_from_dlg1;
dlg2.DoModal();
...
BOOL dlg2::OnInitDialog()
{
CDialog::OnInitDialog();
m_combobox.AddString(m_srValue);
} Does that make sense?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
HI,
Thankyou,but,I didn't understand "some value from dlg1",.. is it should be one of the records we retreive or wht it could be.How will the local var of dlg1 be available in dlg2.
Will this hlp in retrieving the data "dynamically"
swapna_signsin
|
|
|
|
|
How to compile a dialog-resource, header file, and source file into a DLL file.
I want make a dll including a dialog-resource, header file, and source file,
I want to reuse it in another project.
Is any one can help me?
I develop in VC6++.
|
|
|
|
|
|
Hi
Could some one pls explain the difference between OnDraw and OnPaint in CView?
I have a MDI application and I find that OnPaint is getting called on window resize but OnDraw is not getting called. However, for a SDI application I find that OnDraw is being called on window resize.
Is it something related to SDI, MDI? What is the basic difference between both these functions??
|
|
|
|
|
OnPaint() is the handler for WM_PAINT . OnDraw() is an MFC-specific function. The framework calls OnDraw() for both drawing on the screen and printing, that way the same drawing code can be used for both situations.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
thanks for the info.. I have this mdi appln wherein the OnDraw handler was not being called till the point I had removed the handler for the OnPaint message.
What is the connection between both, are they supposed to be mutually exclusive? I guess all that should happen is the both thye handlers shall be called twice but it does not happen that way. Why is it so?
|
|
|
|