|
Forgive me if I'm wrong about this but I believe MSComm is a VB feature. If you are looking to get to the serial port I can give you some help. Use CreateFile, WriteFile, ReadFile and set the file handle to be the comm you want. You might also want to looking into DCB, GetCommSetup, SetCommSetup, GetCommTimeouts, SetCommTimeouts, WaitEvent, CreateEvent, etc - see MSDN Library. Just ask if this sounds like what you need.
Peace
-Mel
---------------------------------------------
The greenest grass is NOT on the other side of the fence, its the grass you take care of. Have you watered your lawn lately?
|
|
|
|
|
Hi,
I am writing a Win32 dialog-based app, without MFC.
Although I can display static bitmaps in the main dialog of the program, I can not get them to appear in child dialog boxes (e.g. my 'About' dialog box).
The method I am using is simply to insert a bitmap resource, and then use the relevant control in the dialog resource editor to show it.
I can see the child dialog's bitmaps in the editor, but not when I run the program.
What am I doing wrong?
Each dialog has its own messageloop. I call DialogBox from within the message loop of the main dialog to spawn the child dialogs.
Any help would be greatly appreciated!
Thanks,
Sens
|
|
|
|
|
The toolbar has a question mark button which when prssed launches the About dialog. I am going to add another menu item under Help (in addition to the About item). Now when I press on the question mark, I stil get the About Box. What I want is for my helpfile to be displayed (the newly added menu Item). I dont know where to instruct the app to display my help instead of About ---- the toolbar question mark doesnt have an ID like ID_QUESTIONMARK so that I could modify an OnQuestionMark function. Where is the question mark button being told it must display the About box?
Appreciate your help,
ns
|
|
|
|
|
The toolbar help button has a command id just like a menu command. Open the toolbar resource and double click the button to see its properties. The command is most likely handled in your CWinApp derived class or CMainFrame .
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Any one knows how to create an array of complex numbers? Do you think I can use CArray or other collective class? Thanks.
mIchAel Liu
__________________________________________________________
The secret of business is to know something that nobody else knows.
|
|
|
|
|
Why not ?
CArray<CMyComplexNumber,CMyComplexNumber> ptArrayOfMyComplexNumber;
Max.
|
|
|
|
|
I'm using C++ complex template class. I got problem when I declared an array of complex numbers. e.g. I declared it like this:
CArray<complex<float>, complex<float>> ptArrayComplexNumber;
The declaration above is not right for the VC compile. So I changed to
CArray<complex<float>, float> ptArrayComplexNumber;
This one is good for compile, but I can't do insertion complex number into it or other actions.
Do you know how to do it?
Best regards,
mIchAel Liu
__________________________________________________________
The secret of business is to know something that nobody else knows.
|
|
|
|
|
I thought someone here might be able to help me with a problem I'm having with my drop down lists.
Seems that they alway scroll back to the last selected item while you are try to scroll down. Thus making it almost impossible for you to select the item you want.
I've created a pointer to the box and then fill it with strings. I haven't set any other options and only care about what the user selects.
Do I need to use some other control or set some certain option?
I have no idea and want to keep it simple, therefore I'm avoiding using the method of subclassing.
HELP!
Here is the code where I creat and fill the list...:
CComboBox *pSelBox = (CComboBox *) GetDlgItem(IDC_SEL);
for(short i = 0;i < MaxSel; i++)
{
pSelBox->AddString(Seldesc[i]);
}
Other than this I only have code that handles a users selection.
|
|
|
|
|
It is probably the code that handles the users selection, can you show us that...?
Blade[DMS]
|
|
|
|
|
Here is the code that I'm using to handle the selection:
void CAMID::OnSelchange()
{
UpdateData(TRUE);
short i = 0;
switch(m_selectionndx)
{
case 0: //clear all malfunctions
for( i=0; i
|
|
|
|
|
One thing I should add that I just noticed. The scrolling is actually the selection jumping back to the last item that was selected.
|
|
|
|
|
Are you polling a source for this info and updating the ComboBox every few seconds, ie in response to a WM_TIMER message?
|
|
|
|
|
I have a timer, but it has nothing in it that this list uses. I have also added code so the timer doesn't execute.
|
|
|
|
|
|
|
I want to show my main htm file in the browser from a Help button. Then the user can follow links etc. How does one at the click of a button launch the browser so that it opens and shows main.htm?
Appreciate your help,
ns
|
|
|
|
|
Use ShellExecute() .
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Okay. ShellExecute works. I imagine when I distribute the project I'll have to include all the .htms plus the associated folders created by Word....Thanks for the API
Appreciate your help,
ns
|
|
|
|
|
Yes. Hopefully Word created relative (not absolute) image links.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
<v:imagedata src="./Select%20New%20Database_files/image003.png" o:title="">
So looks like its relative. Its going to be such a pain to automatically install the 35 odd html associated folders I have using Wise, because each folder has to be created in the Wise install environment, and the contents added (while building the install) The alternative is to have the user copy all the htmls and associated folders manually into the app directory - not acceptable I think. I'll only have to create the folder structure once though....
Appreciate your help,
ns
|
|
|
|
|
I created a bunch of htm files for my HTMLHelkp project. There are lots of bmps embedded in these files. But the workshop doesnt want to compile. Is it a fact that we cant have pictures in the htm files if we are to make a help system out of them? I certainly hope we can.....or I'll have to devise my own technique so that I can use these help files that I have so painstakingly created....I wonder how one would achieve that...somehow show the main htm file in the browser.
Appreciate your help,
ns
|
|
|
|
|
It compiles fine, but all the pictures are little red squares> I used word to create my htm files, and it produces an associated folder for every htm that has pictures in it. I dont know how to incorporate these so that I can see the pictures....
Appreciate your help,
ns
|
|
|
|
|
The image links that Word created are probably incorrect.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi
I need to upload zip files to an Apache web server from my vc++ application. I need to do that using HTTP and FTP because of some security issues involved. I have tried with CHttpConnectoin class but just can't seem to get it to work. I tried using the PUT method but kept getting HTTP 405 error i.e bad mehod error. That was because the PUT method processing was not enabled on the Apache server. Then is tried using POST i.e. I send the file name to the server , there a java servlet creates an empty file with the same name and returns the URL of the file to my application. Then I try to write to the URL. Can anybody please tell me where I'm going wrong? any help would be appreciated?
Thanks
Animesh.
Attitude not Aptitude decides the Altitude in life.
|
|
|
|
|
Without PUT support, FTP protocol is the way to
go for putting files on your server.
You can use CFtpConnection's PutFile method.
Or if you insist on HTTP, you can POST to an
agent (perl script or what-have-you) on the
server via HTTP who'll put the file in place on
your behalf.
|
|
|
|