|
As I said in the question, we seek for a solution to provide our customers an application suite, but depending on the license or product class (Home edition, enterprise edition, etc) we deliver suites with different capabilities. For example, suppose our suite is a security suite. In home edition we have just file encryption and in Enterprise edition we have both file and disk encryption features.
The magic we look for is a proven method for our developers team to simply define the class type and then build the intended suite. If you, as the customer, later bought a higher class license, you will receive a small package of components which could be easily installed on your system. Launching the original product suite, you will have the new features available in it without having to modify the older installation. This way we have a dynamically configurable component suite with a unified look and feel for the component UI elements.
If you have guide or survey (though not detailed) please send it out to me.
|
|
|
|
|
I don't have a guide or survey; me think it is all done on a case-by-case basis with requirements and specifications specific for each company that does that.
One way of doing it would be to split your project in different sub-projects:
- UI Library: responsible of creating the UI look and feel (this could be optional if you use the default Microsoft UI look and feel and User Experience guideline)
- application launcher : main difficulty is here.
The launcher will be responsible to find all installed components and present them to the user according to the license in place (for example, it could look for executable and extract icons for them, and present them to the user as buttons to click to launch corresponding application.
- discreet applications (file encryption, disk encryption, ... ) : Individual components that could be build and run and tested independently.
Good luck with you projects.
Watched code never compiles.
|
|
|
|
|
Hi friends,
I have started to explore about abstract class and interface. but i could not able find exact solution for my question.
1. when where and how to use abstract class and interface in real time application using C++.
2. What is difference between Abstract class and Interface class?
kindly share your views and idea with me.
Thanks and Regards,
S.Shanmugaraja
|
|
|
|
|
shanmugarajaa wrote: 1. when where and how to use abstract class and interface in real time
application using C++.
Abstract Class: Abstract class provides default behavior for a function. This means, that even if child class does not provide its own method, we have a default behavior for this method. Eg: The classes like CEdit, CButton etc.
Interface: You cannot provide a default behavior in interfaces. Interfaces only allow you to provide signature of the method.
shanmugarajaa wrote: 2. What is difference between Abstract class and Interface class?
You cannot provide access modifiers methods in Interfaces, but access modifiers can be specified in a abstract class.
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
1. Abstract classes and Interfaces are basic building blocks of the language, they have nothing to do with real-time or any other type of application, in the sense you are asking about.
2. See this discussion[^] from Microsoft.
|
|
|
|
|
Hi,
I have loop in my code which I try to execute 4 times I have tried a for statment
while statement nothing seems to work
going into assembly mode the compiler doesn't seem to have generated the right code
if tried a for loop
while but the compiler generates a compare for a 1 instead of 4
<pre lang="cpp">249: while(i < 4)
0137149F mov dword ptr [ebp-14h],0
013714A6 mov dword ptr [ebp-10h],2AFFh
013714AD jmp CHERC_CMDApp::InitInstance+341h (13714C1h)
013714AF mov ecx,dword ptr [ebp-10h]
013714B2 add ecx,1
013714B5 mov dword ptr [ebp-10h],ecx
013714B8 mov edx,dword ptr [ebp-14h]
013714BB add edx,1
013714BE mov dword ptr [ebp-14h],edx
013714C1 cmp dword ptr [ebp-14h],1 <===
013714C5 jae 013715BA
250:
|
|
|
|
|
Please post the code for the entire loop.
There must be something wrong with the loop.
|
|
|
|
|
I re-compiled and the loop seems to be working however I got another exception
for which I'll start another thread a little later as I amy need your help
Thanks
|
|
|
|
|
Hi, how could I use GTK+ in CodeBlocks?
|
|
|
|
|
|
hello guys... I have this 4 tabbed program and I am relatively new to MFC so don't know what exactly is happening. When I press Enter on Tab1, the the whole tab page goes blank. When I select Tab2 and come back to Tab1, it becomes alright.
So the question is why does the dialog goes blank and what should I do to prevent this? Thnks
This world is going to explode due to international politics, SOON.
modified 2-Jul-12 7:16am.
|
|
|
|
|
Are your tabs also derived from CDialog?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Yes. But it is solved now. I just overrided OnOK() and OnCancel() in each tab. Thanks for showing interest.
This world is going to explode due to international politics, SOON.
|
|
|
|
|
That's what would have been my suggestion...yourwelcome for the interest.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Hello all,
I would like to know of any software, books or resources I could use to create a software you can boot from the BIOS (basic input-output system), like (1.) you turn on your computer pressing the power button. (2.) You hit the F8 key, (3.) you select boot from CD or from USB [or any other media] (3.) you select the software from what the computer detects and BAM! your software is loading. Something like that.
I've heard of using .img, .lst and just plain files (files without extensions), just like "KonBoot" does (just three simple files).
Simple Thanks and Regards,
Brandon T. H.
Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst).
Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison
|
|
|
|
|
Brandon T. H. wrote: I would like to know of any software, books or resources
There are some articles[^] here on CodeProject that discuss building your own OS; no doubt they will contain sections on bootstrapping. You can also use Google which will probably have thousands of references.
|
|
|
|
|
hi,
below is the complete code that i have developed using opencv with MFC in vs2008. it builds fine and after debugging it shows two different windows, one containing image and other containing static boxes. the purpose of this code is to display image coordinates (x,y) in static boxes but when i double click on the image window (which is my mouse event), values of (x,y) coordinates are not displayed in the static boxes (static boxes are in the separate window). please pardon my mistakes.
#include "stdafx.h"
#include "opencv01.h"
#include "opencv01Dlg.h"
#include "highgui.h"
#include "afxwin.h"
#include "cv.h"
#include "math.h"
#include<stdlib.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
void on_mouse( int evt, int x, int y, int flags, void* param );
HWND hwnd;
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
enum { IDD = IDD_ABOUTBOX };
protected:
virtual void DoDataExchange(CDataExchange* pDX);
protected:
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
END_MESSAGE_MAP()
Copencv01Dlg::Copencv01Dlg(CWnd* pParent )
: CDialog(Copencv01Dlg::IDD, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void Copencv01Dlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(Copencv01Dlg, CDialog)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
END_MESSAGE_MAP()
BOOL Copencv01Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
SetIcon(m_hIcon, TRUE);
SetIcon(m_hIcon, FALSE);
AfxBeginThread(MyThreadProc, this);
return TRUE;
}
UINT Copencv01Dlg::MyThreadProc(LPVOID pParam)
{
Copencv01Dlg * me = (Copencv01Dlg *)pParam;
me->MyThreadProc();
return TRUE;
}
void Copencv01Dlg::MyThreadProc()
{
IplImage* img = cvLoadImage("box.png", CV_WINDOW_AUTOSIZE);
cvNamedWindow("map", 0);
cvShowImage("map", img);
cvSetMouseCallback("map", on_mouse, NULL);
cvWaitKey(0);
cvReleaseImage(&img);
cvDestroyWindow("map");
}
void Copencv01Dlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
void Copencv01Dlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this);
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
HCURSOR Copencv01Dlg::OnQueryDragIcon()
{
return static_cast<HCURSOR>(m_hIcon);
}
void on_mouse( int evt, int x, int y, int flags, void* param )
{
CString xaxis, yaxis;
if (evt == CV_EVENT_LBUTTONDBLCLK)
{
xaxis.Format(_T("%d"), x);
yaxis.Format(_T("%d"), y);
SetDlgItemText(hwnd, IDC_Blue, xaxis);
SetDlgItemText(hwnd, IDC_Green, yaxis);
}
}
Jawad
|
|
|
|
|
Use your debugger to check that your mouse event handler gets called when you double click it. Looking at this code it seems to be somewhat complicated by using opencv and MFC; I wonder why you do not just use MFC on its own?
|
|
|
|
|
i have checked it with some other examples. works fine. but for this program it does not display the coordinates in static boxes. am i defining the handle HWND hwnd correctly??
|
|
|
|
|
jawadali477 wrote: am i defining the handle HWND hwnd correctly?
Yes, but you do not initialise it anywhere. In any case you do not need this variable as you already have the pre-defined CWnd::m_hWnd [^] variable which contains the handle to your object's window.
|
|
|
|
|
can you please elaborate it because i didn't get your point i.e
"pre-defined CWnd::m_hWnd[^] variable which contains the handle to your object's window."
you see, i'm not good in programming with handles.
|
|
|
|
|
The pre-defined variable m_hWnd already holds the handle to the window of the dialog, so that is the one to use in your calls to SetDlgItemText() .
jawadali477 wrote: i'm not good in programming with handles. This is something you need to study as it is fairly key to the whole Windows framework.
|
|
|
|
|
thank you Richard MacCutchan for your replies.
i did use m_hWnd in SetDlgItemText() in first place, but at that time it gave the error as m_hWnd :undeclared identifier . you see i'm using a thread to call mouse function. do i need to redefine m_hWnd ?? if yes, where??
|
|
|
|
|
If your mouse handler is not part of the dialog class then you need to store m_hWnd into a global variable in your OnInitDialog() method. I wonder, however, why you think it necessary to run this in a separate thread and why you are using opencv, when you could accomplish your goal with a much simpler MFC based application.
|
|
|
|
|
thank you Richard MacCatchan for replies.
i have implemented MFC based application using picture control. i have included bitmap image in picture control and have defined subclass where i have used OnLButtonDblClk to get the co-ordinates of picture control (not image u know) in static box. and it works fine. but i have some questions and need help.
1. how to implement zoom in/out an the scroll option (for large image sizes)?
2. when applying zoom in/out, will the pixel co-ordinates change (i mean if a point is lying on say (x,y) in picture control before zoom in what will happen to its co-ordinates after zoom in)?
Regards
JAwad
|
|
|
|