|
how to get directory of start menu programmatically?
the directory includes 'group name' as its sub-directory.
in win95, the directory is under windows directory.
in win2k, it is out of windows directory, i.e. c:\documents-and-settings.
my purpose is to add 'group name' and links to the directory vs install and delete them vs uninstall directly.
thanks
includeh10
|
|
|
|
|
Call SHGetSpecialFolderPath() and use CSIDL_COMMON_STARTMENU or CSIDL_STARTMENU depending on whether you want to add your group for all users or just the current user.
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
|
I need to measure the execution time of my programs under DOS but I don't know how to do it with Borland C++ compiler. With Microsoft C++ compilers is easy to measure the running time using the function GetTickCount() that returns the time since windows started. But now I want to compile them with Borland C++ and run under DOS.Any ideas?
Thank you for your help.
|
|
|
|
|
by "running in DOS" do you mean the old DOS like 6.x or 7.x (or older) or simply a console mode program in win32?
If it's just a console mode program, then just #include "windows.h" and use the GetTickCount() function - GetTickCount() is part of the Win32 API and should work fine in Borland (assumming you are linking to Win32 libs). If this is not the case then try using the C run time's time() function
|
|
|
|
|
I don't know exactly wich version of DOS I am using.I have Windows 98 installed and what I am doing is just go to the shut down menu,sellect 'Restart under DOS' and then find my .exe file and run it. I tried to use GetTickCount() but I was taken link errors(not compiler errors) when building the .exe file.So the next thing I am going to try is to use time() function as you suggested. Thank you very much for your help.
|
|
|
|
|
The function is clock() in <time.h>. It returns the number of clock ticks since program start. To determine the execution time in seconds divide the value returned by clock by the value of the macro CLK_TCK which defines the number of
clock ticks per second.
|
|
|
|
|
int i;
char a[10][10];
for ( i= 0; ; i++) {
if (scanf("%s",a[i]) == -1) break;
}
//ctrl-d or z do not work!
|
|
|
|
|
Does it have to be scanf()? Otherwise you could gets(), which terminates at Ctrl+Z:
int i = 0;
char a[10][10];
while (gets(a[i]) != NULL) {
i++;
}
|
|
|
|
|
After ctrl+z, I have to use enter. Is it expected?
|
|
|
|
|
Yes. If you don't want to wait for enter, you should read one character at a time, e.g. getchar().
Example from MSDN:
<br />
<br />
#include <stdio.h><br />
<br />
void main( void )<br />
{<br />
char buffer[81];<br />
int i, ch;<br />
<br />
printf( "Enter a line: " );<br />
<br />
<br />
for( i = 0; (i < 80) && ((ch = getchar()) != EOF) <br />
&& (ch != '\n'); i++ )<br />
buffer[i] = (char)ch;<br />
<br />
<br />
buffer[i] = '\0';<br />
printf( "%s\n", buffer );<br />
}
|
|
|
|
|
ShowCursor can only hide cursor in caller window, how to hide cursor anywhere?
|
|
|
|
|
I've looked all over to try and find an example of how to place a graphic in the top right of a menu like Internet Explorer but haven't been too sucessful. The closest I came was an article on Code Project, Insert Your Logo between caption bar and menu bar http://www.codeproject.com/menu/menuicon.asp. I'm hoping someone can point me in the right direction or provide example code on how to do so.
Thanks
|
|
|
|
|
find text CHtmlView in samples of VC 6.0, it is an simple example including u need.
includeh10
|
|
|
|
|
That logo is actually a tiny rebar band, with its styles set to make it not resize. If you want a graphic in a real menu bar (not a rebar band that looks like a menu), you can put an item at the right end of your menu, give it the owner-draw and help styles, and it'll appear at the right side of the menu bar.
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
Could you please suggest any link or tutorial to send an email from Dialog Based application.
I'm new to VC++ and creating a small application. The only part left is enabling the email feature.
I just need a simple example to send HTML email with attachment.
THanks a lot for your help in advance.
Mike
|
|
|
|
|
http://www.codeproject.com/internet/csmtpconn.asp
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thanks for the link. Its a great resource but lil too much for my appl. Do you know if there is any tutorial so I can learn to write my own class to Send emails?
I appreciate any help.
Thanks.
|
|
|
|
|
Have you looked at all other SMTP articles?
There is many here and another way is to learn the SMTP protocol.
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Hi,
I Will suggest MAPI, which gives more flexibility and the documentation is available in MSDN.
regards,
Sankaran
|
|
|
|
|
How do you set the window title of a floating CDialogBar? SetWindowText doesn't seem to work.
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
One solution is to call the frame's SetWindowText() via GetParentFrame().
Kuphryn
|
|
|
|
|
Derive your class from CDialogBar and override OnBarStyleChange virtual function. Check a bar's new style and if it became floating call GetParent()->SetWindowText or m_pDockBar->SetWindowText (the afxpriv.h should be included to use m_pDockBar).
GetParent()->SetWindowText definetly works when the bar is floating. I didn't test if OnBarStyleChanged is the right place to put this call, it's just a suggestion.
|
|
|
|
|
Please help me get out of it. I have created voice chatting program using directplay voice in client/server mode. The problem is when I have 3 or more than 3 clients(not include mixing server), the client will hear unconfortable voice echo twice or more than twice. I have tried all the ways I can make including using the flag of DVCLIENTCONFIG_ECHOSUPPRESSION in DVCLIENTCONFIG,
it did work, but I lost mixing function at the same time. I also tried to mute local computer mic and speak playback to keep the mixing function. but it doesn't make any sense. anyone can give me some sugestion or any comment on that. I appreciate it.
|
|
|
|
|
I think the subject line says it all...
I need to be able to programmatically tell what version of DirectX is currently installed, if any. The only restriction is that I can't link with any LIB as this has to be able to run on anything from the original NT4/95 OSes all the way to the latest ones.
How do I go about this?
|
|
|
|