|
There's no generated code. The dialog layout is defined by so-called 'dialog template' stored in program resources. When you invoke dialog box, Win32 API (not MFC) creates the dialog box and populates it with controls.
The code you'll see in MFC app is responsible for creating CWnd-derived objects mapped to their Win32 API counterparts (HWNDs). Look in DoDataExchange for this.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
if u want to just change the style do this:
m_cListCtrl.ModifyStyle(0, LVS_REPORT);
in the constuctor or initdialog();:
Ashok Singh
<west end="" india="">
|
|
|
|
|
Hi
another question
why don't the following code compile?
extern CFile cfile;
void *data;
CFile::Open(m_Pathname1,modeRead);
data = cfile.Read(0,cfile.GetLength());
i get the error:
error C2440: '=' : cannot convert from 'unsigned int' to 'void *'
Conversion from integral type to pointer type requires einterpret_cast, C-style cast or function-style cast
(BTW, what does extern do! Otherwise CFile::Read(etc) also works)
thanks
|
|
|
|
|
extern CFile cfile;
CFile::Open(m_Pathname1,modeRead);
DWORD dwFileLength = cfile.GetLength();
BYTE *data = new BYTE[dwFileLength];
DWORD dwBytesRed = cfile.Read(data,dwFileLength);
Martin
--------------------------------------------
C'mon we all know computers are experimental devices and should only be used for playing games.
Using them for alternative stuff like business, is clearly not using them for what they are intended.
Colin Davies
|
|
|
|
|
tx, this works
what does BYTE *data = new BYTE[dwFileLength] do?
|
|
|
|
|
It allocates memory to hold data from the file. When you will finish using it, then you have to free that memory with:
delete [] data;
I think you have to read little bit more about C++.
Martin
--------------------------------------------
C'mon we all know computers are experimental devices and should only be used for playing games.
Using them for alternative stuff like business, is clearly not using them for what they are intended.
Colin Davies
|
|
|
|
|
|
Jenny2 wrote:
ok hero
Martin
--------------------------------------------
C'mon we all know computers are experimental devices and should only be used for playing games.
Using them for alternative stuff like business, is clearly not using them for what they are intended.
Colin Davies
|
|
|
|
|
I am trying to write two classes that work togeather. One is a color storage class (CSoilColor) and a lookup table class (CColorChart). When I added a member variable to CSoilColor to hold a pointer to a CColorChart object, the compiler choked. Each header file has an include to each other so they should recognize each other, but from the error they apparently do not. Even though the comiler chokes, the development environment recognizes the CColorChart member variable because it allows me access to the CColorChart's members in the CSoilColor's cpp file.
Here are the class definitions:
#include "SoilColor.h"
class CColorChart
{
public:
bool IsValidColor(int nHue, int nValue, int nChroma);
bool GetHue(int nHueID, CString& sHueName);
bool GetRGBcolor(CSoilColor SC, COLORREF* RGBcolor);
void InitChart();
bool GetColorName(int nHue, int nValue, int Chroma, CString& sColorName);
CColorChart();
virtual ~CColorChart();
private:
CString Hue[nMAXHUES];
COLORCHART Chart[nMAXHUES][nMAXVALUES][nMAXCHROMAS];
};
=====================================================
#include "ColorChart.h"
class CSoilColor
{
public:
CSoilColor();
virtual ~CSoilColor();
int GetChroma();
int GetValue();
int GetHue();
COLORREF GetRGBcolor();
bool SetColor(int nHue, int nValue, int nChroma);
private:
CColorChart* m_pColorChart; //ERROR HERE
int m_nHue;
int m_nValue;
int m_nChroma;
};
I think it is probably a simple error, but I am going crazy trying to find it! If anyone has Ideas, please let me know. Thank You.
|
|
|
|
|
Use forward declaration instead of #include:
class CColorChart;
class CSoilColor
{
...
CColorChar *m_pColorChart;
};
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Now that you mention it I did know that at one point.
Thank you very much.
|
|
|
|
|
hi
if i work in VC for a while, i am unable to access the toolbar list that appears whenever you type something like CString p.
is it lack of memory? If i restart my PC it works again...
tx
|
|
|
|
|
Simple answer:
VC is screwy, and has a habit of doing that just to annoy you
usually it'll stop working if there is a syntax error somewhere in your code.
Visual Assist (http://www.wholetomato.com/[^]) is a handy Visual Studio addin that fixes lots of these problems
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
benjymous wrote:
http://www.wholetomato.com
Where does that obsession from different kind of fruits and vegetables come from?
Martin
--------------------------------------------
C'mon we all know computers are experimental devices and should only be used for playing games.
Using them for alternative stuff like business, is clearly not using them for what they are intended.
Colin Davies
|
|
|
|
|
The phrase "Help me! I'm turning into a grapefruit!" was something utterly non-sensical that I picked up the top of my head to go as the text to a scrolly screensaver on my University Linux account. It drew lots of amusement from people who saw it, so it ended up as my email sig as well (and eventually when I came to create a decent website for myself, I thought up the name "grapefruitopia" as it rolls off the tongue nicely, is pretty bizarre, but easy to remember.)
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
When Intellisense stops working, it's usually due to a syntax error earlier in the function. However, I have seen it just stop showing the popup list (the VC status bar indicates that Intellisense is otherwise operating fine), and in that case just close & restart VC.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Do you know why is that every time that i use this code the intelisense stops working. (the code work just fine)
rs->Open(_variant_t(sql), conn.GetInterfacePtr(), adOpenDynamic, adLockOptimistic,adCmdText);
Casa.Sapo.pt
|
|
|
|
|
I need to develop an application that performs a query on
a database and stores the query output in an Excel document.
How can I develop the Excel document management (file creation
and data storage) ?
Thanks a lot
|
|
|
|
|
You need to use Ole Automation....
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Use DAO, ODBC (.csv, .xls)
Or export to the Excel xml file format (you'll get the reference with this key search on MSDN : "Microsoft Office Drawing File Format". Using xml allows you to create charts or pivot tables as well.
And if you need the .xls format itself, yes the simplest way to do it is through Automation, at least if you are running Windows.
Final point, you may buy a finished product (softartisan).
Or crack the binary file format.
And I swallow a small raisin.
|
|
|
|
|
|
Hi,
how can i catch Scroll Mouse events (like OnVScroll) in my ListControl ?
Marco
|
|
|
|
|
derive your own class from CListCtrl (if you're using MFC) and add a message handler for WM_VSCROLL.
in plain win32 you will need to replace the default listctrl window proc with your own and handle WM_VSCROLL manually.
|
|
|
|
|
Thanxs,
can u give me the some more implementation hints, because i don't know such
message related thinks ?
Marco
|
|
|
|
|
What means "SVR4 system"?
Hi, everyone!
The following statements are taken from a C/C++
project.
--------
/* some SVR4 systems omit an underscore */
--------
What means "SVR4" system? I use Google to search
but failed to connect. Anyone knows?
Cheers,
George
|
|
|
|