|
I'm worried, this is commercial s/w you're developing?
Developing with C++ is like programming by the seat of your pants
|
|
|
|
|
How do you make a number (integer) into a CString?
Appreciate your help,
ns
|
|
|
|
|
CString str;
str.Format("%i", iFoo);
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thank you. Any thoughts on my CString * pArray thread? Its quite short and probably obvious to you...
Appreciate your help,
ns
|
|
|
|
|
I wish to make a SDI CFrameWnd based app appear like a dialog based app. Yea, I know I can create a dialog based app but for reasons I won't go into here, I don't want to go that route.
I used Spy++ to look at the style and dwStyleEx bits a a CFrameWnd and a dialog based app, and I've overloaded CMainFrame::PreCreateWindow() and have fiddled with the style and dwStyleEx bits, but I've had no luck.
TIA,
JB
|
|
|
|
|
Anyone have any experience building an app that uses MFC Doc/View and has a look and feel similar to VC6 ? I am trying to modify some code that is based on Doc View. Currently the code has a primary document, which is basically a project, that holds classes, and diagrams. When you open a file or create a new project this is waht you create first. Then if you add a diagram, you can edit the diagram as a new document type. All of which leads to a lot of clutter of MDI windows.
What I would like is to modify it so that when you open a project the main view is housed not in a MDI frame, but in a toolbar like in VC6 (the "Workspace" toolbar). Then any diagrams opened can open up in an MDI frame. Further more, each new project opened up, would add itself to a list that you toggle back and forth between projects.
Is this feasible in DocView ? The reason I want to do this is because the original code is written in DocView and I wanted to reuse(not break) as much as possible.
Any suggestions would be greatly appreciated !
|
|
|
|
|
If I understand what you want correctly, you might want to check out Cristi Posea's docking bars (nw). I've used them in a program to put a tree control that is actually a CView of the document beside the main view. The tree lists items in the project and allows you to select items into the main view.
people are not very wise / don't know their limitations /
don't know what death means / when they play their dirty games 'Killing Fields' Funker Vogt
|
|
|
|
|
Hi. I have been asked to develop my first telephony application. I think I want to do it with Visual C++ or Visual Basic.NET. The application: A program that will let the user dial in to his/her voice mail and access all of the features of the voice mail throught the computer. Does anyone know of existing libraries that might be helpful? Do we need a special modem? Does anyone know if it might be easier to implement in another language?
|
|
|
|
|
If you are using a modem, then TAPI is probably your best option - but a lot depends on the quality of TAPI support in your modem.
If you are going the TAPI route, the best language to use is C++. If you can limit your users to Win2k or XP then use TAPI 3. (You should also be able to use this VB)
If you need to support 9x then you will have to use TAPI 2, so then C++ is about your best option.
See my message here for further links,
http://www.codeproject.com/useritems/tapi.asp?msg=297243#xx297243xx[^]
Michael
"Time and tide melts the snowman."
-- The Doctor (Doctor Who: Time and the Rani
|
|
|
|
|
Michael P Butler wrote:
If you can limit your users to Win2k or XP then use TAPI 3. (You should also be able to use this VB)
I haven't seen any TAPI drivers that supports TAPI 3.0 yet...
And you are right about the VB part, TAPI 3 is COM based, and can probably be used from any COM cabable language...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Anders Molin wrote:
I haven't seen any TAPI drivers that supports TAPI 3.0 yet...
In theory all existing TAPI 2.x TSPI should be useable for TAPI 3. TAPI 3 is basically a COM wrapper around TAPI 2. All the TAPI 2 drivers I've used have supported TAPI 3 - even those that were developed by TAPI 3 was completed.
Michael
"I've died for a living in the movies and tv.
But the hardest thing I'll ever do is watch my leading ladies,
Kiss some other guy while I'm bandaging my knee."
-- The Unknown Stuntman
|
|
|
|
|
Michael P Butler wrote:
All the TAPI 2 drivers I've used have supported TAPI 3
Nice, I did not know that, I thought that they have to be writtten for TAPI 3.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I vould definitely go for VC. You cannot use TAPI older than version 3.0 from VB.
If you want to use a modem to make the calls the the voice mail system, make sure there are some (good) TAPI drivers for that modem.
Make sure the TAPI drivers supports the lineGenerateDigits() function, because you'r gonna use that function to send DTMF tones to the voicemail system...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Thanks for the help everyone! I guess the hard part is learning what functions are available in TAPI and whether or not my drivers support it. Does anyone know of a good reference book or website that would list the functions that TAPI provides?
|
|
|
|
|
IS there such a thing as ( CString *p , SizeOfArray)) when I'm passing in a CString array? I havent seeen CSTring pointers so I was wondering....
Appreciate your help,
ns
|
|
|
|
|
perhaps you should use
CStringArray m_pszMyString
m_pszMyString.Add("1");
m_pszMyString.Add("2");
m_pszMyString.Add("3");
if(m_pszMyString.GetAt(0) == "1")
{
..
bla
}
hope it helps
for people who think life is like a comedy
for people who feel is a tragedy
Whapole
|
|
|
|
|
helps! GetAt() was is new to me, so great to know it.
Appreciate your help,
ns
|
|
|
|
|
I posted about this about 3 months ago er so.. i was hopin someone might have seen this by now?
arg.. i have been using .net since it shipped and now i have added a new dialog.. i right click on the dialog and say 'Add Class'.. specify the class name and set it to be derived from CDialog (instead of CHtmlDialog).. and click ok..
and it doesn't make the .h or .cpp or add the class to my project!!!
i have tried deleting the source safe files and setting all of the files to not be read only.. i have tried adding a dummy dialog and adding a class for it, and it will NOT make a frickin' class for any dialog at all now..
if i try to add a message handler for a button i have tried to make a class for it gives me a frickin' debug error in the 'script' since all of there dialogs are apparently html driven now..
arg.. i cant deal with making every dialog manually instead of having .net make the classes for me, its just too much of a pain in the arse..
is anyone familiar with this error, or can anyone give me an expectation of what to expect if i try to get technical support from microsoft?! i have spent the last 6 months developing this frickin' software and now i cant add any classes to any dialogs?! i thought this was perhaps a screwup in the .rc or the recourse.h, but i am not familiar with these files, and they seem to look the same for the new dialogs as they have for every other dialog ive ever made in .net
arg..
i cant make any classes from any dialogs.. plz give me advice as to what my next plan of action should be (besides manually adding these classes..).. arg..
i was told to delete the .ncb and .aps files by a fellow CP user, but it didnt help.. was wonderin if anyone else had a suggestion?
thanks!
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
I haven't seen this problem in VC++ 7.0... but there is a utility to downgrade your VC++ 7.0 project to VC++ 6.0 on CodeGuru.
Sounds like you might be ready to abandon 7.0... I have.
|
|
|
|
|
I need to be able to draw a line in specific color, regardless of background color, then remove the line restoring the original colors that were overwritten.
The drawing modes, R2_XORPEN, R2_MERGEPEN, etc., appear to be to dependent on the background color. R2_COPYPEN always draws the correct color but then destroys the previous colors written to the pixels. This does not allow me to remove the line, restoring the previous colors for the pixels.
Any suggestions would be appreciated.
Eldon Zacek
Czech-Mate Enterprises, LLC
|
|
|
|
|
Typically, one renders from a model and it is with regards to the model that the line is added/removed; the scene is just re-rendered. If you what you have to work with is just the image itself, then you'll have to just save the image data and restore it later. Or perhaps draw into an overlay layer that doesn't disturb the base image. Are you using plain ol' GDI or something fancier?
|
|
|
|
|
Drawing in normal mode with a pen of a specific color and then later setting the SetROP2() mode (I think that's what its called) to R2_XORPEN and using the same color, erases it.
This is not perfect but works for most cases. If you have drawn a bunch of lines or objects different colors on top of your line then XORing with the background will XOR it with the overlaid colors thus never restoring the original background.
|
|
|
|
|
Actually, that would simply replace the colored line with a black line (all the 1's go to 0's).
|
|
|
|
|
I disagree. Unless, you know the order of what was drawn on top of your line and then redraw it in reverse order using XOR it will not restore the original background.
Say your original background is black and you draw a yellow rect and then follow with a magenta rect where part of the magenta rect draws over a portion of the yellow rect. If you SetROP2(R2_XORPEN) and redraw/erase the yellow rect you will restore the black background for all locations except where the magenta rect was drawn since it will XOR with what's onscreen and that part is magenta. Then when you SetROP2(R2_XORPEN) and redraw/erase the magenta rect it will try to restore a yellow background for the parts that overlap and black on all non-overlapping pixels. Thus, you will be left with a different color than the black background on all locations where the pixels overlapped.
However, if you SetROP2(R2_XORPEN) and draw/erase the magenta rect first it will restore the overlapped pixels to yellow (and the rest to black) then when you follow with SetROP2(R2_XORPEN) on the yellow rect, your original black background will be restored with no garbage pixels.
|
|
|
|
|
Yup. That was the point. In ageement we are. If you have a picture of Natalie Portman and you draw lines all over it in normal mode, information is being lost. There is no way to recover it using SetROP2. You'll just have to save image data in order to remove the lines later. In effect, you are creating a model from which the scene is re-rendered, even if that model is as simple as the base image and line undo information.
|
|
|
|