|
Thanks, that worked quite well.
Solution has over 1200 files, 262000, which 171000 are code, 51000 comments and 4000 mixed. Does that count as large?
(forgot to mention, 440 stored procedures and 140 tables in sql server)...
|
|
|
|
|
Hi,
I need to create a function which would take in parameters like printf (or scanf, fprintf etc). i.e
Say my function name is foo
I need to be able to call it with
foo(char *StringFormat, .....)
just like printf
can anyone help?
Thanks,
P
|
|
|
|
|
Look at the va_start() , va_arg() , and va_end() functions
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Thanks a lot
|
|
|
|
|
If I print my chart with the Axis Labels, then i have a problem with the font escapement.
For printing I use the Mapping Mode "MM_TWIPS" (Positive x is to the right; positive y is up.) and create the Font with escapement value=2700 (270 degree). In Print Preview the orientation of the label is correct (from up to down), but if I print the chart, on the paper the label differs (rotate 180 degree -> from down to up). So I dedect if the device context is for the print preview or for printing and change the orientation.So I was happy. Now I use the programm in Windows NT and the orientation is not correct. In Windows NT there is no difference between print an print preview and i don't make a difference between Print an Print Preview. Have anyone an idea?
Thanks and sorry about the English.
|
|
|
|
|
Are you setting up the DC for printing in the OnPreparDC() virtual function override in your view for printing?
This is the place to change the map mode to MM_TWIPS. Beyond that I am not too sure, as I normally only ever use MM_TEXT mode when printing.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Thanks,but I set the Map Mode in OnPrepareDC(), but this change nothing. So it wasn't the reason.
|
|
|
|
|
Hi
I have a dialog where there are some CStatic, CButton, CListCtrl controls on.
Now i want to be able to get all control names & types on the dialog so i could get the title that is on the controls. (label & button: caption, listviewcontrol: column name(s))
How could i do this?
Greetings
JensB
|
|
|
|
|
GetDlgItem. Use the name you have given the control as the parameter (something like IDC_LISTCTRL). It will return a CWnd*. Just cast it to the control of your liking. This way you can retrieve the caption (i think its GetWindowText) from the control.
|
|
|
|
|
yes, that works when you know the name of the control.
I apologise if the question wasn't clear. (blame it on my english, not me )
But suppose, i want to use the code for every dialog.
So i need to know the names of the controls dynamicaly.
And get all captions (GetWindowText()) of all static controls.
Greetings
Jens
|
|
|
|
|
Create a member variable for each of your control, so if you have several dialogs, you can still reach each control. For exemple, with a CEdit :
CString bla;
CDialog m_DialogNumber1(ID_DIALOG1);
CDialog m_DialogNumber2(ID_DIALOG2);
m_DialogNumber1.Create(...);
m_DialogNumber2.Create(...);
m_DialogNumber1.m_EditCtrl.GetWindowText(bla);
m_DialogNumber2.m_EditCtrl.GetWindowText(bla);
This example sucks, but i think you'll get the idea.
~RaGE();
|
|
|
|
|
well, i needed to get the WindowText of some controls. You can assign a member variable to it.
But the idea was not to do anything special, but just getting some kind of collection of all resources in the form. Then i would get that collection, check the type of resource (button, ...)
Why do i want to achieve this:
The program runs in about 3 languages. For easy translation, i want to be able to get all 3 translations of the text that is on the button for example.
Of course, i can type it over .. but because i'm a bit lazy it's alot of work.
I thought it would be easier to programmicaly do this.
Greetings
Jens
|
|
|
|
|
Use EnumChildWindows() and then GetWindowLong( hWnd, GWL_STYLE ) and GetClassName( .. ) to work out what type a control is.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Hello,
I need to implement a chart control (from custom control) that will display real time data (I receive a point every 13 msec), in a normal line mode (e.g. something like an oscilloscope).
But I'm really really new to "graphical programmation". I found some examples here and I based my work on them (using memory bitmap we draw in, then "push" it to the display). I draw just once the "background" of the object (axes, grid, ...) on a bitmap and when I need to plot a new point, I add it to the bitmap.
I was wondering if this method will support high speed ?? If not, what can I do for it ?? A better solution is perhaps to invalidate just the region from the old point to the new point ??
Just a last thing to say: I program in embedded visual C++ (so for Pocket PC, ...) but I posted my question here cause the language is almost the same (some functions are not in embedded) and there's much more people oon this forum ! So, that's also a reasoon why I want to do it myself: I didn't found any chart that fits my needs!
All suggestions are welcome (as I said before, I'm newbie in this domain).
Thanks
|
|
|
|
|
For my application i used the CGraph Class from Brian Converey (http://home.attbi.com/~bconvery3/dev/cgraph4.html). But I must modified it for draw real time data. I can send you my changed code. Send me an email.
|
|
|
|
|
Hi !
Thanks for your help. You can send that on: cedric_moonen@hotmail.com
|
|
|
|
|
hi Cpians,
I just need a small help..
I need to create a modeless Message Box..
Any idea or help in creating this...
cheers,
Super
------------------------------------------
Too much of good is bad,mix some evil in it
|
|
|
|
|
Create a modeless CDialog with an Static ctrl and a button.
~RaGE();
|
|
|
|
|
I am accessing Files, folders, drives over network. Through SHBrowseForFolder I get the path over network. The problem arises when I check the path for validity with CFileFind.
Assume that there is a pc with name PCabc over the network, and it has a folder in one of it's drive with name FOLDER1, which is sharable, with the same name.
The path I recieve is \\PCabc\FOLDER1, Now when I pass it through CFileFind::FindFile() and CFileFind::FindNextFile(), the path is rejected. However if I take a folder say SUBFOLDER1 in the share FOLDER1 (which is also the exact name of the folder), I get no problem, ie, the path \\PCabc\FOLDER1\SUBFOLDER1 gives me no errors. It is accepted by CFileFind.
Can you suggest me what should I do to get the path for the shares which will be accepted by CFileFind.
Thanks
|
|
|
|
|
CFileFind::FindFile("\\\\PCabc\\FOLDER1\\*.*", ...); should work. If not, you'll need to step through the FindFile() code to see what it does not like.
|
|
|
|
|
My activeX for IE is request to connect the database through Internet. Can you help me?
stanley
|
|
|
|
|
Well, some of your choices are as follows:
1) Expose the SQL server to the internet and connect via the IPAddress as usual (Security NIGHTMARE)
2) Use RemoteDataAccess (requires IIS server and code changes)
3) Write your own Web server service that will authenticate the client and pass the SQL Statements on to the database behind the firewall.
4) VPN.
<marquee scrollamount="3" scrolldelay="80" direction="right" width="40%" style="border: 2px inset silver;background-color:yellow;color:green;font-family:Verdana,Arial;font-size:8pt;font-style:italic">onwards and upwards...
|
|
|
|
|
Hi all,
I guess this question will be easy for the windows expert on the CP, but I'm stuck with it.
Basically I enumerated all the processes on the system with PSAPI.dll's EnumProcesses.
Now from each process's HANDLE, I'd like to get a handle to its main window's HWND, in order to send messages using SendMessage.
How can I do that?
Thanks in advance,
Arnaud
|
|
|
|
|
One solution is OpenProcess(). Is one a reference from MSDN.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/enumerating_all_processes.asp
Kuphryn
|
|
|
|
|
Hi everyone,
I'm pretty new to multimedia programming, have a task here that need expert guidance from you all .
What I'm trying to do is to embed a mpeg 4 player into a MFC program I'm doing.
I'm pretty lost as to how to get started, I've read that DirectX is pretty useful for multimedia application in VC++. Should I focus on DirectX? Does it support Mpeg 4?
Thanks in advance.
Sincerely yours.
WT
|
|
|
|