|
No. That's my input for the varible.cpp
|
|
|
|
|
spacetimecont wrote:
No. That's my input for the varible.cpp
I think he's trying to get at, there isn't an error message in your post. Do you know what the error message is that the compiler is printing out?
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
NO, i am asking for error message given by Visual C++ compiler.
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
The fourth cout statement is in error. Put each statement on a separate line and you'll see the problem.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
What do you mean put each statement on a seperate line? How do I do that?
Could you give me an example please?
Thanks
|
|
|
|
|
Your way:
int main()
{
using std::cout;
cout << "The size of an int is:\t\t"
<< sizeof(int) << " bytes.\n";
cout << "The size of a long int is:\t"
<< sizeof(long) << " bytes.\n";
...
}
My way:
int main()
{
using std::cout;
cout << "The size of an int is:\t\t" << sizeof(int) << " bytes.\n";
cout << "The size of a long int is:\t" << sizeof(long) << " bytes.\n";
...
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
How to use property sheet in a system tray?
I would like to do that suppose when we double click on .exe, so that my application should be minimized in system tray just like Norton. Is there any example available related to property sheet minimize in system tray?
Regards
Rajesh
|
|
|
|
|
Hi Mr Rajesh,
Just Treat PropertySheet as Simple CDialog class and proceed same way for attaching the System Tray Icon as you have done in any CDialog based Project
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi,
I am writing a program in vc++.
I would like to ask one question related to property sheet.
My question is:--
I made a property sheet. It contains two pages like page1 and page2.
One command button (Click) is placed on page1. Now, I would like to do that, when we press Click button on page1 then property sheet should be hidden.
How to do this?
Any help is appreciated.
Thanks
rajesh
|
|
|
|
|
Actually the PropertyPage are children of the property sheet
so if you want to hide the propertySheet from the PropertyPage just use thi Simple Api From your PropertyPage
<code>this->GetParent()->ShowWindow(SW_HIDE);</code>
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Thanks for help.
this->GetParent()->ShowWindow(SW_HIDE);
This code works well.Suppose,parent windows is hide and now we would like to activate Parent Windows.How to do this?
rajesh
|
|
|
|
|
From Where???
if From Page
this->GetParent()->ShowWindow(SW_SHOW);
if From Sheet
this->ShowWindow(SW_SHOW);
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Thanks!
I have done it.
rajesh
|
|
|
|
|
Hello,
I know this problem has been discussed before but I have some doubts over connecting to internet through proxy server.
I use HttpSendRequestEx (...) to send the data and if it returns error I use:
::HttpQueryInfo ( m_HttpOpenRequest, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER, &qcode, &qsize, NULL);
where qcode == HTTP_STATUS_PROXY_AUTH_REQ, if proxy is required.
Now in my case, I fill the proxy details in IE options tab and I think WinInet gets this details that we require proxy auth from IT settings.
But what happens if I use FireFox and the proxy settings are given in that? How does WinInet knows that we need to bypass through a proxy server?
Or do we have to specifically give the proxy server details etc.? If yes then how do we give proxy server address, port number?
Regards,
Karam
|
|
|
|
|
Hello guys,i need some help.
i want to print image(any format what you can) directly to printer without call printer dialog.
i have tried to print text and it was successfull.Here's the source code:
CDC dc;<br />
AfxGetApp()->CreatePrinterDC(dc);<br />
<br />
DOCINFO docInfo = {<br />
sizeof (DOCINFO),
"print",
NULL,
NULL,
0
};<br />
dc.StartDoc(&docInfo);<br />
dc.StartPage();<br />
<br />
dc.TextOut(50, 700, m_text);<br />
dc.TextOut(50, 750, m_text2);<br />
<br />
dc.EndPage();<br />
dc.EndDoc();
And the question is i want to print image between the text (can be before or after), but i don't know what function of CDC can be used to print image???
OK, thanks for the help..............
|
|
|
|
|
BitBlt or StretchBlt..
onwards and upwards...
|
|
|
|
|
Hey all,
I have a program that basically searches a folder for excel spreadsheets and puts them into a list control.
On clicking in the list control, it is using ShellExecute() (simply passing the name of the file, not the excel executable) to launch the Excel and have it load the file.
It opens the file without a problem, however what is happening is the method that this shellexecute code is in will not go to the next line of code until Excel loads up, and loads the file. This is causing me problems because it is not hi-lighting the list control right away. Since Excel takes it's time to load up, and load the file, this is usually 30 seconds later.
I did a simple "MessageBox("FINISHED LAUNCHING");" directly after the ShellExecute call, and sure enough, the message box does not pop up until 30 seconds or more later when the spreadsheet is fully loaded.
I am wondering if there is another way around this, to get my program to launch excel, and move on w/out caring what Excel is doing, whether it loaded or not, etc. If I don't have to, I would like to avoid having to use some other method of launching the file that would cause me to have to specify the folder and executable name of excel.
Any help would be appreciated.
Shultas
|
|
|
|
|
You might try Thread. Search for "Thread" in CP. Good luck.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
In continuataion with Mr GoodMast3r,here is the code which help you out.
<font color=#008000>
UINT ThreadProc(LPVOID lpParam);
<font color=#008000>
ShellExecute(.....);
MessageBox("FINISHED LAUNCHING");"
<font color=#008000>
//now Code this way</font>
void CWindowNameDlg::OnButton4()
{
ShellExecute(.....);
MessageBox("FINISHED LAUNCHING");"
char strFileName[]="Alok Gupta";
AfxBeginThread(ThreadProc,(LPVOID)strFileName);
}
UINT ThreadProc(LPVOID lpParam)
{
char *strFileName=(char *)lpParam;
MessageBox(NULL,strFileName,"",MB_OK);
<font color=#008000>
ShellExecute(...);
return TRUE;
}
I hope this COde work well for you
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
I have an MDI application that I'm adding a web browing component to interact with a client's HTML. We want to have their pages opening and staying within our app. I have to open an HTA file which is currently opening the client's web page in a separate IE browser. Is there a way to force the HTA to launch inside my app or do I have to modify the HTA? I have tried going through different examples on MSDN, but am not having any luck with the OnNewWindow2() override.
Thanks,
KJ
|
|
|
|
|
I need your help!!!!
I don't know how use bitmaps with alpha blending under Visual c++
or if i can use it...
Please someone can help me???, i need it... i can load mormal bitmaps but, i need load alpha blended bitmaps into the treeview and toolbars
Please!!!!!
|
|
|
|
|
Hi,
I have a weird problem where if I set a value in HKLM\MS\Windows\CurrentVersion\Run in my code, my app won't be launched. But if I double click on MyApp key, select the value, do a cut-paste of the same string, reboot the computer then it will work!
HKLM\MS\Windows\CurrentVersion\Run
Key: MyApp,
Type: String,
Value: "C:\Program Files\MyApp\MyApp.exe" (quotes are included in the string since there's a space in there).
Here's my code:
<code>TCHAR szPath[MAX_PATH+1];
TCHAR szFullPath[MAX_PATH+1];
UTLGetAppPath( szPath, sizeof( szPath ) );
_tcscat( szPath, NTS_ISMGR_EXE );
memset( szFullPath, 0, sizeof( szFullPath ) );
_tcscpy( szFullPath, "\"" );
_tcscat( szFullPath, szPath );
_tcscat( szFullPath, "\"\0" );
lRes = RegSetValueEx( hKey, NTS_REG_STARTUP_NAME, 0, REG_SZ,
(BYTE*)szFullPath, sizeof( szFullPath ) );</code>
What is wrong???
Thanks!
|
|
|
|
|
You do realize that the Run key is only processed at login, right? Programs don't get run right away when added to the key. (Sorry, silly question, but I had to ask to be sure you understand how the key works.)
--Mike--
LINKS~! Ericahist updated! | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
I know! This is how I've tested:
I use InnoSetup for my app and it creates the MyApp key when installing my app. I reboot, everything is fine, app is launched at startup.
Then, I let my code handle the key. First, it deletes the key with RegDeleteValue and then creates (or should I say sets it) it with RegSetValueEx (as shown above).
I then restart Windows and although the key is there (and apparently with the same value), the app won't be launched!
I thought the problem was that I didn't add a null character at the end of the string but it still doesn't work!
|
|
|
|
|
One thing I did notice is that when I set the key through the code, there's '...' at the end of the string! If I set the value manually, the '...' disapears!
|
|
|
|