|
Hi,
Thank you for dropping by. I want to display a dialog box to the user so that they can choose a font. Now CFontDialog does this very nicely. However, all my programs options are in "tabbed Property sheets" so that the user can find all the config stuff in one place.
What I would like to do is to add the CFontDialog as a Property Page to the Property Sheet along with all the other config dialogs. Is this possible?
Thank you.
P.S. I am using VC++ v6
Michael Thomas
|
|
|
|
|
Consider adding the font dialog to the property sheet as though it is a property page. If that does not work, then derive a class from CFontDialog and CPropertyPage.
Kuphryn
|
|
|
|
|
Instead of using Multiple Inheritance and deriving your class from CPropertyPage and CFontDialog you should be able to create a dialog template and include the CFontDialog inside of it, much the same way as you can with CFileDialog. I don't have the method to do this handy right now, but it involves creating a dialog template, and including a static or group box with a special id stc=0x30 or something like that. There are several examples on the net.
That should work, allthough I have not tried it yet.
|
|
|
|
|
Take a look at "advanced programming with Microsoft Visual C++" from microsoft press, at it's chapter 7 it explains nicely/easily how to insert common dialogs inside a normal one.
If you want you can insert a common dialog into a property page (in the same way).
If you don't have the book, send me a mail so I can send you the code that's inside the CDROM that came with the book.
Regards.
|
|
|
|
|
I would like to find a good site to learn about the C++ implementation of binary heaps. Does anybody know what's a good site to learn about this. I would like to find a site, for a beginner. A super simple little program would be very helpful. I really want to understand how is it that it works, its implementation, and where it's usually used.. Thanks;)
GabyGirl
|
|
|
|
|
|
I'm a beginner here with probably a very easy question...
I'm looking to find how to get the largest value in a series of numbers, without using a function.
Any suggestions?
Thanks!
Sheshi
|
|
|
|
|
How about...
int nLargest = 0;
for( int i = 0; i < ARRAY_SIZE; i++ )
nLargest = __max( nLargest, ARRAY_ELEM[ i ] ); ???
|
|
|
|
|
Is is a programming question or a general "howto" question ?
Do you have a clue how you'd do it by telling me in your own word, without using code, just plain english ( or whatever human language we both understand )
If you can't derive a non-technical answer to this problem you need to think about it a bit more.
If it's a programming question, you have a bug with the code you wrote to solve this, then ask something a bit more precise.
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
Hi
There's a warning that is annoying me extremely, but I don't know how to get rid of it. Here it is:
Linker-Vorgang läuft...
Bibliothek Release/highlight.lib und Objekt Release/highlight.exp wird erstellt
highlight.exp : warning LNK4070: Die Direktive /OUT:hllaMIRC.dll in .EXP weicht vom Ausgabedateinamen "highlight.dll" ab; Direktive wird ignoriert
It is german, I try to translate it as far as I can:
"Library Release/highlight.lib and object Release/highlight.exp are being created
highlight.exp: warning LNK4070: the directive /out:hllaMIRC.dll in .exp differs from the output name "highlight.dll"; directive will be ignored."
thanks in advance
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I think it's saying that the output name specified in your .def file is different to the one in the project settings. Trying making them the same and see what happens.
Dave
|
|
|
|
|
Yeah, what a simple solution. Thank you VERY much
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
StartPage and EndPage are not working in print preview, but to printer.
The data is displayed only in the first preview page.
How can i solve that problem?
|
|
|
|
|
Hi
I'm developing an application which interfaces with Internet Explorer using COM.
I have a problem compiling my code due to typedef redefinitions. Whilst I understand the cause of the compiler error, I cannot figure a way around it. My application is #import'ing mshtml.tlb. This causes the compiler to automatically create 'mshtml.tlh', which redefines some existing typedefs. The worst thing, is that mshtml.tlh (which is not editable due it being regenerated every time you compile) defines UINT_PTR as an unsigned long *, so it differs with the existing definition which is of course unsigned int *.
None of these typedefs are mine, and i do not sepcifically include BaseTsd.h or WinGDI.h
I could really use some suggestions as to how i can resolve this problem.
Here's the output :
TestIEConnectWithCOM.cpp
c:\TestIEConnectWithCOM\Debug\mshtml.tlh(957) : error C2371: 'UINT_PTR' : redefinition; different basic types
c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\BaseTsd.h(90) : see declaration of 'UINT_PTR'
c:\TestIEConnectWithCOM\Debug\mshtml.tlh(76516) : error C2011: 'tagLOGFONTW' : 'struct' type redefinition
c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\WinGDI.h(1167) : see declaration of 'tagLOGFONTW'
Jase
|
|
|
|
|
I believe you can provide a different namespace name, to avoid the conflict. More info here[^].
|
|
|
|
|
Thanks for your reply. The article you linked me too has helped me fix the problem.
I'm not well acquainted with namespace's, and the article showed me you can exclude symbols as follows :
<br />
#import < mshtml.tlb > named_guids no_namespace exclude("UINT_PTR", "tagLOGFONTW")
Thanks again for you help.
Jase
|
|
|
|
|
I'm trying to take multiple small bitmaps, BitBlt them into a memory dc then
using a mask, draw them transparently to the screen. With one bitmap from a file it works fine, but when I combine them to an in memory DC and do the transparent blt, the colors get screwed up.
|
|
|
|
|
try to use TransparentBlt() , it uses chroma key to apply the transparency, and much easier
BOOL TransparentBlt(
HDC hdcDest,
int nXOriginDest,
int nYOriginDest,
int nWidthDest,
int hHeightDest,
HDC hdcSrc,
int nXOriginSrc,
int nYOriginSrc,
int nWidthSrc,
int nHeightSrc,
UINT crTransparent
);<pre>
if you are using VC++7 you will find it in the CDC class, otherwise you should use this API version
|
|
|
|
|
I try to set bitmap on button but without success?
CButton xxx;
xxx.SetBitmap(::LoadBitmap(NULL,MAKEINTRESOURCE(IDB_BITMAP1)));
why this does not work?
Best regards,
Axe.
|
|
|
|
|
if you set the button syte to BS_BITMAP and the LoadBitmap returned a valid handle this function should work, otherwise somthing else may be wrong
|
|
|
|
|
which function is in the middle of CAppWin::OpenDocumentFile() and CDocument::OnFileOpen()?
because app crashes after call CAppWin::OpenDocumentFile() and before reach to CDocument::OnFileOpen().
thx
includeh10
|
|
|
|
|
What about using the debugger call stack ?
|
|
|
|
|
hello
i would to find a function that can know if the CDROM DRIVER work or not or in other way if it read or no.
|
|
|
|
|
Hi guys, I'm Pete an IT technician from the UK, previosly i only ever delt with Visual Basic but unfortunatly for a course i'm doing i have to write a program in C++ and everything i'm trying comes out wrong - i would be very greatfull if anyone could post examples of any code that could help me.
The task is to write the code for a simple ATM simulation
-When started a welcome message shoudl appear
-The user must then register their details to open an account
once the user has sucessfully registered their details a logon screen shoudl appear asking for thier pin number
-3 wrong pin numbers would result in the program shutting down
-A valid pin entry would take the user toa menu syetem with the following options.
Withdraw Cash
Deposit Cash
Request an overdraft
Quit
The program must display these menu options untill the quit option is chosen
An overdraft will be apporoved automatically if the user has over £500 in their account, if the user has between £250 and £500 then they must seek approval from their branch. if they have kess than £250 they overdraft request would be rejected.
I realise this is a long way below the levels of most of you guys but any ideas or sample codes would be greatly appreciated
|
|
|
|
|
I doubt you will receive any extensive help in terms of actual code. I recommend that you start the project and then post specific questions.
Kuphryn
|
|
|
|