|
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
|
|
|
|
|
Is there a UI library whose grid control supports using regular expression to control it input.
BCG? Xtreme Toolkit? Prof-UIS?
|
|
|
|
|
I dont know much about it but may be you can have look at Stingray Objecttive grid. It might serve your purpose.
|
|
|
|
|
Becuase I need to change evrything to unicode..
Our Philosophy, Mohammed Baqir Al Sadr
|
|
|
|
|
Assuming you're using Visual Studio you can use regular expressions to do this using the find and replace dialog.
Put the following in the "Find what" box
{:q}
and the following in the "Replace with" box
_T(\1)
Remember to check the "use regular expressions" box and the away you go
Personally I'd check the first one or two replacements before doing a replace all in all documents, but it depends how brave you are feeling
Edit: these are the curly brackets, just in case it's not clear on your screen
Graham
Librarians rule, Ook!
|
|
|
|
|
Thank you very much Graham...if one day you have a problem, please give me the chance to know it and try to pay my debt..
Our Philosophy, Mohammed Baqir Al Sadr
|
|
|
|
|
Do you really hard-coded 1001 strings?
Using a Regex tool you may automate the task.
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
|
|
|
|
|
he hard-coded 1001 "xxx" strings ... wonder what kind of application it really is.
This signature was proudly tested on animals.
|
|
|
|
|
|
not even one word, just two letters!:
VI
|
|
|
|
|
the application is a chess application. consisting of a desktop client, a server application.
it is 3 years old now and it dates back to my 4th university year.
now i am trying to make radical changes to the code and also the interface so i can be able to deploy it.
from the one hand those refrences are because of neglectiona and lack of experience (i could have use the project ressources and use LoadString) since it was my first big app in my life..
from another hand, really it was unavoidably in many cases not to hardcode some strings.. in fact just for a small example, there was a parsing code that parses a chess PGN file, and looks for keyword, and tags,etc, then it takes the moves body and decrypt it as well by matching other keywords and entering recursively inside the recursive annotations..
finally there have been and even now still is a habit such I never for example use an enum, or an #define something..
I always use string even for my context data
for example if I have a base Session class.. then I put a type as member, then you will find something like :
CSession* pSession=??
if pSession->getType()=="machine Vs machine";
CMachineVsMachineSession* pMachineBattleSession=(CMachineVsMachineSession*) pSession;
pMachineBattleSession->relayUserPieceMoveAsAnnotationMove(...
that's becuase I have plenty of things and srtructures representinf plies, piece types, castling, session type with server, user account type,
so that I decided and stiil use the String, so that I code fast, because my memory remembers by text not by the enum keyword I would have put instead...
My shif to unicode was because of many things :
I want to nable internationalization of the app. at least I want to be able to let arab chess players be able to send arabic characters in chat during chess play.
also the look of the app, differes when you change charSet to Unicode (something I do'nt understand)(for example the dialogs andbuttons)
also there was an unavoidable dependence on Unicode thirdparty libraries. liking to them with MBRS creates linking pbms.
Fianlly I recently have had a big big problem with MFC extension DLL :
as I was separating some UIs ibnto extension DLL, some drag and drop featuers and focus pbms happens when they are hosted in the MFC client app which MBRS. this was explained, but after resolving many pbm, it lokks that evrything works fine for me if I integrate that DLL inside a Unicode simple app.
I hope I explained to you the situatiuon and that now I look less incompetent.
Our Philosophy, Mohammed Baqir Al Sadr
|
|
|
|
|
Here is what MSDN says about this:
" If the string is found, this method selects the string in the list box and copies it to the edit control."
My code finds the string but does not do anything to the Form view edit part of the combo box dialog.
What did I missed?
CString strText;
CComboBox * pBoxOne;
pBoxOne = ( CComboBox *) GetDlgItem(IDC_COMBO1);
int i = pBoxOne->SelectString(-1,"21"); // OK
pBoxOne->GetLBText( i, strText); // OK
m_strBand = strText;
Using VC 6.0
Thanks for your help.
Vaclav
|
|
|
|