|
From the CCommandLineInfo::m_nShellCommand docs:
BOOL CMyWinApp::InitInstance()
{
...
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
if (!ProcessShellCommand(cmdInfo))
return FALSE;
...
};
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
|
|
|
|
|
|
Ive written a small program with two dialogs using ADO datacontrols and Microsoft datagrid the program works.
What I want to is chnage the connect string as the second dialog is opened so that I can make my app portable when I try to do this I get assertion error if place the code in button on the dialog it works. Any suggestions
Donald
|
|
|
|
|
Hi
How do I remove that border that surrounds the window when you create it with Win32?
|
|
|
|
|
Create it with just the WS_POPUP and WS_VISIBLE styles.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I need to develop a program for printing deocuments. when I will setup this program in a machine, the setup will automatically create a icon (not shorcut) in desktop. when user will right click on this icon the menu will be customized, when user click on properties, the program will bring its own property window. like "MyComputer", Recycle Bin", "Outlook".
is it possible? can you guide me how I can implement it, Please.
Saifur Rahman
|
|
|
|
|
Saifur Rahman wrote:
is it possible
Yes
Saifur Rahman wrote:
can you guide me how I can implement it,
Read the articles in the shell programming section. Mike Dunn has written a series of articles which if you follow sequentially...you should be able to do what you wish.
Probably of most interest to you[^]
Cheers
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
I got the program that when its ran it will display 10 lotto numbers. However i raninto a problem, everytime i run it i get numbers that are the same in the draw. Can anyone give me some advice or help on how i can prevent that from happening. Can i do FOR statement to reset all to 0 or set array to 0? how would i go doing that? I included the program below.
//sp
//11/30/04
#include <iostream>
using namespace std;
#include <iomanip>
using std::setw;
#include <cstdlib>
#include <ctime>
int main()
{
const int size = 6;
int a[size] = {0,0,0,0,0,0};
srand(time(0));
for(int w=1; w<11;w++){
cout <<"For game #"<< setw(3) << w << "=";
for(int i=0;i<size;i++){
a[i] = rand()%59 + 1;
cout << setw(5) << a[i] <<" ";
}
cout <<endl;
}
cout <<endl;
return 0;
}
|
|
|
|
|
The problem is probably coming from the way you're handling the return value from the rand() function, which returns a value in the range 0 to RAND_MAX . Try using the following:
a[i] = (rand() * 59) / RAND_MAX;
Software Zen: delete this;
|
|
|
|
|
hi, thanks for the reply.
i try the method of yours and it still output same numbers in draw.
|
|
|
|
|
|
aaaah.....that happenz coz the random function that uses this.....is not a good function to be used.....
try something like using the system time and date and feeding it to a ur own random number generator based on this.....
that ought to help.....
happy programmin.....
cheerz.....
|
|
|
|
|
What you have appears to be fine. srand() is called correctly, which is what most folks fail to do when seeing the same numbers over and over. You should be getting six pseudo-random numbers in the 1-59 range.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I want to make a server client program that administers all computers in a network. The problem is that I don't know how to get all the computers on a network. Can someone tell me if are there any projects here that might help ?
Thanks.
gabby
|
|
|
|
|
See the WNetOpenEnum , WNetEnumResource and WNetCloseEnum functions.
|
|
|
|
|
Thank you very much. Te functions worked fine. I really needed to get the IP of each computer in the network and if I use gethostbyname() associated with a computer name retreived it does not work. I need to get the ip's. can you tell me how can I get the IP of a computer on the network if I know the host . Thank you very much for you answer that helped a lot too. thanks.
gabby
|
|
|
|
|
Hello,
I have made an richtexbox(not multilined) using the RICHEDIT_CLASS. And basicly what I want to ask is; When the richtextbox is in focus how can I there make my application know if I hit Return? Since its only one line I can´t check for '\n'´s.
I am working VS.NET 2003 and using Win32 API.
I hope I´m clear enough otherwise feel free to ask.
Thanks.
|
|
|
|
|
If nothing else works, PreTranslateMessage will do it:
pMsg->message == WM_KEYDOWN
and
pMsg->wParam == VK_RETURN
|
|
|
|
|
Hi,
How can i Set Ethernet adapter (NIC) NDI Params from application ( C/C++ ),
Params are ConnectionType, EnableTagging, VLANID etc'.
|
|
|
|
|
I hope all tree items on context window of html help are expanded when the help pops up.
normally tree items of context window are collapsed.
do you know how to do that?
thx
includeh10
|
|
|
|
|
Check out this website.
http://www.mvps.org/htmlhelpcenter/
I found the sample projects to be useful even though the tutorials are not that great. I was looking at htmlhelp recently and did not get much help from the newsgroups nor could I find much on the web. But the C++ example here was quite useful, so you can download it, compile it, and use the debugger to figure out what is going on.
When you use the htmlhelp api to to tell your program to display a particular help file, within the htmlhelp window, it will expand the table of contents for you. I don't do anything specific to make it happen; it just does it. I implemented context help to allow me to press the '?' button on the upper right of my window and then when you select a dialogue item, it will call the html api function like so...
That is one example; you might have switch statements or some pattern for interpreting the ID of the resource and then calling the appropriate version of ::HtmlHelp. Notice the '::'. I am using the global api function. There is an HtmlHelp function built into the mfc classes as well and I do not use those. I use the global function. Why? Cause it just works for me, I guess.
Here is some example code. You see I am responding to the OnHelpInfo method in my dialog class. I setup the help path to my .htm file and then when I call ::HtmlHelp at the bottom, it will open the main html help window with the table of contents displayed and it will expand them to the file I am telling it to display specifically.
Hope that gets your started. That's all I know; and the htmlhelp documentation, that I have found, really stinks. So I learned how to do things using the example code on the aforementioned website. I still have no idea how it really works.
BOOL CDataReductionDlg::OnHelpInfo(HELPINFO* pHelpInfo)
{
CWinApp* theApp = AfxGetApp();
//Get the help file name
CString sHelpFilePath = theApp->m_pszHelpFilePath;
//sHelpFilePath += _T("::/hid_sc_size.htm");
switch(pHelpInfo->iCtrlId)
{
case IDC_START_DAY:
case IDC_SPIN_START_DAY :
case IDC_START_HOUR:
case IDC_SPIN_START_HOUR:
case IDC_START_MINUTE:
case IDC_SPIN_START_MINUTE:
case IDC_START_SECOND:
case IDC_SPIN_START_SECOND:
case IDC_START_MILLISEC:
case IDC_SPIN_START_MILLISEC:
case IDC_END_DAY:
case IDC_SPIN_END_DAY:
case IDC_END_HOUR:
case IDC_SPIN_END_HOUR:
case IDC_END_MINUTE:
case IDC_SPIN_END_MINUTE:
case IDC_END_SECOND:
case IDC_SPIN_END_SECOND:
case IDC_END_MILLISEC:
case IDC_SPIN_END_MILLISEC:
case IDC_STATIC_FILESTART:
case IDC_STATIC_FILESTOP:
sHelpFilePath += _T("::/task_ex_time_segments.htm");
break;
case IDC_BROWSE_INPUT:
case IDC_FILENAME_OUTPUT:
case IDC_BROWSE_OUTPUT:
case IDC_FILENAME_INPUT:
sHelpFilePath += _T("::/task_ex_file_selection.htm");
break;
case IDC_JMSG_FILTER :
case IDC_GWMSG_FILTER:
sHelpFilePath += _T("::/task_ex_using_filters.htm");
break;
case IDC_CANCEL_BUTTON:
case IDC_START:
sHelpFilePath += _T("::/task_ex_output_desc.htm");
break;
default:
break;
}
//If no additional topic was appended to the help path, then the default
//topic will be displayed.
::HtmlHelp(m_hWnd,
sHelpFilePath,
HH_DISPLAY_TOPIC,
NULL);
return TRUE;
}
|
|
|
|
|
digwizfox,
really thans for your long reply.
i will try your comments soon.
cheers.
includeh10
|
|
|
|
|
Hi,
I want to select a particular part of the image by drawing a frame around them(like in paint brush) or by clicking on two points on the image to indicate the range of selection. I do not know how to do it in VC++ and also I am using CXIMAGE for processing images. Please do help me, I know this is big...but please give me some tips.
Thanks in advance
|
|
|
|
|
I met with the same problem
I wonder if someone got the solution,or the update vision has new functions about that,
for I'm just starting with this class,hope someone can give some clues for that.
Appreciate!
modified on Monday, July 20, 2009 8:34 AM
|
|
|
|
|
I am writing a small test app' and while trying to debug I get the message "Please enter the path of the vc60.pdb" when I select my /debug folder it then shows "A file with the correct name was found, but it is not the correct one." Anyone got any idea what project settings are causing this?
|
|
|
|