|
sorry - but it's not working:
picture
two first - wndTopMost, third - wndTop - still no solution
some code from my control (derived form CEdit):
lista - derived from (CListBox):
lista.Create( WS_CHILD|WS_VISIBLE|LBS_STANDARD|WS_HSCROLL|LBS_NOTIFY, CRect( rect.left, rect.bottom, rect.right,rect.bottom+100), parentWindow, IDC_LISTBOX );<br />
lista.SetWindowPos( &CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);<br />
|
|
|
|
|
Hi,
Did you find any solution for this finally ? I am having the same problem now.
Thanks...
|
|
|
|
|
Check the tab-order (Strg+D) in the resource view of VS, or change the order in the rc-dile
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi!
Let me describe what I have and then I'll explain my problem: I have a SDI application which has a CFormView. In this CFormView I have several CDialog derived classes defined as child windows. In one of these CDialog I have a CView derived child window (a CHtmlEditView to be accurate).
The problem is that whenever this view has focus my menus (through CCmdUI* pCmdUI) do not get updated anymore... Ideally, I would like the formview to be in charge of the menu update. After all it's only incidental that the chid window is a view...
I suspect I need to have a dab at CCreateContext... but my view (which is part of a control I have not programmed although I have the source code - it's from here and I'd rather not change the code so I can use the future updates) has been create by Create and not CreateView.
So here are my questions:
a) can I ask that a view not to mess up with the CCmdUI* pCmdUI and let a parent view deal with it?
b) if a) not possible, can I assign a CCreateContext to a view after its creation?
c) if a ) and b) are not possible, can someone pay me a round of drinks so I can forget my dreams of good design and encapsulation?
Thanks in advance
|
|
|
|
|
Hello friends
I want to read the Mobile & Other contact numbers from Outlook Expess
I am able to read Name,NickName & Email address but not any any contect number if anyone having idea Plz help me
Thank you
|
|
|
|
|
Member 3926100 wrote: I am able to read Name,NickName & Email address...
How?
Member 3926100 wrote: ...but not any any contect number
Are you handling that field any differently?
How are you verifying that it is indeed wrong?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All,
I am Win32 C++ Programmer I Never Work on Threading Concept and I Don't Know How Can I Use Threads In My Program? Actually My Program Load Images and It Takes Long Time In Loading. So I Want To Perform This Work on a Separate Thread and Continue My Remain Task.
Thanks
Avinash
|
|
|
|
|
What about documentation [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Avnash001 wrote: Actually My Program Load Images and It Takes Long Time In Loading. So I Want To Perform This Work on a Separate Thread and Continue My Remain Task.
While the additional (worker) threads will allow your UI to remain responsive, it will do nothing for the loading of images (assuming a uniprocessor machine).
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
I got this old Fortran exe and I have to embed in in C++. After starting it needs two filenames entered by the user. I did this by putting the filenames in files, attaching handles to them, making a Pipe and attaching it to the child process, then doing ReadFile and WriteFile to the pipe, as shown in MSDN.
Anyway, it gets the strings holding the filenames. I have to append \n else Fortran won't accept it. The Fortran people advised me to try with \r before \n, it seems to grab that too. C++ can append a \0 if I let it, I tried that too.
However, when it takes the first string and tries to open the file, it can't do it and it returns an error. (It returns the error tidily to my C++ process, so it can't be that bad.)
If I run it directly from the command line, as the original author did, it all works fine with the same files. So there must be something wrong with the way I pass my strings.
Unfortunately I can see into the Fortran code but I can't get at it to see what the problem is. We have some old Fortran compilers lying about, but they won't even compile it. The original came from Linux, can that have something to do with it? The users have real problems if they use a Windows editor, it doesn't like Windows carriage returns, they say. But I run it from the command line and it reads all kinds of other files I generated with C++.
There must be someone out there who has done this before?
-------------
Bibo ergo sum
|
|
|
|
|
If it runs OK from the command-line, why don't you pass in the filenames on the command-line when you call CreateProcess() ?
|
|
|
|
|
It runs fine if I type in first "fortran.exe 1>test.out 2>test.log", then the two filenames "input.dat" and "test", both followed by CR. The Fortran.exe is waiting for two inputs on UNIT=5. My problem was to embed all this in my real-time stuff, so it gets called without the user realising. As far as I know that bit works, it does continue after it is fooled into believing it has 2 keyboard inputs. It just doesn't like the inputs.
Did I go to all that trouble when there was an easier way of doing it? I couldn't even get a batch file to do it.
-------------
Bibo ergo sum
|
|
|
|
|
Oh, I didn't realise the fortran.exe program gets the input for the two filenames.
|
|
|
|
|
Hi,
have you tried passing the Fortran exe filenames ending on \r (i.e. without any \n)?
can you determine whether it is the first or the second file it fails to open? I suspect it
understands only one line terminator, and the other one (if you use \r AND \n) is left unrecognized
in the other filename.
|
|
|
|
|
So many answers, such kind people... This is what I came for.
Anyway, yes, I tried just \r but these were not recognised as strings i.e. IOSTAT was not 0.
READ(5,'(A)',IOSTAT=IOS) FILEN
IF ( IOS .NE. 0 ) STOP 'MUST PROVIDE A FILE NAME'
READ(5,'(A)',IOSTAT=IOS) FLBASE
IF ( IOS .NE. 0 ) STOP 'MUST PROVIDE A ROOT FILE NAME' *** it complained here
Now, with \n or with \r\n it takes the strings and continues. It is the first file it fails to open. I wonder why it complains at the second input and not at the first.
Maybe I should input both in the same string... You may have something there with the line terminators... Shall try that.
-------------
Bibo ergo sum
|
|
|
|
|
|
I tried to look at the error code but it is a little smiley in my command window. I have to find out how to format Fortran to write in hex, oh dear.
-------------
Bibo ergo sum
|
|
|
|
|
Hi,
I would try "filename1\rfilename2\r" as a single string; I suspect \r is the right separator
for Fortran, NULL is needed on the sender side, and an extra NULL in between the filenames
ends up in FLBASE[1].
If the final NULL is confusing something else later on, there are ways to send a string without
a terminating NULL too.
A final thought:
I understand you can no longer compile the full Fortran app.
If your tests fail to show the way, you could write just a small Fortran program that tests
the communication and shows all the characters that actually get read into FILEN and FLBASE.
|
|
|
|
|
No, putting them in one string didn't work, it really wants two, with \n. It doesn't seem to care about C++'s \0. Does it read them out of the pipe in the same order as I put them in? I tried both ways but it didn't work either.
That is a good idea with the little test program. I have just written my first Fortran code in 20 years. Ugh, they call that a debugger? I shall now try and run that from C++. Progress report to follow...
-------------
Bibo ergo sum
|
|
|
|
|
What happened? When I call my little ftest.exe from the debugger or from the command window it works, I have to enter the two strings by hand. I can see that it has filled the input strings up to 80 chars, but still manages to open the file.
When I call it from C++ it fills the strings up to 80 chars, but can't open the file. I tried terminating with \n, with \r\n, and with \r\n\0, it all made no difference.
There must be something else. This is very strange.
READ(5,'(A)',IOSTAT=IOS) FILEN
It must be the '(A)'
-------------
Bibo ergo sum
modified on Tuesday, December 9, 2008 8:22 AM
|
|
|
|
|
Hi,
AFAIK '(A)' just means "take any text"
I suggest you:
- make sure your debugging stuff visualizes all special chars including space, NULL, CR, LF
- display the status of both openfile operations, I mean the actual value so you can google it
(a >0 test is not sufficient)
- try the Fortran test app manually with different paths
- show us all the relevant Fortran code
|
|
|
|
|
This is the entire code:
PROGRAM FTEST
IMPLICIT NONE
C
INTEGER IOS
CHARACTER*80 FILEN, FLBASE
C
C
CONTINUE
READ(5,'(A)',IOSTAT=IOS) FILEN
IF ( IOS .NE. 0 ) STOP 'MUST PROVIDE A FILE NAME'
WRITE (6) 'FILEN = *', FILEN, '*'
READ(5,'(A)',IOSTAT=IOS) FLBASE
IF ( IOS .NE. 0 ) STOP 'MUST PROVIDE A ROOT FILE NAME'
WRITE (6) 'FLBASE = *', FLBASE, '*'
OPEN(17,FILE=FILEN,FORM='FORMATTED',STATUS='OLD',
$ READONLY,IOSTAT=IOS)
IF ( IOS .NE. 0 ) THEN
WRITE (6, FMT=*) 'ERROR NO INPUT FILE ', IOS
ELSE
WRITE (6) 'OPENED INPUT FILE OK'
ENDIF
C
CONTINUE
END
-------------
Bibo ergo sum
modified on Tuesday, December 9, 2008 8:46 AM
|
|
|
|
|
OK, now
1. what is the result opening the first file? is it ERROR ... or OK on first file?
2. where is the opening of the second file? and what is its result?
|
|
|
|
|
It gives me an IOS=2 on the first file. I will worry about the second string another day, it gets used to build some complicated output filenames.
-------------
Bibo ergo sum
|
|
|
|
|