|
_spawn works for me. Or WinExec. Or CreateProcess. Or use the help system...
|
|
|
|
|
ShellExecute can also be used.
- David Gevert (don't feel like logging in.)
|
|
|
|
|
Search as I may, I cannot find how to set a selection in a clistctrl from within code ( as in preseting a selection when the control is first populated ).
Also, I notice that whenever the dialog bar containing the list control is significantly moved ( un/docked, un/hidden ) the highlighted selection disappears.
Can anyone tell me how to handle these things?
I imagine they're fairly simple.
Thanks in advance.
|
|
|
|
|
To set the selection: ListView_SetItemState ( hwndYourList, nIndexToSelect, LVIS_SELECTED, LVIS_SELECTED );
You can add LVIS_FOCUSED to the flags to set the focus rectangle to the item as well.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
I am having problems reading an object from a file..
this the class:
class MEMVAr
{
public:
CString Course;
int Wheight;
CString Grade;
MEMVAr() : Course(""), Wheight(0), Grade("")
{ }
};
I have declared the object as a public variable in the class CGPACalcDlg as follos:
MEMVAr D_F[18];
now.. when I write the object to the file using this function:
void CGPACalcDlg::OnWrite()
{
ofstream outfile("data.dat", ios::binary);
outfile.write(reinterpret_cast<char*>(&D_F), sizeof(D_F));
outfile.close();
}
the follwing function only reads the integers:
void CGPACalcDlg::OnRead()
{
UpdateData (TRUE);
ifstream infile("data.dat", ios::binary);
infile.read(reinterpret_cast<char*>(&D_F), sizeof(D_F));
infile.close();
UpdateData (FALSE);
}
I can only view the integers in D_F object.. what is wrong with the code ?? why I can't read the CString variables?
|
|
|
|
|
A CString only holds a pointer to the string data (much like a plain char*) so when you write out the raw struct, you don't save the string itself. You'll need to write out the actual strings, and when you read back in, assign the strings to the CString memebers.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Do you think converting the CString into chars, then write the whole thing will help ?
|
|
|
|
|
|
I need to make a small HTML editor , not a tag editor a WYSISWYG type like FrontPage
I only need the view class or atleast HOW to make one, it should be interactive so when I
write http://www.somesite.com it will change it to a hyperlink and I can insert an image.
any thing will help...
|
|
|
|
|
I'm in need of some code to filter a list of files based on their types. Now, I could use the extensions, but I'm using the shell functions to get the filenames, and these may not include extensions. I thought I'd try to use the shell functions to query the flie types, but.. alas.. there does not seem to be such a function! SHGetFileInfo will return the file type name - the descriptive name shown to the user - among other things, but I'd rather use the type itself. (As a ferinstance, the file type for a .cpp file is "cppfile", whereas its type file name is "C++ Source File".
Anyone know how to do this?
Jim Johnson (sorry, not anonymous, can't remember my *%^% password...
|
|
|
|
|
Are you using IShellFolder to enumerate files? If so, when you call GetDisplayNameOf(), you can pass SHGDN_FORPARSING to get the raw filename.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Hey guys, is there an easy way to dynamically create a menu based on the contents of the windows\start menu\programs folder and all subfolders?
I'm creating a shell-type thing for my Computer Science 201 class; it's a very simple and limited shell right now. I'm kind of, err, a beginner, when it comes to VC++, but I know shells out there that can dynamically generate menus on the fly, and that feature would come in handy and pretty much instantly make my program usable.
Another question I have: is there any practical way to let a user add/delete/edit buttons, like ones that launch programs? Right now my shell is a simple dialog box with two buttons (launching notepad and wordpad with ShellExecute(...)), a calendar, and a run command.
Thanks!!
|
|
|
|
|
Use CreatePopupMenu() to create a new popup menu. Then call InsertMenuItem() to add items into the menu. To enumerate the Start menu, get the location of the Start Menu directory with SHGetSpecialFolderLocation(), then FindFirst/NextFile() to enumerate the contents of that directory.
How you organize stuff on the menu is up to you.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Hi,
Does anyone have an idea how to set a network card in "promiscuous mode"?
I was thinking about playing around with writing a network_sniff_thing, mostly for the challenge of it...
Any hints/ideas are welcome...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I believe my sister spent most of the 80's in promiscuous mode ( that was the word on the street in any case ), but my attempts to set other women to that mode failed completely.
Christian
#include "std_disclaimer.h"
|
|
|
|
|
Now I see why you use #include "std_disclaimer.h"
Hehehehe
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
dude that is wrong in so many way but funny as hell
|
|
|
|
|
It seem that when running VC 6 SP 4 that the IDE overwrites the %INCLUDE% and %LIB% environment variables with the values contained in the Tools|Options|Directories tab. Is there some setting I can use to prevent this? I want to set up a bunch of machines using a simple VBScript and don't want this dialog to have to be set up every time.
TIA
Ed Tillman
|
|
|
|
|
Run MSDEV with the /USEENV command-line switch. See the page "Building a Project from the Command Line" in the docs for more info.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Thanks, that was what I was looking for!
|
|
|
|
|
Hi,
I want to implement MS Word kind of Autocomplete tip functionality in my MDI application with CRichEditView.
MS Word kind of Autocomplete tip:- in Microsoft Word if you type date or month name, say Janu, you get a tool tip kind of box displaying January. Now to accept this you need to hit Enter key.
I want to give a feature similar to this, when user types, in rich edit view of my MDI application. How to do this?
Any pointers regarding this will be of great help!
thanks,
Shrini
|
|
|
|
|
you need to trap the wm_char type messages to track what the user types and have a look-up list of hot words or word parts ... when you find a match you can create an edit box (drop-list,tooltip window,whatever) at the appropriate place on the screen and display the list of possible matches for selection
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
How can I change the status of my ICQ from
another app, e.g. like "ICQ Control Center"
or "GameSpy" do?
Furthermore I'd like to set a custom message into
the Status
does anyone know a solution?
thanks in advance
|
|
|
|
|
speaking from the top of my head i would imagine they had figured out what message to transmit to the ICQ central servers to make it update its status ... you could packet-snoop your tcp/ip connection to see what it sends or i guess you could ask for the developer docs (if they are available)
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hello,
I'm new to this programming stuff and am having a problem with a SDI. I have created a program to append multiple text files into one. Everything works great except I can’t seem to display the text when I open a text file. I can open the text file and store the text from that file into a CString member variable. When I keep opening files my program keeps adding the text to the same member variable.. Then when I chose to write the contents of the variable to a text file every thing works fine.. This all works great but when I open the files and store them into the variable I don’t see the text on the screen in my program.. Like I said I'm new to this and its probably something dumb..
Any help would be appreciated..
THANKS!
Rob Jones
|
|
|
|