|
I don't do MDI or form views, so perhaps this suggestion may be incorrect, but in general I assume it is probably better to simply override the virtual OnOK (for Enter) and OnCancel (for Esc) methods... and modify each to not call the base methods (which dismiss the dialog).
An easy way to do this with normal dialogs (without doing any real coding) is to put temporary IDOK and IDCANCEL buttons on your dialog... then double click each to add handlers via classwizard... then after that delete the two buttons from the dialog template... and finally comment out the // CDialog::OnOK(); or // CDialog::OnCancel(); calls.
Regards, Larry Antram
Stardust Software
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones."
-- Albert Einstein
|
|
|
|
|
can u tell me about the these things?
getting "System Name" and "User name" in windows xp
|
|
|
|
|
GetComputerName and GetUserName API functions.
Jason Henderson quasi-homepage articles "Like it or not, I'm right!"
|
|
|
|
|
I am installing VS.NET, however my stupid CD-ROM has trouble with Disc 4.. for some reason it cant read it. Fine, I say, Ill just share a cd-rom on my laptop which reads the disc fine. Okay, so now i get an error on the first disc, which cant find files in a placve where the file doenst exist in the first place.
anyways my question is...
Has anyone had problems installing VS .NET from a shared CD-ROM over a network? Help? Suggestions?
Ryan Baillargeon
Software Specialist
Fuel Cell Technologies Inc.
|
|
|
|
|
Ryan B. wrote:
Has anyone had problems installing VS .NET from a shared CD-ROM over a network? Help? Suggestions?
There is help file in one of those CD.I think it talked about it.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
I am not sure if this will help. I do not know about installing from a shred CD-ROM drive.
However, when I was installing VS .Net my computer would freeze on CD 4. I could never figure out why. I ended up re-installing Win2K and then it all worked. I am not suggesting that you reinstall your OS. But you may want to consider the option that your CD ROM drive is reading the CD OK, and that the problem is elsewhere. After all it did read the first 3 CDs.
Hope I have not added more confusion to the issue.
|
|
|
|
|
Yeah Re-installing is not an option i want to persue..
it took me a while to get my box configured like it is now.. very sweet, lean and mean.
Its weird, my CD-ROM wont read the disc, just tells me its not in the drive. my laptop, and other computers here (at work) read it fine.
The Readme on the first installation disc has a solution for a network install, it requires copying all the files to a directory and sharing that directory, as well as editing some path variables in an .ini file.
I figure this solution will work for me..
I have the extra gb's to spare so Im going for it.. thanks for all your help guys...
Ryan Baillargeon
Software Specialist
Fuel Cell Technologies Inc.
|
|
|
|
|
I have two questions for you guys, is there any way to run a console application in the background (no annoying dos box)? and How can I get the full path and filename that the program was executed from to use in said program, for example if I wanted to include the program I wrote in some file operation that was included within itself? Sorry if the second question is somewhat confusing, but I couldn't think of a better way to say it.
|
|
|
|
|
Try this:
int main(int argc, char* argv[])
{
MSG msg;
HWND h=NULL;
char szBuff[500];
GetConsoleTitle(szBuff, 500);
SetConsoleTitle("SomethingYouCannotImagine");
h=FindWindow(NULL, "SomethingYouCannotImagine");
SetConsoleTitle(szBuff);
if (h)
{
ShowWindow(h, SW_HIDE);
MessageBox(NULL, "okk", "OK", MB_OK);
ShowWindow(h, SW_SHOW);
SetConsoleTitle("Title");
HINSTANCE hInst=(HINSTANCE)GetWindowLong(h, GWL_HINSTANCE);
GetModuleFileName(hInst, szBuff, 500);
for (int i=strlen(szBuff); *(szBuff+i)!='\\'; i--);
*(szBuff+i)='\0';
MessageBox(NULL, szBuff, "OK", MB_OK);
}
return 0;
}
rechi
|
|
|
|
|
sounds like a virus your writing
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
You still want to get rid of that console window.
Check out Q126628 or Q150956 over at MS's Knowledge Base.
|
|
|
|
|
|
Hi!
I have following question:
I have a handle to a Window (HWND), and having only this information I want to know to what thread it belongs to (name of the thread).
One example in Spy++ :
If you click on a windowhandle you can see to which thread it belongs to (name and ID)
regards
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Thanks, I know about this function
But I want to know from which module the window was called. (name of the module)
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
I have a dialog box with an edit control. On InitDialog i try to SetWindowText for the edit and nothing happens.
What's this?
rechi
|
|
|
|
|
|
Here's the code:
<br />
GetDlgItem(IDC_EDIT_1)->SetWindowText("some text");
rechi
|
|
|
|
|
|
Assign a variable to that CEdit Control and then add this code on Intialupdate()
your_variable = "your words";
UpdateData(FALSE);
Good Luck.
|
|
|
|
|
I've tried in InitDialog with no result.
rechi
|
|
|
|
|
I had two classes on the same dialog and i've been using the wrong one.
Sorry!
rechi
|
|
|
|
|
I am writing an app that uses the CAsyncSocket in order to talk to a telnet session and automated some tasks.
Here is the problem.
If I isolate the main functions of a connection into its seperate parts, and run those individually from a button, everything is fine, however, if they are chained within a single function, it fails. ie) connect, send password, run a router command.
The socket class appears to be running in its own thread. I have overridden all of the relevent virtual functions (ie OnConnect, OnReceive, etc. - In the socket class) but I am unable and unsure how to get a message to the dialog as to when the receive is finished. I have tried setting flags and just looping in the dialog code, but the app just hangs.
Help?
Thanks
|
|
|
|
|
sorry no idea.
a) try some verbose debugging, see if packages are as expected (remember TCP/IP packets can be fragmented or concenated when transfared).
b) do everything within one thread context (here I mean GUI and your socket class). If not, CAsyncSockets will suprise you with fine asserts (in Debug version). *g*
c) CAsyncSocket has a design weakness with DNS, you need to use IPs not hostnames. If you don't use IPs, you are not "async" - I mean the name resolution might block the call for a specific time.
Hope it helps.
|
|
|
|