|
ParagPatel wrote: Thats way i was preferring separate resource DLL.
That's what I was suggesting; create a DLL composed of all the string table resources and a simple function to return the relevant string table according to the language selected by the caller.
|
|
|
|
|
Yes same I want to do,
MFC provide API to load resource "SetResourceInstance", but I am confuge here that how can i set tow resource instance. one for default resource instance (Dialog, Image etc) and second for string table?
Thanks
Parag Patel
Sr. Software Eng, Varaha Systems
|
|
|
|
|
ParagPatel wrote: MFC provide API to load resource "SetResourceInstance"
I cannot find the MFC reference, only the one pertaining to ATL, which I have no experience of. I think you may need to look at how you access the resources, and whether to use pure Win32 to access them through the DLL.
|
|
|
|
|
Hello Sir
Recently i downloaded this source code from this link ..
MAPIEx: Extended MAPI Wrapper[^]
i can tested this code outlook 2003 and 2007 ..when i install outlook 2002..its not working ..i dont know why its not running ??
kindly help me Sir!!
Thanks
Raju !!!
|
|
|
|
|
Try posting your question in the article's Q&A section so the author sees it.
|
|
|
|
|
Thanks for your replay ..
Already ..that kind of question is there ..but its not there in relevant answer ..so that i posted in this section ..
Raju !!!
|
|
|
|
|
Your original question gives no information as to what may be wrong; "not working" tells us nothing. You will have to do some debugging and narrow it down to the area of code that is failing, and then post the lines of code that fail, and any error messages that you see.
|
|
|
|
|
I have a dialog that has to be shown both as a part of a property sheet and as a standalone dialog (in which case it must have an OK/Cancel buttons which in the property sheet it shouldn't have). As I don't want to keep two resources and two classes for essentially the same dialog except for two buttons, I'm wondering if anyone here can recommend a solution.
I've seen that CPropertyPage is derived from CDialog, so I'm considering keeping a dialog resource with OK/Cancel buttons which I somehow hide before adding it to the property sheet, and when I want to use it as a standalone dialog I call its DoModal method, but will that work? Are there better solutions to this problem?
[Edit]
I've seen now that when I call CPropertyPage::DoModal the resulting dialog doesn't close when OK/Cancel or the close button is pressed.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
modified on Wednesday, November 18, 2009 5:35 AM
|
|
|
|
|
Why not just have a one-page property sheet when you need a standalone dialog?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks for the reply, DavidCrow!
That could work but right now I actually succeeded in making my original idea work, by creating a helper class that derives from CPropertyPage and overrides OnOK , OnCancel and OnInitDialog, and deriving the pages in question from it.
It's a bit convoluted as a solution but it has the added benefit that the resulting dialogs really look like ordinary dialogs, whereas with your solution they wouldn't be standard, instead they'd look like a single-tab property sheet (I haven't tested that though so correct me if I'm wrong).
But if you have an idea how to make it look like an ordinary dialog, I'd rather use your idea because it would be simpler.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
i want to draw hicon onto 3d-layer surface, and i can use a interface function that is CreatePictureFromMemory.
how to retrieve the memory data from the hicon?
thank you very much
|
|
|
|
|
See here[^] for all the information on how to manipulate icons in your code.
|
|
|
|
|
By "memory data", do you mean pixels? If yes, you could try creating a DIB section using CreateDIBSection[^], then render your icon onto this bitmap. Since CreateDIBSection gives you a pointer at the pixel data, you can then use that. Note that this solution will (probably) loose the alpha channel in case you need it. Otherwise, i believe the icon file format isn't that complicated, you can try to load it yourself to get access to the pixels.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
as you guess, it means pixels!
can you give some steps for using CreateDIBSection?
|
|
|
|
|
I'm not sure what you mean by steps, but...
Fill out a BITMAPINFO[^] structure (meaning, the BITMAPINFOHEADER[^] struct in that), specifying your requested width and height, color bit depth (i recommend 24 or 32), also don't forget to set the biSize member to the size of the struct, biPanes should be 1, the rest can be zero i believe. Then feed this struct to CreateDIBSection, something like this:
CreateDIBSection(NULL, &your_bitmap_info_struct, DIB_RGB_COLORS, &pointer_to_pixel_data, NULL, NULL);
This will give you a HBITMAP handle and also set the pointer_to_pixel_data pointer to point at the very first pixel. Of course if it succeeds.
Then you can create a DC, select this bitmap into it and use DrawIcon[^] or DrawIconEx[^] to render your icon onto the bitmap. After this, you can use the pointer_to_pixel_data to access the pixels and do whatever you like with them. Don't forget to clean up the bitmap and the icon after you are done with them. Good luck.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
|
Hello,
How to get system default font?
|
|
|
|
|
Hi,
You can use GetStockObject() [^] function to get the default system font.
Regards,
Nuri Ismail
|
|
|
|
|
But MSDN says "It is not recommended that you use DEFAULT_GUI_FONT or SYSTEM_FONT to obtain the font used by dialogs and windows".
Then what to use?
|
|
|
|
|
MPTP wrote: But MSDN says "It is not recommended that you use DEFAULT_GUI_FONT or SYSTEM_FONT to obtain the font used by dialogs and windows".
Yes, that is why i said "You can use...". In your initial post have asked about default windows font, but in fact system uses several fonts: menu font, message box font, icon label font, caption font, status bar font...
MPTP wrote: Then what to use?
For best precision you should use the SystemParametersInfo() [^] function with the SPI_GETNONCLIENTMETRICS parameter to retrieve the current font information.
This method will fill a NONCLIENTMETRICS [^] structure and you can check the:
LOGFONT lfCaptionFont;
LOGFONT lfSmCaptionFont;
LOGFONT lfMenuFont;
LOGFONT lfStatusFont;
LOGFONT lfMessageFont;
fields of this structure. I hope this helps!
Regards,
Nuri Ismail
modified on Wednesday, November 18, 2009 4:47 AM
|
|
|
|
|
Check this[^] out, but i also recommend reading this[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
|
Hi,
What is method to change the build from VS6 to VS2008.
|
|
|
|
|
If you open the solution with vs 2008, you shall be automatically guided.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Is there any method?
I want to have both builds.
|
|
|
|