|
Im trying to Read the memory from a Game that blocks the ReadProcessMemory function so I ne an Alternative.
|
|
|
|
|
I have placed an WM_ONCHAR message in my view class handled by OnChar().
I would like to be able to call the OnChar() from my main class.
I have tried the "Access View Class from Anywhere" artical, but could not even get the example code to work.
Perhaps I could do as the thread below suggests, "Accessing property pages" (but I don't know what a property page), where data is placed in another class, where the view class could call and obtain it?
What I want to do is to send a character from the serial port (from my main class) to the OnChar() in the view class.
Thanks
John
|
|
|
|
|
Cant you try a PostMessage to the View Object
ViewObject->PostMessage(WM_ONCHAR , ....)
|
|
|
|
|
Thank you for that. That should work, I just don't know how to obtain the ViewObject part.
|
|
|
|
|
CMainFrame* pMainFrmWnd = (CMainFrame*)AfxGetMainWnd();<br />
ASSERT(pMainFrmWnd != NULL);<br />
CYourViewClass* pYourView = NULL;<br />
CWnd* pchildWnd = pMainFrmWnd->GetWindow(GW_CHILD);<br />
ASSERT(pchildWnd->GetSafeHwnd() != NULL);<br />
while(childWnd->GetSafeHwnd() != NULL)<br />
{<br />
ASSERT(childWnd->GetSafeHwnd() != NULL);<br />
if(childWnd->GetRuntimeClass()->m_lpszClassName == "CYourViewClass")<br />
{<br />
pYourView = (CYourViewClass*)childWnd;<br />
break;<br />
}<br />
childWnd = childWnd->GetWindow(GW_HWNDNEXT);<br />
}<br />
ASSERT(pYourView != NULL);
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
Hi
I need some help for fuzzy logic and how
i can implement the fuzzy set in c++ code
.
Any help can help me
Thanx for u.
On Earth nothing impossible,
while your mind running.
Faroqtam
|
|
|
|
|
hi did u implement the fuzzy code ??? i need your help
|
|
|
|
|
Time and again I have wanted to use the Doc View Arcitecutre in my apps , but the simplicity of Dialog apps has prevented me from doing this . Here is a scenario which I think calls for using the Doc View
I need two views objects (v1 and v2) of the same class VT that contains some tabular information (like a giant table of data) . v1 and v2 need to have the same representation but their data sources differ , otherwise UI wise they are exactly the same .
I need the following functionality
1. Individual display for V1 and v2
2. Vertical tiling of V1 and v2
3 Common Print preview functionality for information in v1 and v2 that I guess calls for a new View class VC
4 I do not need a Document class
What path (SDI ? MDI ? ) should i take as both do not provide for a Doc with multiple views .
Need some input
Thanks for your patience .
Engineering is the effort !
|
|
|
|
|
If you click the below link to 'My Articles', I have one I did called 'QuickQuery'. This is an SDI that starts off using a CFormView, but can switch to CListView. It's not the best code in the world, but it switches view types.
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
Really nice article . I might need that functionality . Thank you . Now I can practise my SQL using ur tool !
|
|
|
|
|
|
Hi frnz,
Thanks for ur Response but solution u all gave is for Dialog..but i need to store my data in Database so i need to support SDI...not Dialog.Can u help me in making SDI app into to SystemTray Icon apps...
waiting for ur Earliest reply
|
|
|
|
|
|
I have a property sheet. I use this one here:
http://www.codeproject.com/property/wizardpropertysheet.asp
Within the property sheet are several property pages. Lets
say Im in PropertyPage2. How can I access a value from
PropertyPage1? Im stumped. I know I can save a value to
an ASCII file and then open that in the other propertypage,
but Im looking for a more direct route and cant get anything
to work.
Please, please, any response any one can give me will be
greatly appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
You could hold all values for all pages within a class or struct eg CPropertiesData. If you instantiate this class within the property sheet it will be accessable from all property pages.
When you alter any properties for any page you can then set the appropriate property within the CPropertiesData class.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
And you can read from your CPropertiesData class in each of the OnSetActive method of the property pages and write it back out to the CPropertiesData class in the OnKillActive, in case a different property page has modified some of the data in between the visit to each page.
|
|
|
|
|
Are there any good tutorials of a SDI GUI application, that explains what each line of code is doing? I know C++ but it is understanding the Windows GUI stuff where I need some help. How the framework is set up. How resources are loaded into a Window, etc.
Jerry
|
|
|
|
|
jerry1211a wrote:
Are there any good tutorials of a SDI GUI application, that explains what each line of code is doing?
If you are using MFC, then you have access to the source. Beyond that, a romp through MSDN is in order.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I was doing some MFC for some time and now i want to go in database programming; And i have some qusetions
1- people tell me to go to visual basic to do it easily i want to use vc
2- there are ADO,ODBC and stuff which one should i use ?
3- what online samples/tuts are good to get started with ?
|
|
|
|
|
Leyusha wrote:
1- people tell me to go to visual basic to do it easily i want to use vc
Don't allow others to dictate what tool(s) you use. Each person uses a programming tool for their own reason(s) and those reason(s) are heavily biased. I much prefer to use VC++ over VB, but I'm also smart enough to know that any judgment I have against VB can likely be countered by any VB aficionado. Unless you happen to stumble upon a person that is an expert in both languages, a fair comparison is much like dust in the wind.
Leyusha wrote:
2- there are ADO,ODBC and stuff which one should i use ?
Each is a tool designed for a specific purpose. While they do overlap to a small degree, it all depends on the intended application as to which is better suited for the job. Often times more than one can be used with no noticeable differences. ODBC gives you access too hundreds of 16-bit ODBC data sources. ADO also gives you access too hundreds of ODBC data sources but using a 32-bit OLE DB interface instead. DAO has both 16 and 32-bit support and is native for Jet and ISAM databases.
Per MSDN:
ADO has one common yet extensible programming model for accessing data—thus eliminating the need to choose between DAO and RDO and all of the others. ADO is not a specific “implementation” of a data access interface like RDO or DAO but a programming model. It implements a common programming model against OLE DB.
DAO is an object interface that can be used to access ISAM (and ODBC) functionality using DAO/Jet or the remote RDO functionality using DAO/ODBCDirect. DAO is fairly easy to code and provides a rich set of cursors and cursor-less resultsets as well as DDL functionality.
ODBC is a recognized standard interface to a variety of relational data sources. It is fast and lightweight and provides a universal interface that is not optimized for any specific data source.
OLE DB is a low-level interface designed to be used by driver vendors that wish to expose a data source to ADO-aware applications or by C++ developers wishing to develop custom data components. OLE DB is not callable from Visual Basic as it is not COM automation-compatible.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Or is it possible to reset clipping rectangle of the device context ?
I need to exclude some part of dc from drawing operations for a while and
then enable it again.
How to do this ?
Thank you !
rrrado
|
|
|
|
|
OK I've found out that I can do what I need also by SaveDC and RestoreDC.
rrrado
|
|
|
|
|
I have been asked to see if I can differentiate between when a system crashes and when it is inadvertently powered-off.
The reason for this is that I have a shell created which is used in place of the normal Windows Desktop. This shell application really acts as a locked down version, so as to only allow access to certain functionality. Whilst the Shell is running an audit log is kept of what the user is running. However during the running of the shell application the system may suddenly crash or get powered-off. So I would like to know if its possible when I go back into the system to check some attribute or value to determine if the system was powered off or it crashed.
If there is a way, is it easy or could it get complicated. The Shell is only a small application and I dont want to waste time on it if the returns are not going to be great. I presently write out to a temp file everytime the user goes into a specific application. The name of the file gets changed if the user comes out of the shell correctly. Then if the system crashes or gets powered off I just check for the temp file existing (meaning the shell did not close down properly). I then write something into the file stating that the data could be invalid. This obviously does not state if the reason was due to crash or loss of power.
Thanks,
Simes
|
|
|
|
|
I think there is a windows message sent to all applications before power off/shutdown, but I don't remember which was it, try to search in windows messages.
rrrado
|
|
|
|
|
WM_POWERBROADCAST
The WM_POWERBROADCAST message is broadcast to an application to notify it of power-management events. A window receives this message through its WindowProc function.
|
|
|
|