|
The most likely reason for the exception is that the window isn't created.
Call SetWindowText() from the OnInitDialog function.
|
|
|
|
|
yes my guess is exception maybe he dont have window
whitesky
|
|
|
|
|
could u pls paste your code here ?
Loka Samastha Sukhino Bhavanthu..!!!
( May all beings be happy and free )
|
|
|
|
|
|
can visual c++ be used for web applications
tyrohansen
|
|
|
|
|
Yes, You can use Visual C++ for developing web applications. You can write applications that run in support of a web server and process web requests and responses by unsing ISAPI feature.
ISAPI Extension Wizrad ( Developer Studion Project Wizard ) will help you develop such an application.
Benoy Bose
|
|
|
|
|
Hi Guys
I want to change the caption of one "dialog based" project in visual C++ 6.
Please help me if you know the related instruction.
Best regards
Mahdi
|
|
|
|
|
|
You can change it manually before compiling the project.
Open your project in VC 6.0. Display the workspace using View --> Workspace command. Go to Resource View tab, find your dialog resouce and double-click on it. The dialog editor will be started. Then click on the dialog’s caption. Show the properties tool dialog using View --> Properties command. Edit the caption in this tool. Then recompile the project.
If you need to change the caption programmatically, you can use SetWindowText function called for your dialog class.
|
|
|
|
|
AfxGetApp()->GetMainWnd()->SetWindowText("Your Caption");
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Hi freinds,
Now I have following questions
1) How to enumerate user's login names from active directory?
2) How to enumerate groups from active directory?
3) Is there any way to find out user-group association from active directory?
Can u pleaes guide me for above quests?
-- modified at 4:22 Monday 12th June, 2006
|
|
|
|
|
|
Hi guys
Lets say i have a file with some text in it that the words are seperated with more than one space in between
ex. This___________is_______writen______in____a_file____assume______that__underscores____
are________spaces_____how___can_i___remove____them?
i want to store this in a string but in this form:
This is writen in a file assume that underscores are spaces how can i remove them?
any ideas i tried some things but nothing works
thank u in advance
|
|
|
|
|
In MFC, I think you can read the file in line-by-line manner using CStdioFile class, and then reduce the number of spaces using multiple calls to Replace member of CString class:
while(s.Replace("__", "_") != 0);
Next, you can write strings to a new file. If you need to store them in the same file, then remove the old file and rename the new one.
-- modified at 4:05 Monday 12th June, 2006
|
|
|
|
|
Thanks for the reply Viorel
I'm not using MFC so is it possible to use the functions that u mention.
also using
while(s.Replace(" ", " ") != 0);//i'm going to loose all spaces i need to leave only one.
thanks again Viorel
|
|
|
|
|
|
Hey Sarath thanks for the reply
can i ask u a couple of questions on strtok?
the link u gave me has an example of using strtok
char string[] = "A string\tof ,,tokens\nand some more tokens";
char seps[] = " ,\t\n";
char *token;
can i use a string instead of char string[]?
also can i put any number of deliminars in seps?
thanks a lot for the help
|
|
|
|
|
|
use <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcstdlib/html/vclrf_string_basicstringreplace.asp" rel="nofollow">std::string::replace()</a>[<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcstdlib/html/vclrf_string_basicstringreplace.asp" target="_blank" rel="nofollow" title="New Window">^</a>] instead...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
|
If you do not use MFC, you can use STL. You can read the file using a stream object like ifstream , store strings in string object, and use find function to find a sequence consisting of two spaces. Then use find_first_not_of to find the end of sequence, and call erase to remove unneeded sequences.
If you do not use STL, you can use library functions: fgets to get strings, strstr or strchr to find spaces, and so on.
If you need to do this manually, you can open the file in Notepad and use Replace command
antonaras wrote: i'm going to loose all spaces i need to leave only one.
The first parameter of Replace contains two spaces, and the second one -- a single space, so any sequence of more then one spaces will be replaced with only one (maybe not so fast as possible). For convenience, I modified the sample using underscores.
|
|
|
|
|
Thanks Viorel your answer is very clear and helpful
appriciate all the help
|
|
|
|
|
Viorel. wrote: while(s.Replace("__", "_") != 0);
The loop is not required.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I think the loop is required. Otherwise, in case of three consecutive spaces, only first two ones will be replaced with one space, and we will obtain two spaces in the result. Therefore we have to repeat the replace operation.
It is possible to avoid loop and improve performance using other approaches.
|
|
|
|
|
Viorel. wrote: I think the loop is required.
You're right. I spoke prematurely. Sorry about that.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|