|
Hi,
I have a question.
How can i have the option of viewing my bmp image in different sizes. (twice as big, tripple,..)
Thanks
Ehsan
Ehsan Behboudi
|
|
|
|
|
Use StretchBlt.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I got a problem in my MFC Application. I have loaded a bitmap in my childwindow with scrollbars. But when I scroll the picture, the picture starts flickering really bad.
Can Anyone help me out.
Vikas
|
|
|
|
|
You need to handle OnEraseBackground to make sure it doesn't erase the background before it is drawn. Also, if you're drawing in OnDraw, use OnPrepareDC instead.
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.
|
|
|
|
|
HI,
I cant understand what u are talking about?
I am not getting OnPrepareDC Option in the Class that I have created.
The problem is whatever I am drawing I am using OnDraw function within my Class.So If I have put that part of code in OnPrepareDC how do I do it.?
Vikas
|
|
|
|
|
You have created a class, or derived it from an MFC class ? Either way, the first port of call is OnEraseBackground. Try that first, and if it doesn't help, I'll be happy to offer more advice, but I'd like to know what your class is derived from.
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 need to disable/enable access to system menu of Child MDI window at run-time. Is it possible?
Petr Mezulanik
|
|
|
|
|
It's a property of the window. Try SetWindowLong, at a guess.
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.
|
|
|
|
|
Hi! I am interested in computer animation and I don't know if I could use visual c++/MFC to make it. All I want is to have a sort of an application that shows a flash screen with animation on it and sounds maybe and I don't know if I could do it in MFC. So if you have tried using MFC/Visual C++ making such things please help me?
|
|
|
|
|
You can create a window that shows Flash in an MFC app. I think from memory it's an ActiveX control you add. If you get stuck, LMK, I have a project kicking around where I did it.
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.
|
|
|
|
|
If you are talking about a splash screen. Then just go to add to project->visual C++ folder and click on splash screen. It will automatically generate a CSplash class that will do this flash screen that you are talking about. If you are talking about something else then Oh well.
Big Man On Campus
|
|
|
|
|
I am writing an Outlook 97 Extension in VC++. I need to access the tasks folder/object. I have declared the IOutlookExtCallback interface but now am stuck as to the next move.
The only function that IOutlookExtCallback provides is a single parameter GetObject function.
I also have sample code that gives returns an IDispatch object from an IOutlookExtCallback object.
Can I get a pointer to a folder object using any of that or am i pulling at straws?
There is sparse sample code on this subject.
Cheers
Robbie G
|
|
|
|
|
Not sure if these will be of any use to you
http://www.darkweb.com/~beng/exchange/book/dame.htm
http://www.darkweb.com/~beng/exchange/mdevfaq.htm
http://www.slipstick.com/outlook/index.htm
Michael
|
|
|
|
|
I have created an ATL Service exe project, which spawns some worker threads to act as a socket server.
The big issue right now is that when the exe is running, no other programs will start up until my exe is shut down; then all the other programs suddenly launch.
Any help would be greatly appreciated.
|
|
|
|
|
Hi!
Does anybody know how to make a control that, when displayed in the Properties Window of VB6, for some properties be able to display a list of constants? The user should be able to select the desired value.
I am trying to implement this by implementing the IPerPropertyBrowsing interface. It works when I want that all properties to have list of constants.
The problem is that I want that one property to have such a list and another property to be simple, without list.
The default implementation found in ATL seems to not work with VC++ 6.0 (the properties without 'list' are not editable)
The IPerPropertyBrowsing interface has 4 methods.
I found that for the method GetDisplayString(...), if I return E_NOTIMPL for a simple property, it is displayed correct in VB but not in VC++.
It would be great if someone could show a tip how to make the properties to be displayed correctly in the Properties Window.
Thank you very much!
|
|
|
|
|
OK, here's the situation. I'm working on a dialog-based app and I would
like to use a tab control and a "sheet" for each tab. Each "sheet" is a
dialog that is the child of the tab control. I have a few problems I am
trying to work out, and I think all of them are in the message-handling
code.
Problems:
1. Each sheet is not placed directly under the tabs, instead it is placed
right over them. Is there a function I should call to get the rect of the
display area right below the tabs?
2. When the dialog is first opened, no sheet is shown. Do I put the
ShowWindow call in WM_INITDIALOG, or somewhere else?
3. When I try to click on any control in any of the sheets, my app freezes.
Are there any parameters I need to set to overcome this?
4. Ctrl-Tab doesn't work for some reason. Do I need to implement this
myself, or is it supposed to be automatically supported?
Below is the code for the message handler of the tab control. Please note
that hPropPage is an array of HWND's to each sheet in the tab control, and
hTabCtrl is an HWND to the tab control window. Sorry if this code looks
messy, as I'm new to the Win32 API. Also, please note that I cannot use MFC
or any other API and I'm programming in C, not C++.
Thanks
-Lito
static BOOL CALLBACK ConfigProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
LPARAM lParam)
{
NMHDR nmhdr;
int i;
switch (uMsg)
{
case WM_COMMAND:
switch (LOWORD(wParam))
{
// For now, they do the same...
// In the future, any changes will be saved
// as soon as user does the change, and
// the Cancel button needs to perform a rollback
case IDOK:
case IDCANCEL:
EndDialog(hwndDlg, 0);
break;
}
return FALSE;
case WM_INITDIALOG:
// Show the first page
byCurrentPage = 0;
ShowWindow(hPropPage[byCurrentPage], SW_SHOW);
return FALSE;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code)
{
case TCN_SELCHANGING:
nmhdr.hwndFrom = GetDlgItem(hwndDlg, IDC_TAB);
nmhdr.idFrom = IDC_TAB;
nmhdr.code = PSN_KILLACTIVE;
byCurrentPage = TabCtrl_GetCurSel(hTabCtrl);
if(SendMessage(hPropPage[byCurrentPage], WM_NOTIFY, (WPARAM)IDC_TAB,
(LPARAM) &nmhdr))
{
// Prevent the selection from changing
SetWindowLong(hwndDlg, DWL_MSGRESULT, TRUE);
return TRUE;
}
// Hide the current child dialog box
ShowWindow(hPropPage[byCurrentPage], SW_HIDE);
UpdateWindow(hwndDlg);
break;
case TCN_SELCHANGE:
// Grab the index of the next page to display
byCurrentPage = TabCtrl_GetCurSel(hTabCtrl);
// Show the current page
ShowWindow(hPropPage[byCurrentPage], SW_SHOW);
// Let the page know it is now active
nmhdr.hwndFrom = hTabCtrl;
nmhdr.idFrom = IDC_TAB;
nmhdr.code = PSN_SETACTIVE;
SendMessage(hPropPage[byCurrentPage], WM_NOTIFY, (WPARAM)IDC_TAB,
(LPARAM) &nmhdr);
break;
}
return FALSE;
}
return FALSE;
}
|
|
|
|
|
Why aren't you using PropertySheet API function? Basically, you're trying to duplicate something that's already implemented in Windows.
If for some reason you want to do everything 'manually', use TCM_ADJUSTRECT to adjust child dialog position.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I get stuck with a simple program in C++ and I can't find what is the bug. Does anybody know a site, which help finding bugs?
Thanks, Noam
|
|
|
|
|
Yeah - this one. Just post your code and explain what the problem is.
You might also want to buy 'Debugging Windows' from M$ press. A *damn* fine book.
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.
|
|
|
|
|
Hi there, I was wondering if anyone know how to make a static box contain text that blinks. I tried a rudimentary version that uses the sleep command, but I don't like that it has to be used. Is there any other way?
"There is no knowledge that is not power" - Disraeli
|
|
|
|
|
|
Hi,
1. I have a problem with resouce files: Visual C++ does not give unique ID numbers to all sysmbols and this sometimes causes many problems. How can I prevent this from happening again? Editing resource file manually really takes too much time.
2. I have a big project and I want to make a German version of my program. How can I do this?
Thank you for any helps in advance
Mustafa Demirhan
|
|
|
|
|
Hello, the codgurus around the world.;)
Actually, I don't understand your (1) problem very well.
One issue of Localization is that we shouldn't put the hard code of error string like MessageBox. We should use the string table in the resource file.
ID of the control should keep the same one in resource.h and control ID of the resource ID.
As long as we use the resource editor to add or delete the control, the resource editor
add the new ID to resource.h (not delete).
(2) If you need German version, you should simple replace English string to German string
in the resource file (RC file).
That is, German resource is included in EXE file.
Or, you can use the resource DLL file to linked EXE file at run time.
Check Localization in MSDN help.
Or, you can use Unicode version exe for Window NT and 2000.
Currently, Window 9x and ME don't support Unicode. But, Microsoft will support this in
the near future.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
I have a (freeware) Add-In for VC 5.0/6.0 which can identify resource ID conflicts within a resource.h file and renumber symbols to get rid of them (unfortunately, there's not much that can be done about DevStudio mucking them up in the first place).
If you think this will help you feel free to visit http://www.resorg.co.uk.
P.S. I'm about to post a new version in the next week or so which is much smarter than the current one - if you're interested I'll let you know by email when it's available.
Andy Metcalfe - Sonardyne International Ltd (andy.metcalfe@lineone.net) http://www.resorg.co.uk
"I used to be a medieval re-enactor, but I'm (nearly) alright now..."
|
|
|
|