|
Nearly.
The link you posted (to NetWkstaUserGetInfo) gets info about the user's log-on domain info. However, just near this on MSDN was NetWkstaGetInfo which does the trick.
Thanks,
Paul.
---
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
|
When I created my SDI aplication it gives you the choice of having a status bar, if you select yes to this, when your program is created it creates a View menu with a status bar option inside. When you click on this option, a tick appears next to this if the status bar is shown and disappears if not. I wish to copy this functionality with another menu item but cannot work out how it does this in my program, any ideas?
Thanks in advance for any help,
Nick
|
|
|
|
|
On your OnUpdate handler
use
pCmdUI->SetCheck(m_bCondition);
|
|
|
|
|
In ClassWizard, select the command ID. Then, from the list on the right side, select UPDATE_COMMAND_UI. Create the handler. Inside the handler, call pCmdUI->SetCheck with TRUE or FALSE.
BTW: you should have a look on any MFC tutorial, like Scribble.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
thanks, that worked and I have been able to open and close this dialog from the view menu with the tick being displayed/hidden but how do I get the tick in the menu to disappear when the dialog is closed using the close button on the top-right of the screen. I can handle it using OnClose() in the dialog's class but how do I link it to the menu.
thanks for your help so far,
Nick
|
|
|
|
|
ON_UPDATE_CMD_UI handler is called whenever user opens the menu. You have to check the state of the program and pass correct value to CCmdUI::SetCheck.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I have an application, with several functions, and one of these have to return a pointer on COleDateTime. I know the size of the "array" of COleDateTime dates, 2, but i meet a problem when i start debugging when i look in the debug window.
When i declare in the function a COleDateTime pointer i could use 2 way to do that.
Firstly, i just could write:
COleDateTime pDates[2]; and in the debug window i could see:
pDates
[0]->m_dt
->m_status
[1]->m_dt
->m_status
and in another way i could do it:
COleDateTime *pDates=new COleDateTime[2];
and in debug window i only see that:
pDates
->m_dt
->m_status
So, what is the good way if i want to return 2 dates different?
Thanks in advance
gerald
|
|
|
|
|
You should be able to see the two dates in the debug window by modifing the debug view to look at,
pDates[0] and pDates[1].
There is no real difference between COleDateTime Dates[2] and COleDateTime* pDates = new COleDateTime[2] (apart from where the allocate memory goes)
Michael
|
|
|
|
|
Hello all,
as I mentioned I would like to display one (specified by me) member value of some class. You can observe this for MFC objects - e.g. CWnd displays value of m_hWnd in curly brackets.
I looked into definitions of some MFC classes (CWnd and CString) and didn't see anything 'magic'.
Does anybody know something about it?
Regards
Bartek
|
|
|
|
|
You mean in the debugger ? Just type it into the debug variable window.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hmmm, I wrote bad topic
It's not so trivial ... I want to display value of specifed member while in 'Variable' window an object of the class containing this member is listed.
For example:
+this 0x00432990 {CManagersView hWnd=0x004604e6}
Class CManagersView is derrived from CView and automatically displays it's 'primary' member - m_hWnd.
Regards
Bartek
|
|
|
|
|
autoexp.dat located in <vstudio>\common\msdev98\bin contains the 'magic'.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
That's it!
Thanks a lot
Regards
Bartek
|
|
|
|
|
I am creating buttons dynamically in my dialog box by creating them as windows using CreateWindow and putting bitmaps on top of the buttons. This works fine, however, I want to change the background colour of these buttons to a lighter colour. I'm guessing that I use SendMessage but as to which message and parameters I'm lost. Could anybody point me in the right direction. I've checked some articles but they are geared more to using the resource editor or owner-drawn buttons.
Thanks in advance for any help,
Nick
|
|
|
|
|
Sorry - you can't change the background of the button with one simple SendMessage. And processing WM_CTLCOLORBTN won't help either; here's what MSDN says:
Buttons with the BS_PUSHBUTTON, BS_DEFPUSHBUTTON, or BS_PUSHLIKE styles do not use the returned brush. Buttons with these styles are always drawn with the default system colors. Drawing push buttons requires several different brushes-face, highlight and shadow-but the WM_CTLCOLORBTN message allows only one brush to be returned. To provide a custom appearance for push buttons, use an owner-drawn button.
So, if you need custom background, you have to use owner-draw.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Ok, thanks, I suppose I can get around it by altering the bitmap itself to have a white border or something, I'll work on that. The reason I wanted to do it was because some of the bitmaps I was drawing had a grey edge on some sides which was the same colour as the button itself so the border wasn't showing.
Thanks anyway,
Nick
|
|
|
|
|
Hi
can you advise for me library with tree template class, like STL list or vector
Ernst
Thanx
|
|
|
|
|
map is a balanced, sorted binary tree.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi everyone!
I am writitng a MDI application with CRichEditDoc and CRichEditView classes.
Now I want to add some spliter windows so I added like this:
Project>add to project>components and
controls>visual c++ components>splitter bar"
when i run the application the splitter is created, but my childframes
windows look very
funny. I have 2 vertical scroll bars and 2 horizontal scroll bars, one is
the default that comes with CRichEditView, and the second is the one created
by the splitter. If I drag the splitter bars somewhere in the middle and
then begin typing something
in one pane I cannot synchronize the text in all the panes. Also the scroll
bars seem not to be working properly.
I have posted this topic on several forums, but nobody seems to know the answer!
Please give me some help
Alex
|
|
|
|
|
Hello,
I think that all is asked in the subject... Indeed I'm working under Windows CE 3.0 more accurately. All Microsoft apps do this to display the standard Copy/Cut/Paste menu, but I really don't understand how it's done.
By the way if anyone knows where to find such sources (from Microsoft standard apps packages provided on PocketPC, or from anyone else°, I would really appreciate.
Thank you.
Please, also send your answers to my email address: francois_pessaux@yahoo.fr
--Francois
|
|
|
|
|
|
1. How knowing full path to a file and current directories to receive relative path to a file?
2. And on the contrary, knowing a relative path and current directories to determine a full path to a file?
|
|
|
|
|
Look at this 2 functions
char *_fullpath( char *absPath, const char *relPath, size_t maxLength );
void _splitpath( const char *path, char *drive, char *dir, char *fname, char *ext );
|
|
|
|
|
Hi,
How can I get Start menu and pop it up anywhere on screen like user have clicked on Start button ?
thans a lot,
|
|
|
|
|
hi,
I am using a property page to get Tabs in my project in one of the tab. I Need to have a splitter window
can any one help me in doing this.
|
|
|
|