|
Edit: I'm not using MFC BTW
I made a blank DLL project, copied my resources over to the DLL compiled, everything is fine...
I then loaded my resource DLL inside my app...it's load fine...but nothing is showing...obviously my resources need special attention when stored in a DLL...
What steps do I have to take to make sure my Dialogs, Menus, etc...load...and are shown...?
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
|
|
Thats what the problem was...
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
I see this in a sample on CP for a CStatusbar derived class. But I cant figure out how to get the classwizard to add the afx_msg UINT OnNcHitTest(CPoint point) handler . This class CTextualStatusBar doesnt show up in the class wizard. SO I thought maybe if I right click in the left panel classview window on this class and get "Add windows message handler" I migtht be able to do it that way. But for this class, that menu item isnt in the context menu. Yet this handler is in the afx area and its grey which means the wizard generated it. AM I overlooking something obvious?
Thanks.
ns
class CTextualStatusBar : public CStatusBar
{
public:
CTextualStatusBar();
public:
virtual ~CTextualStatusBar();
protected:
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg UINT OnNcHitTest(CPoint point);
DECLARE_MESSAGE_MAP()
};
|
|
|
|
|
I would just add the handler manually.
ClassWizard can behave in a severely brain damaged manner, especially when the class files don't exist in the project's root folder.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
I need to pass Command line arguments to my MFC wizard created app and store the values in a local variable .
Where can i trap these values in code ?
I need something like
main(int argc ,char *argv[])
Please help
|
|
|
|
|
See CWinApp::m_lpCmdLine .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
|
CRT ?
Engineering is the effort !
|
|
|
|
|
|
see the following MFC stuff:
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
After the call to ParseCommandLine() everything will be placed in to cmdInfo.
So Hum
|
|
|
|
|
I want to create a console application (using Visual C++ 6.0) that can input and output Arabic characters. I tried the following code:
#define UNICODE
#include <tchar.h>
#include <iostream>
int main()
{
TCHAR in[10];
std::wcin >> in;
std::wcout << in;
}
When I run the program I try to type an Arabic word, but strange characters appear (those at the 2nd half of the ASCII table). The "cout" statement does absolutely nothing.
All help would be appreciated. Thank you in advance.
Hosam Aly Mahmoud
|
|
|
|
|
I've never run any arabic (or non western for that matter) OS before, so I can only speculate.
If you output only one arabic character, do you get two funny looking characters? If that's the case, it seems that the console is not UNICODE at all.
If there's a 1:1 ratio between arabic characters and funny looking characters, then I'd assume that the font used in the console does not have the arabic letters.
--
20 eyes in my head, they're all the same![^]
|
|
|
|
|
Hello All,
I want to use some of the methods and classes defined in a .mof file. The name of .mof file is Cimwin32.mof and it is available in win2K. Can anyone help me out how to use them in my own code.
Thanks in advance
|
|
|
|
|
I've not heard of a .MOF file. What is it?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Pls do any one know the code to change the background color of a console vc++ application.
thanx
smore
|
|
|
|
|
|
I have an application and I am trying to generate an output file. type *.xls with c++ code.
how it is possible to create seprate sheet within the excel file and write to it.
|
|
|
|
|
maryami wrote:
how it is possible to create seprate sheet within the excel file and write to it.
It's very easy using Excel's COM interface (Automation). MSDN has several examples. This forum even has a few.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi!
I want to design a GUI in which I need to have bitmap containing buttons, something like actual phone, where buttons pressed simulate the actual pressing of buttons. What kind of architecture will be best to achive it. should i go for a Windows application or something like dialog boxes or Document/View Architecture. Any suggestions---------------
|
|
|
|
|
My suggestion here is to go for Windows application & MFC.
MFC provides you a possibility of customizing your window creation by deriving a class from CWnd. This allows you, when necessary, to do custom-painting routines for your window. I developed a skinned application a while back, and it's main design structure was as follows:
1. Created the actual bitmap of the UI, and the bitmaps of buttons
2. Created a 1-bit (two color) mask from the UI bitmap, and used a customized version of Jean-Edouard Lachand-Robert's BitmapToRegion function to get a valid Windows HRgn
3. Placed this HRgn as the window's clipping region by a call to CWnd::SelectClipRgn .
This results in a window with non-rectangular outline and a custom-painted UI. Of course, you can alternatively use drawing functions to draw the outline of the phone yourself, but this is very tedious work in Windows. However, it allows for a more realistic-looking UI than the bitmapping does. When using a bitmap, the creation of realistic-looking buttons is next to impossible, as you probably need to create skins for them as well.
The workload of creating a custom UI is huge, but doable, and if done right, you'll get very nifty results as well. But my suggestion is to go with MFC. Not only can you have access to the whole Win32 API if required, but you can also enjoy the benefits of a "true" OOP programming model.
If you feel like attempting this approach, here is a link to the aforementioned routine. The link resides on the CodeGuru website (BitmapToRegion routine.[^])
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
aroraavinash wrote:
should i go for a Windows application or something like dialog boxes or Document/View Architecture.
A Windows application is not mutually exclusive with dialog boxes or document/view architecture.
You can indeed place a bitmap (with the necessary "buttons" on it) on a dialog box, and when it is clicked, determine where in the bitmap the mouse was when the click occurred. That will tell you the "button" that was clicked. You could also place multiple button controls on the dialog. This is easier than the bitmap route but probably not as appealing to the eye.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Thanks for your suggestion. I was wondering how on a bitmap, can we detect, where the user has clicked and perform the necessary action. say i have a phone gui and button on it. how will i know that user pressed a particular button.
|
|
|
|