|
Sunnygirl wrote:
that or i should go to bed earlier.
Well, that is always an option, I have days like that myself.
Sunnygirl wrote:
i think your idea is perfekt and i will try it.
Good luck - if you get stuck, just ask some more.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
hi all
can i know how do i set the date of my programme so that it can take the date directly from the computer without we ned to set everytime we use the programme.Do i need to ue timer to do that.
pls reply asap
Thank alot!!!!!
diana
|
|
|
|
|
time.h contains an API called time, and one called ( from memory ) globaltime. If you look up time_t in the MSDN, you'll find all you need.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
It's so long since I had to this I have forgotten how to enumerate the com ports that are installed in a machine, including a USB to serial adaptor.
Does anyone have a simple example at their fingertips?
Thanks in advance.
Happy programming!!
|
|
|
|
|
Hi Wolfram,
there are a couple of hints in the Windows DDK documentation.. Try to search MSDN for 'Serenum', maybe this could help you.
Another aproach is try to open all known ports, in most cases it's enough to do this with at least 9 ports (COM1- COM9). If open returns OK, you can use this port, if not, it's already in use or not there...
That's the way I do it in my apps...
Greetings!
Olli!
Olli
Make it idiot proof and someone will make a better idiot......
|
|
|
|
|
The COM1-COM9 is what we did and thought is was a big enough choice to connect a single device up, but we had a bug report that COM10 was missing. Hence I thought if I enumerate what is actually installed there should be no further debate.
Happy programming!!
|
|
|
|
|
Take a look on http://www.codeproject.com/system/enumports.asp
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Thanks
Wonder why that didn't come up when I did a search?
Well I have it now
Happy programming!!
|
|
|
|
|
hi everybody,
i made a couple customized commands on my menu. i bind all the event handlers to the commands and they work correctly.. when i was running/testing my program, i check out the debug/output windows and i noticed i keep on getting error warning messages on the commands that i defined.. can someone please tell me what does this message mean? altho it doesn't affect the functionality of the program, i want to know what does it mean exactly.. thx in advance..
the error message:
Warning: no message line prompt for ID 0x0098.
|
|
|
|
|
When your main frame has a status bar, MFC shows flyby help in the status bar for the selected menu item. The debug msg is saying that you don't have a flyby help string for the menu item with ID 0x98. You can set a help string by double-clicking the menu item in the menu editor, then filling in the "Prompt" field in the property sheet.
--Mike--
If it doesn't move and it should: WD-40. If it moves and it shouldn't: duct tape.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Anyone have any references for detecting temperature sensors on a motherboard and reading them??
PRETTY PLEASE
|
|
|
|
|
http://www.codeguru.com/forum/showthread.php?s=&threadid=173109&highlight=temperature
http://www.codeguru.com/forum/showthread.php?s=&threadid=209801&highlight=temperature
|
|
|
|
|
Hi,
I have an application with many tab controls (and in many of them I have other sub-tab controls) and I feel that it is heavy/troublesome to create new tabs or to maintain the existing ones.
Is there a way where I could just edit new tab controls visualy without having to create a new dialog for its content everytime?
I imaging being able to add a tab control to my dialog. Then I would simply specify the labels for my different sheets and by clicking a specific label, its content would be displayed and editable.
Now I always have to create a new dialog for every tiny sheet, then programatically set up everything and see the result only when running the application.
Thanks for your help
|
|
|
|
|
hello @all,
i have a dialogbased program.
there a two buttons (eg. button1 and button2).
if i press button1 first i get a new dialog (ID_DIALOG_COMBO) with a combobox (m_ctrlComboBox ).
if i press the button2 a CString (CString mystring ) should be enterd into the combobox from the ID_DIALOG_COMBO.
how can i do this????
thank you very much
this is only an example, to explain the real background would be take to much time
sunny
|
|
|
|
|
|
"Think about what you want the program to do. How would you do it manually ?" Christian Graus- Dec 02
ZARZOR13
|
|
|
|
|
Put button 2 on ID_DIALOG_COMBO
Kevin
|
|
|
|
|
i would be happy if i could do this, but the real program is more complicated...
i must have to different buttons, because if you have not a right password (somewhere before) you cannot see the ID_DIALOG_COMBO
thanks sunny
|
|
|
|
|
I would create the dialog in a thread, use a CStringArray for the contents of the combo box and create a function to refresh the combo.
_beginthread( ShowDialog, 0, ID_DIALOG_COMBO );
LRESULT ShowDialog( LPVOID pVoid )
{
CDialog Dlg;
Dlg.Create( pVoid );
Dlg.DoModal();
return TRUE;
}
or
CMyDialog* pDlg = new CMyDialog;
pDlg->... // initialize members
_beginthread( ShowDialog, 0, (void*)pDlg );
LRESULT ShowDialog( LPVOID pVoid )
{
CDialog* pDlg = (CDialog*)pVoid ;
pDlg->DoModal();
delete pDlg;
return TRUE;
}
The pointer method is preferable because you can store the pointer(s) and control the dialog using these pointers. Make a function to refresh your combo and call it through any initialized pointers. Maybe use a CPtrArray.
|
|
|
|
|
Why is that Visual C++'s GUI knows about sqrt yet the compiler doesn't?
As I edit my source I typed in sqrt and as I start to
type in the paramters the GUI presents me with 3 different prototypes of sqrt ... I think cool Visual C++ knows about sqrt ... so I typed sqrt( myDouble ); as per
the GUI. Yet I get a compiler error?
|
|
|
|
|
Because the IDE searchs all the headers in the include paths, but the compiler requires that you include them. It's probably math.h, or cmath ( which, if it works, is preferred ). Also cmath may require you use std::sqrt. All of this is a guess, but I am pretty sure that math.h at least will be the right one, and it's certainly a missing #include.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
My code looks kinda like this ...
#include "math.h"
#include "stdafx.h"
.
.
.
double BlahBlah::Blah_Abs ( double real, double img ) {
double rc = real * real + img * img;
return sqrt( rc );
}
.
.
.
Yet the compiler does not complain about not be able to find math.h in the include path so I must assume that VC++ knows about math.h and since the compiler errors on sqrt ( rc ); I guess that sqrt( double ) is not declared in math.h
|
|
|
|
|
include the math.h file
I bet it will work.
Kevin
|
|
|
|
|
sqrt requires #include <math.h>
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Just to reiterate and add my voice to the cacophany, the intellisense parses all include paths, but the compiler will only compile if you actually include the bits you need in your code.
I suggest that it's a wise course of action when people answer your question to try the suggested solution before arguing about it.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|