Click here to Skip to main content
16,006,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: disable individual rows of a listctrl Pin
Swinefeaster11-Nov-02 14:08
Swinefeaster11-Nov-02 14:08 
GeneralRe: disable individual rows of a listctrl Pin
fordge11-Nov-02 20:37
fordge11-Nov-02 20:37 
GeneralRe: disable individual rows of a listctrl Pin
Swinefeaster11-Nov-02 20:40
Swinefeaster11-Nov-02 20:40 
GeneralRe: disable individual rows of a listctrl Pin
Michael Dunn11-Nov-02 16:55
sitebuilderMichael Dunn11-Nov-02 16:55 
GeneralRe: disable individual rows of a listctrl Pin
Anonymous11-Nov-02 20:38
Anonymous11-Nov-02 20:38 
GeneralCannot figure it out Pin
ed987111-Nov-02 13:01
ed987111-Nov-02 13:01 
GeneralRe: Cannot figure it out Pin
Christian Graus11-Nov-02 17:19
protectorChristian Graus11-Nov-02 17:19 
GeneralCLabel control with property sheet question Pin
DalTXColtsFan11-Nov-02 12:53
sussDalTXColtsFan11-Nov-02 12:53 
Greetings all,

I have a question. I'm using Norm Almond's CLabel control on a Property Page. I want to allow the user to select some colors and then have a rectangle on the dialog with the color the user chose. It was working perfectly as a CDialog.

What's happening now is I'm trying to make that dialog a PropertyPage as part of a PropertySheet. Here are the changes I made to InitInstance:


BOOL CPropertySheetDemoApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.

/*CPropertySheetDemoDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}*/

CPropertySheet mySheet;
CMyPropertyPage myDemoPage;
myDemoPage.m_lblTest.SetBkColor(RGB(1.0, 1.0, 1.0));
mySheet.AddPage(&myDemoPage);

mySheet.DoModal();

// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}


As you can see I just commented out the stuff to bring up the initial dialog and am trying to bring up the property sheet instead. The error I'm getting is a debug assertion failure in the UpdateSurface() method of the CLabel class. It seems to be complaining that the window hasn't been drawn or doesn't have an hWnd yet.

Any suggestions? I just want to be able to initialize the colors on the labels as they come up, and they may not always be the same colors.

I'd appreciate any suggestions!

Joe


GeneralCSocket::Receive (from more than one computer) Pin
Walote11-Nov-02 10:47
Walote11-Nov-02 10:47 
GeneralCString from a UI Thread Pin
Anonymous11-Nov-02 10:25
Anonymous11-Nov-02 10:25 
GeneralRe: CString from a UI Thread Pin
dabs11-Nov-02 10:39
dabs11-Nov-02 10:39 
GeneralRe: CString from a UI Thread Pin
Anonymous11-Nov-02 10:45
Anonymous11-Nov-02 10:45 
GeneralThis seemed to fix it.. weird Pin
Anonymous11-Nov-02 10:59
Anonymous11-Nov-02 10:59 
GeneralRe: Its not fixed Pin
Anonymous11-Nov-02 11:26
Anonymous11-Nov-02 11:26 
GeneralRe: CString from a UI Thread Pin
Swinefeaster11-Nov-02 14:07
Swinefeaster11-Nov-02 14:07 
GeneralRe: CString from a UI Thread Pin
peterchen11-Nov-02 14:18
peterchen11-Nov-02 14:18 
GeneralRe: CString from a UI Thread Pin
Anonymous11-Nov-02 14:56
Anonymous11-Nov-02 14:56 
GeneralRe: CString from a UI Thread Pin
Swinefeaster13-Nov-02 13:28
Swinefeaster13-Nov-02 13:28 
QuestionHow to check if my PopUp menu is shown? Pin
Daniel Strigl11-Nov-02 10:15
Daniel Strigl11-Nov-02 10:15 
AnswerRe: How to check if my PopUp menu is shown? Pin
567890123411-Nov-02 21:07
567890123411-Nov-02 21:07 
GeneralView Class information Pin
act_x11-Nov-02 10:13
act_x11-Nov-02 10:13 
GeneralRe: View Class information Pin
Dave Bryant11-Nov-02 13:22
Dave Bryant11-Nov-02 13:22 
GeneralShellExecute / Multi-Instances Pin
JoeSox11-Nov-02 10:10
JoeSox11-Nov-02 10:10 
GeneralRe: ShellExecute / Multi-Instances Pin
dabs11-Nov-02 11:06
dabs11-Nov-02 11:06 
GeneralRe: ShellExecute / Multi-Instances Pin
JoeSox12-Nov-02 3:58
JoeSox12-Nov-02 3:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.