|
Hello, I'm trying to access a variable in theApp from int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) using theApp.m_variable to access it.
.. when I type the "dot" in theApp.m_variable I get the list of all the variables in theApp but when I compile the whole lot, I get the error: "left of '.m_variable' must have class/struct/union type"!
One being bugged!
|
|
|
|
|
Place the following line at the top of MainFrm.cpp or in a header file if you use it a lot.
extern CMyProgramApp theApp; // This object is defined in CMyProgram.cpp
You could also use
CMyProgramApp* MyApp = (CMyProgramApp*)AfxGetApp();
|
|
|
|
|
Hello,
I urgently need help regarding the following.
1. I have made a VB OCX Chart/Graph control to be used within VC++ and i want to pass an array of data values to it through VC++.
Please guide me reagrding the same.I shall be ever thankful.
thanks in advance
-------------------------------------------
Dashmesh A. Singh
Tata Consultancy Services,
INDIA
e-mail: visions_next@yahoo.co.uk
dashmesha_singh@tcscal.co.in
|
|
|
|
|
Look at SAFEARRAY examples in MSDN!
|
|
|
|
|
Hi,
I can't remember and find the information about disabling an item in a ctreectrl, ie the item can't be selected, expanded, etc ...
Thanks a lot
Nicolas
|
|
|
|
|
In MFC, if I use _spawnl( _P_WAIT, process 2, str2, str3, str4, NULL ) function to call process 2 in process 1. How can I get the str2, str3... in process 1? Thanks. And can I hide the window of process 2 when the process 2 is running?
Kidd
|
|
|
|
|
Don't use _spawnl(). Use CreateProcess(), which is well-documented in the Win32 API documentation.
|
|
|
|
|
> How can I get the str2, str3... in process 1
If you spawn() from process 1 you already have str*. If you want to access the parameters in process2 (the spawned one), you'll have to use argc/argv arguments of main(). If process2 is MFC app, you can access the parameters using __argc and __argv which are global variables.
You can also play with ::GetCommandLine() API function.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Is there a way to let a program minimize/maximize from/to the systray? .. well, I know there is a way but how do you do it?
thatman - now doing the systray thingie
|
|
|
|
|
look here:
http://www.codeproject.com/datetime/traycalendar.asp
good luck
Le Ridder Noir
Considderd to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru.
|
|
|
|
|
hello,
I have imported a folder .cdb into a pocketpc from a database access .mdb,and i would like to open this database and to do some reqest on it.
Thanks
|
|
|
|
|
I need to make the following (very common I think) thing: an edit box for the e-mail address and a button "create new mail" using entered address.
The existing implementation of this function does not suit me because it's not working without properly setup e-mail client . The implementation is call to ShellExecute function with URL like "mailto:a@a.com..."
I've examined winzip using regmon (by sysinternals, Mark Russinovich & Bryce Cogswell). It opens key HKLM\Software\Clients\Mail, takes default client name, opens its key right here and uses the specified dll
Then "create new mail" window of the e-mail client opens.
May be there's some one else knows how to do that???
konst
|
|
|
|
|
The HKLM\Software\Clients\Mail registry key is used by MAPI - I think it's not necessary to read the settings and call DLL 'manually'. CDocument::OnFileSendMail creates a message with serialized document as an attachment and opens a default email client - have a look on this method.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Does anyone have any idea how to copy all the files and subdirectories of a directory I choose and exclude all the debug directories(for backup purpose)
Thanks in advance
Le Ridder Noir
Considderd to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru.
|
|
|
|
|
I'm using batch files and compression program for that. Basically, I have a batch file that searches .dsp file for lines containing references to project files. These lines look like this:
SOURCE=.\myfile.cpp
Then, I'm replacing "SOURCE=.\" with nothing; the result is list of files included by project. This list is passed to the archiver, which makes a compressed file.
I'm pretty happy with this solution; the only problem I initially had was related to the resource files - it turned out that you can have some file (.ico, for example) referenced by .rc, but not .dsp.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Does anyone have any idea how to copy all the files and subdirectories of a directory I choose and exclude all the debug directories(for backup purpose)
Thanks in advance
Considderd to be the worlds fastest knoppenbonker.
10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru.
|
|
|
|
|
Not a true answer to your question but it may help... I use a neat little freeware program called CleanEx by Paul Dixon:
http://www.elphin.com/products/cleanex.html
Basically it deletes all the temp intermediate files made by VC in my debug and release directories.
I simply run that and zip whats left!
You can configure the types of files it deletes, so it may be useful to you.
--
The Obliterator
|
|
|
|
|
I am using the STL vector from VC++
How can I look at the entries like MyVector[0]
The Compiler says
'overloaden operator not found ' (Translatation from German)
can somebody help me?
|
|
|
|
|
I thought operator [] was there. In any case, you should use MyVector.at(0) because it does bounds checking for you.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hi
I have a class Line which has 2 endpoints as members and Drawing() as method.
I just declared a CTypedPtrList of pointers to Line in document .I accessed the list in view by GetDocument() and created the instance of Line and added to list.I want to modify the values of end points so that i can draw another line with same pointer.I am able to reflect the changes in OnDraw() but I want to serialize the data which i modified.i am able to serialize the data which i have given at the time of creating the instance of the class(pointer which i am storing in list) but not the modified values.I am getting the pointer from list and modifying the
values after assigning to another pointer.to reflect the changes what i have to do?
Thanks for ur help.
bhikshapathi_g@semanticspace.com
|
|
|
|
|
OK the background information first, I am writing a dialog based application that sits on top of a database (sounds exciting already doesn't it). If the user clicks the Customer button he is magically transported to another dialog (remarkable) that has a ListCtrl in Report mode that lists all the Customers (OK, so far so good).
The next amazing leap of logic requires me to enable the user to update or delete customers. I thought that I would have the user click on the required Customer row (logical isn't it?) and then enable Change/Delete and process from there.
Problem is when I click on a row only the first column in that row is highlighted (not the whole row) and I have to click on the data itself not just the cell (I know it's not a cell per se (been wanting to use that phrase for years) but you get the idea).
Now I have been into ClassWizard and looked at the available messages and the associated descriptions that appear at the bottom of the dialog box and none of them seem to be the one I want. I tried a few and they weren't the one's I wanted, I could only get recognition of a click to a ListCtrl header.
I then tried using Spy++ (I am not experienced with this tool) but all I could see were mouse move, mouse button down and destroy messages. None of which helped me.
Questions are -
1. What message should I be looking for when clicking on a ListCtrl row?
2. Can I get the whole row to highlight?
3. If a ListCtrl is the wrong control what should I be using?
Any other hints, tips or suggestions eagerly accepted.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
1. What message should I be looking for when clicking on a ListCtrl row?
LVN_ITEMCHANGED
2. Can I get the whole row to highlight?
YourListCtrl.SetExtendedStyle ( LVS_EX_FULLROWSELECT );
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Mike
thanks very much for the reply. Will give these a go after the kids go to bed. They are due home any moment now and toddler keeps climbing up on my lap and thumping the crap out of the keyboard.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
Be aware that the full row style is only available with IE4+ commmon controls. So your user has to have at least IE4 installed or you need to install them.
|
|
|
|
|
OK, have just been reading a couple of articles that refer to the Platfrom SDK and that I can get it with MSDN, purchase it from Microsoft on CD or download it from here.
The first two are out while the third kept giving me error messages about not having the correct authorty to access it.
So I did a quick search on Google and was taken to the Platform SDK download page. As I was working from home today and there is no way in hell I would download the SDK over a dial-up line I took control of a server in the office and proceeded to download the ~840KB executable.
I assumed that I was to then run it, tell if I wanted typical/custom/what ever install and download the relevant (read all) bits like I can with the Internet Explorer download. Problem is it gives me an error message about not being a valid msi file.
Is it possible to get my hands on the SDK without having to resort to buying it (yes I'm a shameless cheapskate)? And if so how?
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|