|
Consider a character if you want to search for one element and a string otherwise.
Find('@'); // 0 is default
Find("string");
Kuphryn
|
|
|
|
|
Hi I am a budding C++ programmer with a question.
I have declared and initialized a 2D array in the header file of my class as such:
char *styles[][2] =
{
/*HTML Start and end tags for styles*/
{"", ""},
{"<b>", "</b>"},
{"<i>", "</i>"},
{"<u>", "</u>"},
{"<!-- ", " -->"},
{"<p>\n", ""},
{"<br>\n",""},
{"", ""},
{"<h1>", "</h1>"},
{"<h2>", "</h2>"},
{"<h3>", "</h3>"},
{"<h4>", "</h4>"},
{"<h5>", "</h5>"},
{"<h6>", "</h6>"}
};
Here are the error messages I get:
error C2059: syntax error : '{'
error C2334: unexpected token(s) preceding '{'; skipping apparent function body
What gives? This is standard syntax is it not? TIA.
|
|
|
|
|
I am moving the initialization to the .cpp file. Hang on...
|
|
|
|
|
plz plz plz help me!!!
i need to change the caption of my check boxes , and tht text for the caption has to come frm a function, that is , it is a character array of an object ..so the caption is different, each time the program is run, according to the object ...stuck on this for hours...HALP!!or my univeristy might become another MIT (as far as suicides r concerned)
sarz
|
|
|
|
|
If you are using MFC, call the SetWindowText() method. It takes a single parameter which is the text to display. If you are using the Win32 API directly, call the SetWindowText() function: the first parameter is the HWND of the control, and the second is the text.
e.g. m_btnCheck.SetWindowText( _T("My checkbox") );
or SetWindowText( hwnd, _T("My checkbox") );
Dave
|
|
|
|
|
|
I have a MFC document that can open 2 files types, but save only one.
Is it possible to make it use a different filter in the save dialog,
since seeing the other file type there would confuse people...
Doesn't look so to me, but I'm hoping someone has done something like this before
|
|
|
|
|
Override the CDocument::DoSave() method, whose default implementation is found in MFC\doccore.cpp. That's where the standard SaveAs dialog box filters are built.
|
|
|
|
|
Thanks, but I don't see that function ever being called.
I am using the Document/View architecture, which seems to call CDocManager::DoPromptFileName() to do that. Any way to do this here?
|
|
|
|
|
Locked Ghost wrote:
Thanks, but I don't see that function ever being called.
Override the method. Put a breakpoint. You'll see this method is called whenever you want to save your document.
|
|
|
|
|
Hi.
I would like to is there a way to "reset" a active socket during data transfer without disconnecting it from the server or client? For example, given a socket is connected to www.google.com and is processing incoming data. Now the program wants to stop all data transfer at a given moment without disconnecting from Google.
One reason is time and speed. Stopping data tranfer via disconnection takes time because the program has to then reconnect to the server or client.
Thanks,
Kuphryn
|
|
|
|
|
I need to build a GUI for my main form in Visual C++ .NET beta 2. I can edit my standard dialog box, but I can't edit my main form. Although I can modify my menus.
Please mail me at: boudewijnector@planet.nl
Thank you,
|
|
|
|
|
Hiya quick question. how do I highlight the last item that is entered into the list control and the rest of them un-highlighted every time. I know I have to get a count of the items.
Have tried it but highlights all the items on entry.
thanks
grahamoj.
|
|
|
|
|
|
Hiya have tried that one already. but it highlights all of the items as they are entered..
all i want highlighted is the last one entered each time..
how do i UN-HIGHLIGHT ITEMS AS WELL..THEN I COULD UNHIGHLIGHT ALL THE ITEMS AND JUST SET A HIGHLIGHT TO THE LAST INDEX ENTERED EACH TIME...
THANKS
GRAHAMOJ
|
|
|
|
|
i wanna develope a video chat program using Microsoft NetMeeting SDK.Now it's latest version is 3.0.And it has samples.But i wonder how i can develope a MFC .exe with the SDK.pls help!!!
thanks for your help
|
|
|
|
|
You can use another simple and powerful SDK:
http://www.banasoft.net/AVPhone.htm
|
|
|
|
|
Hi,
how can I create a custom Internet explorer bar that contains my company logo.
|
|
|
|
|
|
Hello,
when I debug my program, the last lines of the debugger output look like this:
RESYSINFO: WndProc: hwnd=0x0FE4, msg = WM_NOTIFY (0x03E9, 0x007EF458)
RESYSINFO: WndProc: hwnd=0x0FE4, msg = WM_NOTIFY (0x03E9, 0x007EF458)
RESYSINFO: WndProc: hwnd=0x0868, msg = WM_NCDESTROY (0x0000, 0x00000000)
RESYSINFO: WndProc: hwnd=0x0868, msg = WM_USER+0x0C02 (0x0000, 0x00000000)
RESYSINFO: WndProc: hwnd=0x0868, msg = WM_USER+0x0C02 (0x0001, 0x00000000)
RESYSINFO: WndProc: hwnd=0x0868, msg = WM_USER+0x0C02 (0x0002, 0x00000000)
RESYSINFO: WndProc: hwnd=0x0FE4, msg = WM_NCDESTROY (0x0000, 0x00000000)
Thread 0xFFE5A5D3 wurde mit Code 32773 (0x8005) beendet.
Das Programm "C:\Programme\DevStudio\MyProjects\ReSysInfo\Debug\ReSysInfo.exe" wurde mit Code 32773 (0x8005) beendet.
But isn't 0 the normal exit code? What does the code 32773 above mean? I didn't find
anything in MSDN...
-Dominik
|
|
|
|
|
There are no standard exit codes for processes, actually. Back in the DOS days, 0 was ok and nonzero was error, but that's not a hard-and-fast rule.
--Mike--
I'm bored... Episode I bored.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Michael Dunn wrote:
Back in the DOS days, 0 was ok and nonzero was error, but that's not a hard-and-fast rule.
Actually, it is. Using only the C or C++ programming languages, what's returned from main is what's used as argument to exit(), which obviously is the return code from the program. This is no Microsoft MS-DOS invention, it's C (and probably also POSIX).
Thread termination codes are in Win32 also defined - GetExitCodeThread returns it, and TerminateThread explicitly sets it. For a thread that terminates by returning to the function that created it (i.e. CreateThread) the exit code is what the thread function returns (again, to CreateThread).
The fact that _beginthread & co are specifying that the thread function returns void can be considered a bug.
|
|
|
|
|
hey guys, ive got a dialog based MFC application im working on. Class Cdraw controls hardware through the serial port, that has to perform X number of tasks in time Y.The program will only finish once all tasks have been completed, so i wanted to make some sort of a manual override button to stop the program (kill the loop) and return control to the dialog window. I believe threads are the best way to do this. I've never used threads before and i dont know how to work them. Does anyone have suggestions to a quick solution, like an easy threads tutorial? I'd like to see example code/projects too.
All i need to do is a user-interface thread to watch one button, and stop everything when it is pressed.
Cheers,
Ayush
|
|
|
|
|
|
Thank you so much!
I assumed user-interface threads dealt with that thing. But i was wrong. That articel is superb.
Cheers!
Ayush
|
|
|
|