|
WinForms, AFAIK, are tied to the .NET platform beyond all hope, so if C# is not an option for you you might need to resort to Managed C++ or some sort of mixed-language solution to use them.
Qt (see www.trolltech.com[^]) has a reputation as a well-designed, cross-platform GUI framework, but I don't have the slightlest idea whether some visual tool is provided to automate QT coding --as far as I know, you've got to write everything by hand.
I'm a long time MFC coder, and seems to me that it can suit your needs perfectly if you're not going to go beyond simple forms as you say. Probably its main advantage is immediate availability with Visual Studio, though. I'd say you're better off learning the basics of dialog-based MFC apps (tons of tutorials, many of them here at CP), once you master these youll be able to quickly concentrate on the real stuff with little or no dependency on the GUI part.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
SteveTheTechWriter wrote:
At the time I swore off of MFC, which a friend has described as "building a house using toothpicks"
Why, from the advice of one person, have you "sworn-off" MFC? Why would it be like building a house using toothpicks? I'm sure there are far more development hours behind the MFC toothpicks then there would be behind writing your own controls and classes using pure API.
And you think VB is any better?
It's kinda like the matrix: once you get used to it you won't miss the GUI designer much at all. You'll start seeing layout algorithms in your sleep and will be creating controls dynamically before you know it. Try it, you'll like it.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
No, sorry, I won't like it. I mentioned the quote from my friend only because I think it's both funny and true. But I spent a full year working through two books on MFC, and working closely with the tools and code involved -- and I hated it. If GUI design can be made simple and painless in Visual Basic, I see no inherent reason the same thing cannot be done for C++.
So far, based on feedback I'm getting in various newsgroups and here, it seems my best bet for now is to stick with Borland's C++ Builder 6. I certainly have not heard anyone say that C++ .Net offer's GUI-design features similar to those in VB.
Steve O.
|
|
|
|
|
HELLO,
I want to make an installation package for my application developed in VC++ 6.0(MFC).It's a database application using ADO.PLEASE help me.is there any special component required for mshflexgrid activexcontrol
Manas
|
|
|
|
|
There is a file that you need to distribute in order to use mshflexgrid control. It is called MSHFlxGd.ocx and you can find it in your windows system folder. Make sure that you register it by writing regsvr32 MSHFlxGd.ocx in the command prompt.
// Afterall, I realized that even my comment lines have bugs
If the sun were to blow up, it would take us 7-8 minutes to realize it.
|
|
|
|
|
run depends as well
Best Wishes,
ez_way
|
|
|
|
|
I found out how to turn my MDI into a text interface, but using this:
#include <afxrich.h>
class CFDPViewRE : public CRich2EditView
{
protected:
CFDPViewRE(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CFDPViewRE)
public:
virtual void OnInitialUpdate();
protected:
virtual ~CFDPViewRE();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
DECLARE_MESSAGE_MAP()
};
For some damn reason, it by default is always bold, if I write in comands for a bold button, then you can highlight text and un bold it, or click the bold button and type non bold text, but when you open the program, the bold button is already checked. I take out all of the code for bold from my program, and still the text is bold. Therefor I started from scratch. The above is all I have really other than the supporting .h file that has no refrences whatsoever to bold or weight or font. I for the life of me can't figure out how to get it so it isn't bold font. Maybe I need to use another type of text thing other than rich text, but I don't know much about this stuff yet. Any ideas?
LOSTTWARE.com
|
|
|
|
|
how can i get the format of file *.wab (address book)
|
|
|
|
|
Easy check this console app out, It will explain all.
// main.h
#include <<windows.h>> //sorry for the double but I could not get singles to take.
#include <<crtdbg.h>>
#include <<iostream.h>>
#include <wab.h>
typedef HRESULT (WINAPI *fWABOpen)(LPADRBOOK*,LPWABOBJECT*,LPWAB_PARAM,DWORD);
int main()
{
HRESULT hRes;
LPADRBOOK lpAdrBook;
LPWABOBJECT lpWABObject;
LPWAB_PARAM lpWABParam = NULL;
DWORD Reserved2 = NULL;
HINSTANCE hinstLib;
hinstLib = LoadLibrary("C:\\Program Files\\Common Files\\System\\wab32");
fWABOpen procWABOpen;
if (hinstLib != NULL)
{
procWABOpen = (fWABOpen) GetProcAddress(hinstLib, "WABOpen");
if (procWABOpen != NULL)
{
hRes = (procWABOpen)(&lpAdrBook,&lpWABObject,NULL,Reserved2);
_ASSERTE(hRes == S_OK);
if (hRes != S_OK) exit(1);
//lpWABObject->Find(lpAdrBook,NULL);
ULONG lpcbEntryID;
ENTRYID *lpEntryID;
hRes = lpAdrBook->GetPAB(
&lpcbEntryID,
&lpEntryID
);
_ASSERTE(hRes == S_OK);
if (hRes != S_OK) exit(2);
ULONG ulFlags = MAPI_BEST_ACCESS;
ULONG ulObjType = NULL;
LPUNKNOWN lpUnk = NULL;
hRes = lpAdrBook->OpenEntry(
lpcbEntryID,
lpEntryID,
NULL,
ulFlags,
&ulObjType,
&lpUnk
);
ulFlags = NULL;
//IABTable *lpTable;
if (ulObjType == MAPI_ABCONT)
{
IABContainer *lpContainer = static_cast <iabcontainer *="">(lpUnk);
LPMAPITABLE lpTable = NULL;
hRes = lpContainer->GetContentsTable(
ulFlags,
&lpTable
);
_ASSERT(lpTable);
ULONG ulRows;
hRes = lpTable->GetRowCount(0,&ulRows);
_ASSERTE(hRes == S_OK);
cout << "Rows " << ulRows << endl;
SRowSet *lpRows;
hRes = lpTable->QueryRows(
ulRows, // Get all Rows
0,
&lpRows
);
for(ULONG i=0;i<lprows->cRows;i++)
{
SRow *lpRow = &lpRows->aRow[i];
cout << i << " : " << lpRow->cValues << endl;
for(ULONG j=0;j<lprow->cValues;j++)
{
SPropValue *lpProp = &lpRow->lpProps[j];
cout << "\t" << j << " : " << (void*)lpProp->ulPropTag << " : ";
if (lpProp->ulPropTag == PR_DISPLAY_NAME_A)
cout << "Display Name: " << lpProp->Value.lpszA;
if (lpProp->ulPropTag == PR_EMAIL_ADDRESS_A)
cout << "Email Address: " << lpProp->Value.lpszA;
if (lpProp->ulPropTag == PR_NICKNAME_A)
cout << "Nickname: " << lpProp->Value.lpszA;
if (lpProp->ulPropTag == PR_ADDRTYPE_A)
cout << "Addrtype: " << lpProp->Value.lpszA;
cout << endl;
}
lpWABObject->FreeBuffer(lpRow);
}
lpWABObject->FreeBuffer(lpRows);
}
}
FreeLibrary(hinstLib);
}
return 0;
}
Best Wishes,
ez_way
|
|
|
|
|
This site keeps a list of many file formats.
http://www.wotsit.org/[^]
Roger Allen
Sonork 100.10016
Death come early, death come late,
It takes us all, there is no reason.
For every purpose under heaven,
To each a turn, to each a season.
A time to weep and a time to sigh,
A time to laugh and a time to cry,
A time to be born and a time to die.
Dust to dust and ashes to ashes,
And so I end my song.
|
|
|
|
|
Hello,
I need to play an avi file in my program using the media player activex control.I need to be able to indicate a starting frame and an end frame that the control will stop playing after reaching it.
Thanks in advance
|
|
|
|
|
Hail, dear colleagues.
I have a question about object identity.
Let's say I need to make an array of some objects. These objects (classes) will be defined by users of the library. So, I have to provide a base class with an interface and create an array of these objects. It's clear.
But when user creates a derived class and wants to get an object from the array, he should know about type of this object to be able to cast it back, because in this array objects of different types can be stored.
So, the question is, how to define identity of derived class? Should I implement something like IsKindOf() method and use runtime identification, like in MFC, or there are other ways to do so?
I have to mention that the only extension, which can be used, is STL. No MFC, nor any other platform depended libraries.
Thank you in advance for any suggestions.
|
|
|
|
|
Hail to you too, comrade.
The C++ standard provides something to solve this in the form of Run-Time Type Information (RTTI). For a starter you can look here[^]
|
|
|
|
|
I need to get all mountpoints of a partition (like D:\)
What i have is the physical drive id (e.g. "\\.\PhysicalDrive0") and the partition id.
The problem is that that i need to find out the unique volume name in the form "\\?\Volume{GUID}\" in order to be able to use the VolumeManagement functions. The problem is that i don't have the partition's drive name name and drives don't even have to be mounted. So what can i do to get the partition's GUID?
I could do it using DeviceIoControl with IOCTL_DISK_GET_PARTITION_INFO_EX but that's only XP and later and i need it to be working on 2k too.
If anyone has an idea, please let me know
Regards
webseek
|
|
|
|
|
Hi can u please tell me how to create ico file or what structure it has?
Thanks
|
|
|
|
|
Visual C++ 6.0 can create them, or a graphics prog like Xnview http://www.xnview.com/[^]
Try www.wotsit.org[^] for the ICO file format
"The greatest mistake you can make in life is to be continually fearing you will make one." - Elbert Hubbard
|
|
|
|
|
Thx, but i need to do this manually in my program.
|
|
|
|
|
In that case look at wotsit.org for the ICO file format and DIY or serch for a freware library.
"The greatest mistake you can make in life is to be continually fearing you will make one." - Elbert Hubbard
|
|
|
|
|
Thanks
|
|
|
|
|
I use EnumDisplaySettingsEx in my program,but it doesn't work ,just say undefined.
I think it maybe require defining of winver 0x0500,but it is still not work after I added the definition.
please give me some suggestion or sample .
thank you!
Happy Gemini
|
|
|
|
|
What kind of OS do you have?
I created a simple win32 app and put the following code in InitInstance.
DEVMODE xDeviceInfo;
xDeviceInfo.dmSize = sizeof(DEVMODE);
EnumDisplaySettingsEx(NULL, ENUM_CURRENT_SETTINGS, &xDeviceInfo, 0);
Works without any problems, gives device name and all current vmode related info.
On W2K, VS.NET 2003
Hope it'll help.
|
|
|
|
|
My application is based on win2k + VC6.
someone suggestion me to download latest version of the SDK,but I don't know which one I should download,please give me some suggestion or link if you know.
Happy Gemini
|
|
|
|
|
Download the latest Platform SDK.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi!
I am trying to use checkboxes in a CListCtrl. To simplify handling of the control, I've written the following short code:
void CGeneratorDlg::_SetCheck(int inxItem, BOOL bEnable)
{
LV_ITEM _ms_lvi;
_ms_lvi.stateMask = LVIS_STATEIMAGEMASK;
_ms_lvi.state = (UINT)(((int)(bEnable) + 1) << 12);
m_cList.SendMessage(LVM_SETITEMSTATE, (WPARAM)inxItem,
(LPARAM)(LV_ITEM FAR *)&_ms_lvi);
}
BOOL CPwGeneratorDlg::_GetCheck(int inxItem)
{
return ((((UINT)(m_cList.SendMessage(LVM_GETITEMSTATE, (WPARAM)inxItem,
LVIS_STATEIMAGEMASK))) >> 12) - 1);
} Those 2 functions seem to work nice but unfortunately when I call them in the OnInitDialog function they do nothing:
for(int i = 0; i < m_cList.GetItemCount(); i++)
_SetCheck(i, TRUE); This should check all checkboxes in the list. I do this in OnInitDialog function but it does just plain nothing. The checkboxes remain unchecked.
Any idea how to check the checkboxes in OnInitDialog?
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
|