|
Hi,
I want to get the user account information from the local machine. For this I'm using NetUserGetInfo method. Moreover I want to know if a particular user account has been disabled or not. I went through some Network Management Structures but din't come across any structure that would explicitly provide me with this info. Kindly anybody tell me how to extract this info from Windows using Net API.
Thanks
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
Look at the usri2_flags member of the USER_INFO_2 structure.
|
|
|
|
|
Hi all,
I want to use a tab control inside apropertyPage,but i have absolutly no idea
about how to use a tab control in MFC.Can i get a step by step Tutorial to add a tab control and adding controls to each tab.I searched the web ,but couldn't found a good tuto.Any help would be appreciated.
|
|
|
|
|
Are you talking about a property sheet that contains multiple property pages? If so, take a peek at CPropertySheet and CPropertyPage.
|
|
|
|
|
Thanks a lot John and David,
I solved my problem
|
|
|
|
|
Hi ,
I again have a problem,i have this modal tabbed Dialog inside a propertyPage,I want this tabbed sheet as a fixed position(unmovable,unresizable).
|
|
|
|
|
NOTE:
If you don't know how Property sheets work, continue reading, if you already know, don't continue...
Well, a "CPropertySheet" it's a container class, it contains several "CPropertyPage"s.
in order to make it work you must follow those easy steps:
1. Create a dialog for each "page" you need.
2. Place all the controls inside the dialog using the resource editor.
3. Then you'll need to map all the messages you need, in order to do so, create a class for the newly created and populated dialog, and select the class CPropertyPage.
4. Repeat step 2 and 3 until you've finished to populate/define the recently created property pages (dialogs).
5. Now you must create a new class from the class wizard, select the base class CPropertySheet.
6. Modify the newly CPropertySheet in order to add the required pages in it's constructor.
7. Call the property sheet from your code.
this is how it works...
if you need more help on this topic, e-mail me...
hope this helps...
|
|
|
|
|
Thanks a lot,John and david.
I solved my problem.
|
|
|
|
|
Hi ,
I again have a problem,i have this modal tabbed Dialog inside a propertyPage,I want this tabbed sheet as a fixed position(unmovable,unresizable).
|
|
|
|
|
I don't understand you: if you have one thing inside another, normally the child window is not resizeable and neither it can be moveable...
have you created the new window as a child of the parent one?
|
|
|
|
|
Hi,
No I am creating a window in OnSetActive() event of the propertyPage that contains it.I don't know how to make it a child.
My code looks like this:
//CReportWizPage is a propertyPage on which i want to create the Tabbed Pages.
//CReportTabbed is the PropertySheet that embeds these pages.
CReportWizPage::OnSetActive()
{
CPropertySheet* psheet = (CPropertySheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
CReportTabbed report(IDS_TABBED,this);
CReport1Tab rep1;
CReport2Tab rep2;
report.AddPage(&rep1);
report.AddPage(&rep2);
if(report.DoModal() == IDOK)
{
//........
}
return CPropertyPage::OnSetActive();
}
|
|
|
|
|
if you use DoModal(), then you are making the property sheet appear as a standalone component that isn't owned by nobody (only by the app).
<br />
this->m_pPSEstacio = new CPSEstacio("", this, 0);<br />
<br />
this->m_pPSEstacio->Create(this, WS_CHILD | WS_TABSTOP | WS_VISIBLE);<br />
this->m_pPSEstacio->ModifyStyleEx(0,WS_EX_CONTROLPARENT);
Hope this helps...
|
|
|
|
|
|
I am having some trouble getting images to display properly.
What my real problem is as follows.
I have an image displayed and am able to drag a rectangle over parts of the image. I am able to get a copy of the image that is selected by the dragged rectangle. With this image copy I change it to black and white. Now I want to display this copy on the original image. The problem I have is that it doesn't display where I dragged the rectangle but some place else. I used pDC->DPtoLP(point) when I captured the points for the rectangle. I use the same points again for the place where I want the copy of the image to display again.
Can anybody help? or direct me to a good tutorial.
|
|
|
|
|
During the lifetime of a C/C++ project several header files are
added because source snippets are moved between source-files. Seldom
are any header files removed. It's to much work to manually walk through
each source file and check if a header is no longer needed.
So, is there any tool (besides Gimpel's PC-Lint which is beyond my
budget) that can tell me which headers are no longer needed? It would
need to understand C/C++ off-course
Gisle V.
"If you feel paranoid it doesn't mean they're not after you!" -- Woody Allen
|
|
|
|
|
I think SPLint is what you might be looking for.
|
|
|
|
|
Correct Clickety[^]
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Thanks guys, I d/l SPlint 3.0.1.6 and read some of the docs. But failed to
find what I'm looking for. Are you sure it can do this? (see 1st
message).
Gisle V.
"If you feel paranoid it doesn't mean they're not after you!" -- Woody Allen
|
|
|
|
|
Hi,
I've got a tab control that I created dynamically, like this:
m_TabCtrl.Create(TCS_TABS | TCS_MULTILINE | WS_CHILD | WS_VISIBLE, CRect(0, 0, 0, 0), this, 123)) {
Somewhere else I resize the tab to the size it needs to be. I add some items to the tab control, that's all fine; the problem is that the font is wrong. It's the default system font, the one you get when you run out of GDI resources. I've been trying to use SetFont() on the tab control, but that doesn't make any difference. How should I go about it? All other controls use the right font; can I copy it from there and set it on my tab control? Should I use GetFont/SetFont for that, or the LOGFONT that I can get through GetFont? I'm offically confused now
Thanks in advance.
cheers
|
|
|
|
|
Have you tried this?
m_TabCtrl.SetFont(GetFont());
If you do that after you create it, that should work. That's what I usually do to set the font of a control. It may or may not work depend ing on where you actually create the tab control, if you're doing it in any CWnd derivative then it should be ok.
|
|
|
|
|
Thanks for your reply Ricky - the problem is that GetFont() returns NULL when I call it from within OnCreate() of a control (not only on the tab control btw, also my CMDIChildWnd()-derived class). What controls have a font set? And when is it set?
|
|
|
|
|
Hi
Does anyone have some code snippets to copy a binary file to another directory?
Greetings
Jens
|
|
|
|
|
|
Thanks, does this SDK function work on all windows operatingssystems (95+)?
|
|
|
|
|
Yes, according to MSDN
(Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.)
However, there's no progress indication - so for a long file it will just sit there. CopyFileEx allows progress and cancelling - but it's NT4+ only
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|