|
Thanks for links.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: file_size = in_file.seekg(-1, ios_base::end).tellg();
should be
file_size = in_file.seekg(0, ios_base::end).tellg();
BTW you may also use GetFileSize [^].
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
|
|
|
|
|
Thanks, so my attempt is not bad.
Is that GetFileName is standard C++. I'm confusing with those.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: Is that GetFileName is standard C++. I'm confusing with those.
Nope. It is provided by Win32 API . If you just need to avoid MFC that's is fine, on the other hand, if you need to be stuck with C++ standard, then use ifstream .
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
|
|
|
|
|
Since I start to learn C++, confusing with this. Is that best way to work with standard C++? Sometimes I feel that use of MFC easy than standard C++, and other way too. Appreciate your explanation on it.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Using C++ standard you write code that will execute also on different platforms (for instance Linux ). On the other hand, if you need to exploit Windows not-portable functionalities (like the GUI components1) the you have to use Win32 API or MFC . GUI development with MFC is usually simpler.
(1) There are exceptions: for instance QT [^] is a framework that enable you to write portable GUI code.
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
|
|
|
|
|
Ok, as I said now I have mixture of them. If I want to learn standard C++ from where I should begin.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
What about "The C++ Programming Language" [^] book of Stroustrup?
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
|
|
|
|
|
Thanks a lot.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi all,
Is there any option to change the number of rows and cols dynamically in a flexgrid??
Thanks,
Regards,
Sunil Kumar
|
|
|
|
|
I don't know in flexgrid, but in Listctrl I made it by deleting all and redrawing the control with the new number of elements.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Changes Rows and Cols property.
|
|
|
|
|
u can use the functions SetRows and SetCols to set the rows and cols dynamically...
|
|
|
|
|
I am learning to use pageheap.
I created a MFC App(pageheaptestdlg.exe) with memory corruptiong bug and compiled it in release mode.
I enabled pageheap by gflags /p /enable pageheaptestdlg /full
Then run debugger ntsd -g -x pageheaptestdlg.
It has something like:
===========================================================
VERIFIER STOP 00000008: pid 0xDF8: corrupted suffix pattern
015B1000 : Heap handle
01682FF8 : Heap block
00000005 : Block size
00000000 :
===========================================================
However it is not the same for console app.
I created a Win32 Console Application with memory corruption bug and compiled it in release mode.
I enabled pageheap by gflags /p /enable pageheaptest /full
Then run debugger ntsd -g -x pageheaptest.
There is no message regarding the corrupted suffix pattern. Why?
Source code:
#include "stdafx.h"
int main(int argc, char* argv[])
{
int len = 5;
char *a = new char[len];
a[len] = 6;
delete [] a;
return 0;
}
|
|
|
|
|
Hello and good day. I have an application which writes writes an image in a picture box and does processing in it about every 200ms. Now, I need to show the image being written into another application's picture box. I'm currently looking for ways to do this and currently I'm thinking of using clipboard. I want to know if there are better ways of doing this. Looking for any suggestions/solutions regarding this.
Thank you in advance.
|
|
|
|
|
How you planning to synchronize two applications??
|
|
|
|
|
i was just thinking of using mutex if I am going to implement the clipboard solution.
|
|
|
|
|
I feel clipboard would be used by many applications so avoid it.
You can use memory mapped files instead. It all depends on your requirements but it just a suggestion.
|
|
|
|
|
SandipG wrote: I feel clipboard would be used by many applications so avoid it.
yes, that might cause problems later on.
SandipG wrote: You can use memory mapped files instead. It all depends on your requirements but it just a suggestion.
thank you for the suggestion. I'll check this one out. though from what I've read, this might be slower than a standard file I/O. The image in the application is refreshed per 200ms. But I'll try to make some dummy application and check if it works. Again, thanks a lot.
|
|
|
|
|
one more suggestion.
You can have a common DLL and have one static variable of (HBITMAP/CBitmap/Image/Bitmap) may be you have to use pixel data in the form of byte array or someting similar and use the dll in both the applications.
I hope it makes sense.
modified on Monday, June 23, 2008 2:46 AM
|
|
|
|
|
yes, I somehow get the point. But does that work? I mean if I apply the DLL in those two applications, although they use the same DLL, will the static variable that both the applications pointing to will be the same? If you can give me some sort of reference on this implementation it will be a great help.
Thank you very much.
already found some good samples here. No need to answer the questions. Thanks again
modified on Friday, May 30, 2008 2:29 AM
|
|
|
|
|
You can also use shared data segment in dll.
|
|
|
|
|
i am already install borland visi broker on Windows Vista. But i have a problem when i want compile the code. this is the command that i used to compile.
prompt> C: prompt> cd vbroker\examples\basic\bank_agent prompt> nmake -f Makefile.cpp
then, error message out "nmake is not recognized as an internal or external command,operable program or batch program".
i checked in ..\VisiBroker\bin, i not found nmake file.
i already set environment variable.
VBROKER_ADM=C:/Borland/VisiBroker/var/vbroker/adm
BES_LIC_DIR=C:/Borland/VisiBroker/var
BES_LIC_DEFAULT_DIR=C:/Borland/VisiBroker/license
OSAGENT_PORT=14000
VBROKERDIR=C:\Borland\VisiBroker
please, i am really need help.
|
|
|
|
|
hi
I am creating an application(vc++) which is supposed to find the similarity between two programs written in c++ (at SYNTAX and SEMANTICS).
in SYNTAX :i used the tokenize method and save it in strings..thats works
but the question is here in the SEMANTICS:
how can i trace the semantics in the two programs...
i couldnt find anything practical about it.. this is the last step so pleeease help me with this... iam stuck at this point for along time
pleeease..any kind of help will be appriciated
thank u all
|
|
|
|
|
I am not sure if comparing semantics of two prgramns is easy, if possible at all. The main reason is that same logic can be implemented in completely different ways. A very simple example would be lets say a progmam do nothing but multiply two numbers. I can implement it simply as c = a * b; or I can add 'a' 'b' times i.e. a + a +... b times. How would you detect such similarities?
Saurabh
|
|
|
|