|
hint_54 wrote: Can this be done?
Of course it can be done. If it could not, then the standard template library (STL) would not work. But it depends on what the template class does and what requirements are placed on the on arguments to the template.
Examples:
vector<vector<int> >; // space between > and > required
vector<string>; // string is defined as basicstring<char>
INTP
Every thing is relative...
|
|
|
|
|
I have a shortcut defined as
%windir%\SYSTEM32\RUNDLL32.EXE "d:\Omega16 xxx\g32csg.dll,FONTMANAGERDIALOG"
rundll32 does not give me any error nor does it execute g32csg.dll. If I change it to
%windir%\SYSTEM32\RUNDLL32.EXE "d:\Omega16\g32csg.dll,FONTMANAGERDIALOG"
with no space in the Omega16 part of the name and also change the actual folder name it works. Any path with spaces doesn't seem to work. This has to be simple but I'm missing it
This is on a W2K system. rundll32 version is 5.0.2134.1
Thanks in advance
Tony Teveris
Gerber Scientific Products
Senior Software Engineer
Phone: 860 648 8151
Fax: 860 648 8214
83 Gerber Road West
South Windsor, CT 06074
|
|
|
|
|
What about:
%windir%\SYSTEM32\RUNDLL32.EXE "d:\Omega16 xxx\g32csg.dll",FONTMANAGERDIALOG
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
That seems to work as long as the "Start In" field points to the same folder "d:\Omega16 xxx"
Thanks
Tony Teveris
Gerber Scientific Products
Senior Software Engineer
Phone: 860 648 8151
Fax: 860 648 8214
83 Gerber Road West
South Windsor, CT 06074
|
|
|
|
|
Hi,
I am placing a bitmap on a button using LoadBitMap and SetBitMap.
The problem is that when I draw the bitmap, I want the background to be transparent so it will appear nice on the button.
From some reason, the "Draw Opaque" is checked by default in VisualStudio on the "Image" menu and I can't change it.
How do I use a transparent background on a bit map I am drawing.
Shay
-- modified at 14:40 Monday 12th December, 2005
|
|
|
|
|
Im having problems with a scroll bar issue. I have 3 scroll bars in a dialog, and i added a OnVScroll() method to my code to do some resricting of the scroll bars at certain times. But the problem is i only get 0's back.
void CScanPatternDlg::OnVScroll( UINT nSBCode, UINT nPos, CScrollBar *pScrollBar )<br />
{<br />
int low, high, curPos;<br />
CSliderCtrl* slider = (CSliderCtrl*)pScrollBar;<br />
<br />
<br />
slider->GetScrollRange( SB_VERT, &low, &high );
high = slider->GetScrollLimit(SB_VERT);
<br />
<br />
switch( nSBCode )...
also nPos = 0, which is supposivly the current position of the scroll bar. Also when i call getPos() on pScrollBar, it returns 0. I've fiddled around a little bit, and noticed that pScrollBar is equal to the HWND of the right scroll bar, so i guess i dont get why these methods arent working.. Any ideas?
"There are 10 types of people, those who understand binary, and those who don't."
- Somebody, not me.
|
|
|
|
|
greetings,
1. Is a CSliderCtrl kinda a CScrollBar?
2. Do child controls of a dialog window reflect messages to the parent window?
3. Can class wizard connect the CSliderCtrl messages to the parent window?
|
|
|
|
|
I wrote a simple program that cycles through a bunch a bitmaps and displays them each for 5 seconds. The program can run for hours. The problem is that the i can't stop the program once it starts (beside hitting the X and crashing). While inside the for loop, the menu is ignored. I'm sure this is common and there's a simple way to check for user input but I can't find it.
|
|
|
|
|
put the loop into it own thread... this way, it doesn't block the UI...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
then in the loop (that's in its own thread), have it check some static variable or something that gets set to true when a certain button is pressed. Then add that variable as part of the criteria for your loop to continue looping
My articles
BlackDice
|
|
|
|
|
Greetings,
you have to allow the message pump of the main window run; Either dispatch messages from your bitmap loop; check msdn for pumpmessage;
|
|
|
|
|
Thanks a lot everyone. I'm wasn't ready to try tackling threads yet, especially for this program, since I just needed to cancel out of the main loop. I looked up info on PumpMessage() and found a great article call "Lengthy Operations Without Multiple Threads". I implemented the technique and the program runs exactly like I wanted it to.
|
|
|
|
|
How do I catch this even without checking if the point belongs to list box area or not ?
Please help.
--------------------------------
Human stupidity is infinite.
|
|
|
|
|
Hi dudes!
I have an especial electronical device that I connect to my computer through USB, and there's a USB-serial driver that emule the RS232 communication through USB.
That's ok.
The fact is that many times I must to point to Control Panel -> Sistem -> Hardware -> Devices -> Comm Ports to see which comm port the device is using.
I want to developed an small application, with just a button. Then when I press it, a MessageBox shows the Comm Port used for that device.
What API function/s should use in the button click event handler to get that kind of information, (in fact, it is the same that control panel display in Comm Ports).
Thank very much guys!
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
Well, you could enumerate the serial ports in the system, and then open/close them one by one. Any port in use will not open. Hence you will know which port is in use, but still, it could be a serial mouse.
this is this.
|
|
|
|
|
you can read the regedit in you system,
"HKEY_LOCAL_MACHINE\\HARDWARE\\DEVICEMAP\\SERIALCOMM"
at there you can get the information you need!
学习是一辈子的事!
|
|
|
|
|
Yes wotur that's what I need.
Thank you very much.
Regards.
Demian.
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."
-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
|
|
|
|
|
i am using a ddl to call other dll to show a form, that´s ok.But the problem is, i can not give the focus to the form, if there are more forms or programs opened the form that i call stay under the others , i want it to apears in front of all the others things opened,i have already used ShowModal but it does not work, can you help me, i am using C++ Builder(Borland) in windows 2000.
tks
|
|
|
|
|
I have a modeless child dialog of another parent dialog.
when initializing the parent dialog, I set initial values for the child dialog controls; one of those controls ( more than one actually ) is a radio button group. That radio button group will enable/disable corresponding controls depending on which button is pressed.
Now, I want to initialize the radio with one value, and automatically enable/disabled corresponding controls ( like it would behave if the user click on one of the radio choice ).
I do something like :
m_RadioValue = myRadioValue;
UpdateData( FALSE );
When doing the UpdateData, it will set the UI for the radio button, but is there a way to call the callback that would be called if the user clicked on one of the button; or do I have to do all this manually ? not a big work, but will need a bit of code re-organizing.
hope I was clear enough.
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I would refrain from using UpdateData() , especially with radio buttons. Create a CButton control variable for each radio button. In the dialog's OnInitDialog() method, do something like:
if (1 == myRadioValue)
{
m_button1.SetCheck(BST_CHECKED);
OnButton1();
}
else if (2 == myRadioValue)
{
m_button2.SetCheck(BST_CHECKED);
OnButton2();
}
else if (3 == myRadioValue)
{
m_button3.SetCheck(BST_CHECKED);
OnButton3();
}
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I will remove the UpdateData ... I already have CButton for each button.
Thanks, will look into that.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I think that my problem lies elsewhere, when I call my method to enable/disable controls, it does not work.
I do this in my OnInitDialog :
m_Radio1.SetCheck( BST_CHECKED );
m_Edit1.EnableWindow( FALSE );
m_Edit2.EnableWindow( FALSE );
m_Edit3.EnableWindow( FALSE );
but all of there are still enabled when the dialog appears.
'nyway ... In the grand scheme of things, it's only a minor, minor UI glitch.
Thanks David.
I'm certain I asked that same question a couple years ago ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote: but all of there are still enabled when the dialog appears.
Do you have other staments where EnableWindow(TRUE) is called?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
no, not that I can see, I put breakpoints everywhere ( running in debug mode ), and they never get called before I actually want them to be called.
I went this way, I disabled all my controls in the resource editor, and enabled them as needed ( instead of disabling them in the code ) ; my problem is when I initialized the dialog, not when using it.
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote: no, not that I can see, I put breakpoints everywhere ( running in debug mode ), and they never get called before I actually want them to be called.
Just to verify, temporarily change all EnableWindow(FALSE) calls to EnableWindow(TRUE) . Even though a breakpoint is not being hit, this will at least eliminate the debugger as masking the problem.
Maximilien wrote: I went this way, I disabled all my controls in the resource editor,
Again, temporarily change all the controls to be enabled via the resource editor. Now your dialog should come up with all of the controls enabled. Yes? If so, start changing one statement at a time, or one control at a time in the resource editor, until the problem shows up.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|