|
Thanks.
As I've understand:
FindResource
LoadResource
LockResource
Deal with MESSAGE_RESOURCE_DATA, _BLOCK and _ENTRY
I can't believe that nobody had done it for message table once and forever! Message table is standard and explotable enough to justify this effort.
Thanks once more.
Regards,
Gennady
|
|
|
|
|
Yeah, Find/Load/LockResource works for me with app-defined resource format. I don't think you'll have much trouble with message tables.
Cheers,
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
How can i get the word that has a mouse pointed over it?
(note : Any words that appear on screen, not only on the active window.)
|
|
|
|
|
Hello,
I need to debug an ActiveX Exe. This executable is launched from an NT Service when the service is started. I've got the source code for both executables but can't figure out how to debug them at the same time.
Can anybody help me?
Thanks in advance.
Matthias
|
|
|
|
|
Hmmm... you might try placing DebugBreak calls (or _asm int 3) in both modules. When these get hit, you'll be promted to debug the application.
I'm thinking you might end up with two copies of the debugger running, which could get a bit wonky, but might work.
Definitely safer to experiment with this stuff by starting the service manually rather than automatically - you can really mess up your session with this stuff if you're not careful!
There are other approaches - I'm not _exactly_ sure what you need/want.
|
|
|
|
|
Did you get help with debugging your NT Service. I can help you with this if you still need help.
Matthew
|
|
|
|
|
Hello,
I have a splitter window in my application. Is it possible to forbid user changes to these windows sizes? I don't want the splitter to be moved anywhere.
And the second question. Is it possible to trace splitter in some way and correct its position if user trys to move it further than I want?
Thank you in advance,
Andrei the Adroit
|
|
|
|
|
create a class derived from CSplitterWnd and override OnMouseMove and OnLButtonDown
maXallion "Look for bugs, I hate bugs!" - Warden, The Mummy www.maxallion.de - coded evil & more
|
|
|
|
|
======PhotoShop SDK======
I´ve changed the original sample source code from VB to VC++, and succeeded to start photoshop using but got a problem with make a new document.
No error, just nothing happened!
I guess it may wrong that PSConstants in PhotoShopTypeLibrary have been changed to NumericType Variables.
Because VC++ doesn´t have PSConstants, I had to use long type variables.
ex)phKeyResolution(VB)---> 1383296116(VC++)
Do you have any experiance in this kind of project?
Any help would be greate.
|
|
|
|
|
I am working with a DAO dataset. When I open the recordset with "SELECT * FROM [MyTable] WHERE [MyField] = m_lMyLong", the Database tells me I dont have enough parameters. If I change m_lMyLong to a number i.e. 10664, the recordset opens fine. It just won't accept the variable (which is set and right according to the debugger). Do I need to bracket the variable name with something? All help appreciated.
Richard
|
|
|
|
|
The SQL statement isn't handled by the C++ compiler, it's interpreted at runtime by the database driver. This means you can't use C++ variable names in SQL statements. You should use CString::Format() or sprintf() to insert the value of the variable in the SQL statement before passing it to Open().
|
|
|
|
|
Thanks, I'll give it a try, but the Field I'm filtering is a long. We'll see what happens when I query it with a string. As you can see, I'm real new at this, and can use all the help I can get.
Richard
|
|
|
|
|
I am looking to change the background color of a static text box. Howz it done..?
Thanks,
John
|
|
|
|
|
Have a look at the message WM_CTLCOLOR.
Create a subclass of CStatic and override the WM_CTLCOLOR message. You should get a function afx_msg HBRUSH OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor );
Simply set the text colour when nCtlColor = CTLCOLOR_STATIC
|
|
|
|
|
Hello,
Is there a way to implement the OnChange() function for a int member vairable that is defined through a class? I have a int that changes every second like in a count down timer. I need to updateData(TRUE) every second for this int so it reflects the correct value, the only way I know how to do this is through the OnChange() function like you would use with a edit box control.
Thanks,
Rob Jones
|
|
|
|
|
If it happens every second, what's wrong with OnTimer ?
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
I initialize the int's through a OnStartButton funtion.. In OnTimer I am comparing the values of the 2 int's and displaying the count down time. Once I press the start button it initializes the correct int value and the OnTimer displays the correct count down value but when I do a TRACE on the count down int it shows that the int stays the same value as when I first initialized it and it only updates the one time(in trace). I need for the value to be updated every time it changes so when the OnTimer is comparing the two values and they reach a defined value my program executes a event. I was using a edit box to define the inital value of the int but now I'm pulling the value from a CString.
Rob
|
|
|
|
|
Forget all of that stuff I just wrote.. I see what I was doing wrong..
Thanks for the help!
Rob
|
|
|
|
|
What stuff ?
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
I'm dumb, I was not tracing under OnTimer..
|
|
|
|
|
I have two MFC projects- each with any number of resources. The first project is an EXE module and the second is an MFC extension dll. The extension dll is linked into EXE (explicitly) at runtime. How do I get the EXE project to know resources in the DLL project?
I tried using the View->Resource Include options (readonly symbols), but it doesn't seem to work.. .
|
|
|
|
|
I think the simplest method would be to export a function that returns the DLL's resource handle -- see AfxGetResourceHandle(). Then when you’re loading your resources from that DLL, all you would need to do is call AfxSetResourceHandle() and pass it that DLL's handle...
HINSTANCE hInstOld = AfxGetResourceHandle ();<br />
ASSERT ( NULL != hInstOld );<br />
ASSERT ( NULL != hMyDLLResourceHandle );<br />
AfxSetResourceHandle ( hMyDLLResourceHandle );<br />
<br />
<br />
AfxSetResourceHandle ( hInstOld );
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
I try to change the value of a subitem of a item.
I do this :
-------------
int Index;
LVITEM ItemData;
CString strItem;
CString FileName;
Index = m_FindItemListCtrl(FileName);
ItemData.iItem = Index;
ItemData.mask = LVIF_TEXT | LVIF_STATE;
ItemData.iSubItem = 0;
ItemData.stateMask = 0xFFFF; // get all state flags
TransControlList.GetItem(&ItemData);
//Change subitem 3
strItem.Format(Progress);
ItemData.iSubItem = 3;
ItemData.pszText = (LPTSTR)(LPCTSTR)(strItem);
TransControlList.SetItem(&ItemData);
TransControlList.Update(Index);
This doesn't work! what's wrong?
Thanks a lot
|
|
|
|
|
|
I've implemented a SDI program which spawns a bunch of modeless child windows (dialogs) and I need a way for a dialog to enumerate all it's siblings in MFC. I tried the following code in my dialog code:
CWnd *wnd = GetWindow( GW_HWNDFIRST );
while ( wnd != NULL )
{
process( wnd );
wnd = wnd->GetWindow( GW_HWNDNEXT );
}
But it enumerates all kinds of unexpected things such as child buttons on itself as well as siblings. All I want are the sibling dialogs.
Any ideas?
|
|
|
|