|
projectjak wrote:
How to get the user name of the currently logged on
Use NetWkstaUserGetInfo() . I would refrain from using environment variables for this as they can be set, unset, reset at any time.
projectjak wrote:
users of all computers on the network and how to implement it in VC++ using MFC ?
While it has nothing to do with MFC, I think NetUserEnum() is what you want.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hi,
I'm having problems importing and using a WAV file within my MCF project.
IN VC++ 6, I went to the resource tab and imported the WAV file. I can actually see the declaration of the resource in the .rc file
But when I use FindResource(), this function does not find it so it returns NULL.
-- Here is the declaration in the .rc file:
IDR_WAVE1 WAVE DISCARDABLE "res\\ring1.wav"
-- Here is how I'm trying to find that resource:
HRSRC hResInfo;
HINSTANCE Nl=AfxGetInstanceHandle();
hResInfo = FindResource(Nl,"IDR_WAVE1","WAVE");
It seems that it finds the type "WAVE" but not the resource name "IDR_WAVE1" because the error returned by GetLastError() is the 1814 = No resource name found.
I appreciate any hint or suggestion. Thank you in advance.
R.B.
|
|
|
|
|
|
Hi all,
i was browsing through the windows DDK when i found a page about volatile and non-volatile cpu registers for the x86-64.
is there an equivalent for the x86?
greez,
Alexander M.
Don't try it, just do it!
|
|
|
|
|
Can you elaborate what are volatile registers???
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
e.g EAX is a volatile register, which ESI and EDI are non-volatile.
Don't try it, just do it!
|
|
|
|
|
humm, well if i apply the same analogy i would say that
in 8086 ax is volatile and si,di is non volatile....
frankly i am sorry i cant give good answer to this.
sorry.
Prakash.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
I'm trying to delete the contents of a file, but not the entire file. I want to keep the size of my log file down; and hence, remove older data from the file. I was thinking of reading the contents into a string class and then delete the file. Then, I would split the string (hence, removing older data) and writing the file again. This seems like a lot of trouble. Is there a better way to do this?
|
|
|
|
|
ttran7700 wrote:
I was thinking of reading the contents into a string class...
CStringArray could be used for this, unless the file was extremely large, then it might become inefficient.
If each entry in the log file were a constant length (e.g., 75 characters), then it would be very simple to keep the file limited to a constant number of lines.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
You should use _O_TRUNC in open file routine
|
|
|
|
|
there is an easier way to "clear" the file without deleting it.
use SetEndOfFile.
Don't try it, just do it!
|
|
|
|
|
Hello
I want to add in my ActiveX control property page with file
select dialog.Whether exist any standart control with same feature, then i can place it control in my property page.Or i must draw this dialog manually???
Thank.
|
|
|
|
|
Have you considered CFileDialog or GetOpenFileName() ?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Yes i thinked.
But i has ATL project with out MFC supporting.
And even i use MFC this way should be unused for mee i.e.i need what on my property page placed this dialog but not in new window.
|
|
|
|
|
Hi,
with some tool a user can create user-defined forms and fields in outlook.
I don´t know at the runtime what fields are in outlook !
Is there a way to send a kind of query to outlook which shows what fields are effective in outlook ?
I need this, becaus I have to save this values external in a database.
Pleas send help, thanks
|
|
|
|
|
|
I tried using a frameset on the CDHTMLDialog that comes with mfc 7.0.
I discovered that the HTML controls on the pages in the frames are not sending messages to the dialog.
For Example, for the following:
DHTML_EVENT_ONCLICK(_T("ButtonCancel"), OnButtonCancel)
The method 'OnButtonCancel' doesn't get called.
Pls help me out
What would life be without programmers and salesmen?
|
|
|
|
|
Hi,
I'm using Visual C++ 6 and I have a big project (around 1000 c, cpp, h).
How can I modify a variable everywhere in the project ?
The "replace" function does work only for a file !!
And it would take me ages to do it everywhere without forgetting any !!
Thanks !!!!!
|
|
|
|
|
VStudio.Net (i.e ver 7.0) comes with this feature.
It's called replace in files.
And can be found on the edit menu.
What would life be without programmers and salesmen?
|
|
|
|
|
Thanks, but what does exist under VC6 ?
|
|
|
|
|
Try one of the shareware simple text editors that support that feature, like EditPlus.
Be careful as that is a dangerous operation. For example, make sure you don't have any other vars whose name contain the text you're changing.
G. Raven
|
|
|
|
|
Pierre_1 wrote:
And it would take me ages to do it everywhere without forgetting any !!
If it's one variable that's used globally, just change the declaration of it and the compiler will tell you of the references. Yes this still takes time, but you wouldn't forget any. Otherwise, what you want is not possible with the v6 IDE.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I am totally against changing the name of a variable in 1000 c,c++ files, totally ineffcient thing to do. May be you are converting the source codes for some coding standards. but the job is inefficient.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
Hi,
I'm using Visual C++ 6 and I have a big project (around 1000 c, cpp, h).
How can I modify a variable everywhere in the project ?
The "replace" function does work only for a file !!
And it would take me ages to do it everywhere without forgetting any !!
Thanks !!!!!
|
|
|
|
|
what about using "replace in file(s)"?
Don't try it, just do it!
|
|
|
|