|
1) CFrameWnd::LoadFrame calls ::LoadAccelerators (indirectly, there's CFrameWnd::LoadAccelTable which basically invokes ::LoadAccelerators with right HINSTANCE). Accelerators are loaded along with other frame resources.
2) It's documented at the bottom of the article. It's a function which returns CFrameWnd::m_hAccelTable. Since m_hAccelTable is public anyway, you can replace GetAccelTable with m_hAccelTable.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Thx for details, Tomasz! I got everything working.
However I have no GetAccelTable(), so I used the public member CFrameWnd::m_hAccelTable and it works fine.
|
|
|
|
|
Hi,
Does anyone know if there exists a list of Win32 API functions that are implemented differently in WinXP than WinNT/Win9x?
I am especially interested in subtle differences in the API functions that deal with windows.
|
|
|
|
|
I don't think you'll find one. The best you can count on are the footnotes in MSDN describing differences in particular APIs on 9x/NT. This also applies to WM_ and other message docs.
Anyway, if you find the list, let us all know
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Hi all,
Does anyone could tell me where I should write 'CLARM /QRxscale' down in eVC++ 4.0.
'Cause I need to write a app. running in WinCE with XScale CPU.
Following SDK reference, I should add this command line to generate code for Intel XScale processor, but I don't know where I should place this line.
Anyone can help me?
Thanks a lot.
|
|
|
|
|
Just try to add the command 'CLARM /QRxscale' in the 'C/C++' or 'Linker' (--> Project Options) tab of the project settings.
--
Nice greets, Daniel.
|
|
|
|
|
I added the command in 'Project Options'(Project->Settings->Link tab) but the complier show a warning message 'unrecognized option'????
Could you please tell me how to declare this command ?
Thank s lot.
|
|
|
|
|
Sorry, I have never tried it... I must take a look...
--
Nice greets, Daniel.
|
|
|
|
|
I want to generate random number between 1- 400,000 which is not the same value.
Example.
If X1 = 254899
X2 not have the same value as X1.
and X3 not have the same value as X1 and X2 .
I want to generate data X1 - X400,000 which not have the same value and each data have value between 1-400,000
If you know how to do that, please tell me. Thank you.
|
|
|
|
|
Create vector of integers containing 400,000 elements and initialize it with ordered values from 1..400,000 range. Call std::random_shuffle. Make some coffee and wait.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
i vote for a Vodka!
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi,
I trying to draw a text on a button. I have code:
-------------------------------------------------------
CRect re = di->rcItem;
CBitmap cbm, *obm;
CDC cdc, mdc;
CFont *cf;
cdc.Attach(di->hDC);
mdc.CreateCompatibleDC(&cdc);
cbm.CreateCompatibleBitmap(&cdc, re.Width(), re.Height());
obm = mdc.SelectObject(&cbm);
mdc.FillSolidRect(re, GetSysColor(COLOR_BTNFACE));
mdc.SetBkMode(TRANSPARENT);
mdc.SetTextColor(m_textcol);
//mdc.SetBkColor(m_bkcol);
cf = mdc.SelectObject(&m_font8);
mdc.DrawText(m_strregion2, re, DT_CENTER | DT_SINGLELINE | DT_VCENTER);
cdc.BitBlt(re.left, re.top, re.Width(), re.Height(), &mdc, 0, 0, SRCCOPY);
mdc.SelectObject(obm);
cdc.Detach();
--------------------------------------------------
It works fine. But my problem is how to adjust the size of the text based on the above code?
Thanks in advance!
chen
|
|
|
|
|
GetTextExtentPoint32 ???
AFAIK this function computes the width and height of the specified string of text.
|
|
|
|
|
Ok Let's say i have two functions contained in a DLL and an .EXE that calls them.
Then I decide to update this DLL, and add another, third function to it.
Is there any way to make the .EXE aware of this new function without replacing the whole .EXE? Can I get a list of functions dynamically from the DLL and use them form the exe?
Any help or pointers would be really appreciated.
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
While you can get the exported function table by examining .dll executable file (which uses PE format), you can't answer very important question: what are the parameters and what's the return type.
Even if you could, how could .exe get the advantage of new function - at the moment you write .exe you have no idea what new function will be doing and when should you call it.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Well I do know the function name and exact parameters. I'm actually writing the .DLL and .EXE.
My Idea was to have some kind of small database in the actual DLL that will keep list of the functions it provides along with the parameters, and maybe .exe will call say GetSupportedFunctions() and will know exactly what functions are there and waht parameters they take. Deciding when to call what function, shouldn't be a problem! However my problem is figuring out, how to call these functions.
Or is this possible at all?
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
Venet wrote:
However my problem is figuring out, how to call these functions.
Getting the address of function is easy when you have function name (GetProcAddress). But you need to call the function with right parameters, and this would be quite difficult. I guess you'd have to code this part in assembly language.
I still can't see why would you like your .exe to invoke functions unknown when you develop the .exe itself. Enlighten me please
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Well, the .exe will be unable to do the right thing with new functions in .dlls anyway.
I'd split current exe into small .exe program listening for updates and main .dll which contains the core functionality. If new functions appear, .exe unloads the main .dll and replaces it with the updated one which knows what to do with updated plugins.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Thank you for the suggestion.
Regards,
Venet.
Donec eris felix, multos numerabis amicos.
|
|
|
|
|
or use plugin style dlls. have the exe scan a particular dir, and attempt to load each dll present, in turn. each dll should have an identical entry point.
Signature space for rent. Apply by email to....
|
|
|
|
|
Yes, but I've got an impression that 'identical entry point' doesn't apply in his project.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
I want to display a graph on my property page.
There appears to be many methods for doing this in MFC. e.g. ActiveX, COM, OLE, using existing libraries C++. I'm looking for the least time consuming method.
The simple MS Excel graphing techniques are sufficient for my needs. The data will produce simple non-linear relationships from data stored in CMyProjDoc.
Any ideas?
Kash
|
|
|
|
|
Least time consuming method is ripping method. Get it here[^].
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
I've been doing some research and found I can place an ActiveX control on my property page. This control takes the form of MsChart. How can I link the data to this chart?
Kash
|
|
|
|