|
You can't use Create for static splitters, you need to use CreateStatic
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I am writing an WYSISWYG HTML editor and was wondering were I should start, a RichEditView capturing the saving and convert it or does someone have a better idea?
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
You could probably use the RichEdit however using the MSHTML editor would be easier and have more fetures by default. I think this is the same COM object that outlook express uses. I'm writting a editor as well, however i've recently decided to settle for non-wysiwyg. Notepad, but syntax highlighting. quick loads on a 266 are everything to me
Check out the following url for more details.
http://msdn.microsoft.com/workshop/browser/editing/activeeditor.asp?frame=true
hope i typed that right
ciao
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
|
James R. Twine wrote:
I am not sure what "WYSISWYG" means, but WYSIWYG is "What You See Is What You Get"
I meant WYSIWYG
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
Matt Newman wrote:
I meant WYSIWYG
In that case, the DHTML Editing Component SDK is just what you are looking for: I have used it before to implement a few HTML editors.
Peace!
-=- James.
|
|
|
|
|
Thanks. This is a big help!
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
I want to know how it works with multithreading. When I call AfxBeginThread or _beginthread and the function that I have putted as a parameter in one of them. Is one of those functions calling the function that is specified in AfxBeginThread or _beginthread called and then return to next code after calling AfxBeg.. or _beginth.. while the function parameter still in use? I can't explain but look here:
void Afunction()
{
AfxBeginThread(ThreadFunc, ...)
// Now try do something else
RasDial(); // Perhaps a bad example but..
}
Now what I tried to explain: When now AfxBeginthread is called and the ThreadFunc is called, imagine that it's a very big function that checking the harddrive for mp3 files and then rename all of them and then try to move them to another harddrive, is this procedure running at the same time that RasDial is called or whatever code anyway that comes after AfxBeginThread??
Where an I read about multithreading??
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Well, a thread is like a microprogram that runs separately from the main thread (though accessing the same global variables). From the point of view of Afunction , AfxBeginThread(ThreadFunc, ...) starts another thread and returns immediately (i.e. whitout waiting for ThreadFunc to complete), going then to RasDial . So, from the user's (and the programmer's) perspective both routines (TreadFunc and RasDial ) are executed in parallel --that's the whole point of multithreading.
The issue of different threads accessing global variables simultaneously can cause a lot of problems that you must work hard in order to prevent. When programming in a single-threaded environment, you implicitly assume that your variables remain unchanged while you're not dealing whith them --now this is no longer true, and a rich theory about simultaneous access to shared resources has been devised to help you design error-free multithreaded programs. This theory includes concepts as synchronization (waiting for completion of another thread's piece of code), exclusive access (methods to reclaim and grant access to some resource to one thread at a time) and more.
You can find several tutorials about multithreading on the net, just spend some minutes with your search engine to locate lots of them. The concepts underlying multithreading are rather platform-independent, so a good tutorial on multithreading in, say, Java will be worth reading tough you're targeting MFC. As a starting point, here's MSDN article Multithreading Tasks.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Once upon a time I was a true ProgrammersHeaven.com visitor and member. But when I ran over CodeProject.com my life changed!!
Please let CodeProject.com be alive for ever!!
Every message that I've sent to this message board has always been answerd, so what?
Of course it will!?
Yeah, but the answer is always an answer that every beginner/advance or what ever programmer can understand!!
THANK YOU CodeProject.com and all VERY good buddies here on the message board!!!!
I realy had to tell ya this, dude!
Because I mean every word! Not even CodeGuru takes the first place!!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
|
LOL
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
ok ... i have a piece of code that does the following:
<br />
_stprintf(szValue,_T("%.2f"),pAFlows[idx].price);<br />
pApp->DoCommas(szValue);<br />
m_grid.QuickSetText(7,idx,szValue);<br />
the DoCommas() function simply puts commas in the number string to separate thousands etc
the code works in debug builds but in release builds no decimals show up and i am totally baffled
a typical value would be 137.3 and the string buffer is long enough
any clues???
---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
|
|
|
|
|
If you could post the code for DoCommas that'd be of invaluable help.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
hi again
here is the code for DoCommas() but as i said it works in debug build just not release build ... or at least not all release builds on all machines
<br />
bool CBfecApp::DoCommas (_TCHAR *szNumber) <br />
{<br />
int idx;<br />
int nIntegerLen;<br />
int commas,leading;<br />
_TCHAR *szP = NULL;<br />
_TCHAR szDecimals[10];<br />
_TCHAR szInteger[30];<br />
<br />
<br />
if (szNumber[0] == '-')<br />
szNumber++;<br />
<br />
_tcscpy(szInteger,szNumber);<br />
<br />
if ((szP = _tcschr(szInteger,'.')) != NULL){<br />
_tcscpy(szDecimals,szP);<br />
*szP = (int)0;<br />
}<br />
<br />
nIntegerLen = _tcslen(szInteger);<br />
if (nIntegerLen < 4)<br />
return true;<br />
<br />
commas = (nIntegerLen - 1) / 3;<br />
leading = nIntegerLen - (commas * 3);<br />
<br />
szNumber[leading] = (int)0;<br />
<br />
for (idx = 0; idx < commas; idx++){<br />
_tcscat(szNumber,_T(","));<br />
_tcsncat(szNumber,szInteger + leading,3);<br />
leading += 3;<br />
}<br />
<br />
if (szP != NULL)<br />
_tcscat(szNumber,szDecimals);<br />
<br />
return true;<br />
}<br />
---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
|
|
|
|
|
Uhmmm... Could you make sure that macros UNICODE and _UNICODE are both correctly defined (if doing a Unicode release)?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
they are
---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
|
|
|
|
|
Try using TCHAR and not _TCHAR
- God bless the World
|
|
|
|
|
I tried this code in a test program, it works just fine in release, debug, and UNICODE.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
is there some wierd setting on machines that causes data to come from sql7 without decimals sometimes?
---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
|
|
|
|
|
Well if it's possible you might want to run this test: comment the DoCommas line out and check if still some numbers appear without decimals. This may shed some light.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
i tried and it doesnt
---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
|
|
|
|
|
Hey Lauren, we're not having luck today
It's really beating me. Maybe you can try different tests to isolate the guilty part of the code. Some ideas:- Comment out the first line and insert something fixed like
_tcscpy(szValue,_T("137.3"))
- Maybe the grid (which looks like the Dundas grid, right?) is doing some extra formatting to the text: to rule this out, you can output the results after
DoCommas with, say, a line like MessageBox(NULL,szValue,_T(""),MB_OK) Apart from this, I'm afraid I'm running out of ideas. Good luck with your bug hunting!
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Two things to try:
1. Zero-fill you char arrays before using them. If this fixes it then you're overrunning an array or doing something equally bad with the arrays.
2. Use GetNumberFormat() to insert the commas.
--Mike--
My really out-of-date homepage
He who laughs last, didn't get the punchline and is just laughing so he won't look silly.
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Howdy,
It's me again, I have never used EnumWindows nor have I used the EnumWindowsProc callback function. I have have been reading the docs on MSDN but I don't fully understand how I implement this. I had posted a question earlier this week regarding WM_GETTEXT. I am using Spy++ to find a window that I want to Get text from(for testing) but it will not pull the info from the window. I thought that if I could use the enum functions to pull the actual name of the window and store that into hWnd I could use WM_GETTEXT the correct way.
Does anyone have a sample of code where they enum through windows until they get the window they want?
Thanks,
Rob
|
|
|
|