|
Hello All,
I need to add a short cut icon to launch my custom application from
Start-->All Programs.
To elaborate, when I click on Start-->All Program,
I should be able to see the name of my applcation like many others already are (Microsoft Office etc.), clicking on icon should make me launch my application.I do not have any idea how to achieve this?
Please suggest.
Thanks and Regards.
Amarjeet.
|
|
|
|
|
|
Programmatically?
If yes...
SHGetSpecialFolderLocation() and SHGetPathFromIDList() can get you info on where to put shortcuts.
To create shortcuts, see Shell Links[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi
i have got an VC++ application and when i try to open its solution file i get this message.
"The project 'abc.dsp' must be converted to the current Viusal C++ project format. After it has converted, you will not be able to edit this project in previous version of Visual Studio."
So that means it ws compiled in older version of VC++. Now if i convert it, i am able to compile the program but i am unable to step through the application.
To view the problem in detail pls visit my last post.
http://www.codeproject.com/script/comments/forums.asp?msg=2028885&forumid=1647&mode=all&userid=3708087#xx2028885xx
Thanks a lot
SS
|
|
|
|
|
in C, C++ we can execute DOS commands with system() at the time console window is appearing, i want to eliminate the console window while running the other programs
plz help me out
thanks in advance
vasu
|
|
|
|
|
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Try using system, _wsystem .
Regards,
Paresh.
|
|
|
|
|
Thnaks for ur reply
I'm already tried by using system() command, but it's showing the console window till the other programm executing, i want to close the console window once the other progrm start the execution.
vasu
|
|
|
|
|
what dos command you want to fire! actually all dos command has been encapsulated in win32 apis!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi all
this is the code to fetch data from mysql using vc++
but my problem is that data is not shown in info which i declare as cstring as
mysql return data in string
evrything is ok
but data is not shown in info variable please help me
GetDlgItemText(IDC_EDIT1,f);
info = select ID from login where name = \'" + f + "\'";
if ( ! mysql_query( myDB, info) )
{
res = mysql_store_result( myDB );
row = mysql_fetch_row( res );
}
thanks
hi
|
|
|
|
|
paras_s12 wrote: if ( ! mysql_query( myDB, info) )
Does info have the correct value prior to the call to mysql_query() ?
BTW, it's only been 92 minutes since you last asked this question. There's no need to post it again.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ask same you on mysql forum you will get faster reply!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I would like to be able to access the mainframe menu from a non-modal dialog box - in other words, if I press Alt+F, the main File menu should get activated... any idea how to achieve that?
Thanks in advance!
|
|
|
|
|
One way is to send key events to your main window from modeless dialog box. SendMessage() with WM_KEYDOWN and WM_KEYUP in proper sequence might solve your problem.
|
|
|
|
|
Thanks .. but that's a bit of a hack if you do not mind me saying so
I would not want to have to implement all the accelerators like this.
|
|
|
|
|
Try AfxGetMainWnd()->SetFocus() .
Or, send a user-defined message to the CMainFrm object that includes code to drop set focus to itself and then drop the menu. (this is the mehtod I would probably use)
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Do you mean I should call AfxGetMainWnd()->SetFocus() whenever the Alt key is pressed?
|
|
|
|
|
why not if that solves your problem.
Also, to my answer I can add - you don't need to implement all your accelerators but can simply do SendMessage on OnKeyDown with if Alt is down.
|
|
|
|
|
Noooo... I mean do it when you handle Alt-F in your dialog.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I can indeed trap this (WM_SYSKEYDOWN) but I would not want to have to change my code whenever the menu changes AND the shortcuts are not the same depending on the language - all of the sudden my code would depend on which resources were used.
|
|
|
|
|
You were indeed right about the AfxGetMainWnd()->SetFocus() !
Thanks for your help!
|
|
|
|
|
This is how I did it
BOOL CModelessDialog::PreTranslateMessage(MSG* pMsg)
{
switch ( pMsg->message )
{
case WM_SYSKEYDOWN:
if ( ( pMsg->wParam >= 'A') && ( pMsg->wParam <= 'Z'))
{
AfxGetMainWnd()->SetFocus();
return false;
}
break;
}
return CDialog::PreTranslateMessage(pMsg);
}
|
|
|
|
|
i am trying to give my XML parsing code UNICODE support. if UNICODE is not defined it works fine. but if i define it it gives some garbage values. (i am showing it in mag box) the problem is in the
dwFileRead = static_cast<dword>(fread(ptempXML, sizeof(TCHAR), dwFileSize, pfTempXMLBuf));
statement. what are the changes i have to make in the code. the file successfully comes in pfTempXMLBuf. but ptempXML shows garbage.
pfTempXMLBuf = _tfopen(tcsBufXMLFileName, _T("w+"));
m_pNode->Print(pfTempXMLBuf, 0);
fseek(pfTempXMLBuf,0, SEEK_SET);
dwFileSize = _filelength(fileno(pfTempXMLBuf ));
ptempXML = new TCHAR[dwFileSize + 1];
if(ptempXML)
{
memset(ptempXML, 0, dwFileSize); // Required otherwise ending char are junk.
fseek(pfTempXMLBuf,0, SEEK_SET);
dwFileRead = static_cast<dword>(fread(ptempXML, sizeof(TCHAR), dwFileSize, pfTempXMLBuf));
ptempXML[dwFileRead] = _T('\0'); // Required as the file size is most larger then the actual file contain read which appends junk at end.
rc = ptempXML;
delete []ptempXML;
}
|
|
|
|
|
|
sandeepkavade wrote: but if i define it it gives some garbage values.
How are you verifying this?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|