control RESOURCE definition
-
For the class parameter the documentation says a redefined name (not sure what that means) the reason I am asking I am using a control for which I have a specific WNDCLASS which I registered however the CDialog::Create fails with that control statement in the resource definition Thanks
-
For the class parameter the documentation says a redefined name (not sure what that means) the reason I am asking I am using a control for which I have a specific WNDCLASS which I registered however the CDialog::Create fails with that control statement in the resource definition Thanks
-
For the class parameter the documentation says a redefined name (not sure what that means) the reason I am asking I am using a control for which I have a specific WNDCLASS which I registered however the CDialog::Create fails with that control statement in the resource definition Thanks
As Richard said, we need more information: - what is "the class parameter"? - what is "the documentation" you are referring to? - what is "the CDialog::Create"? - also: in what way does it "fail"? Is there a compiler, linker or run-time error, and what does it say? Or does you program not behave in the expected way - if so, how, and what did you expect? You are apparently referring to very specific things, but we have no idea what you're seeing or reading. (or whether that is relevant information to start with)
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
-
As Richard said, we need more information: - what is "the class parameter"? - what is "the documentation" you are referring to? - what is "the CDialog::Create"? - also: in what way does it "fail"? Is there a compiler, linker or run-time error, and what does it say? Or does you program not behave in the expected way - if so, how, and what did you expect? You are apparently referring to very specific things, but we have no idea what you're seeing or reading. (or whether that is relevant information to start with)
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
Here are the resource statements Here is the call The resource in question is IDC_CUSTOM5 Fail means that when I comment out that CONTROL staement tracing my code the create goes to my
OnInitDialog
my question is in the class parm of the resource control can it be my own class which I register at run time via RegesterClass thank you
BOOL ret2 = drivestorage->Create(IDD_DIALOG10, m_pMainWnd);
IDD_DIALOG10 DIALOGEX 0, 0, 769, 429
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Storage View / Change"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CTEXT "",IDC_TCB,45,30,47,8
CTEXT "OwnIng TCB",IDC_STATIC,41,13,58,8
CTEXT "",IDC_SP,164,28,43,8
CTEXT "Storage SubPool",IDC_STATIC,162,12,55,8
CTEXT "",IDC_ASID,265,26,32,8
CTEXT "Asid",IDC_STATIC,269,9,31,8
CTEXT "",IDC_FP,399,31,19,8
CTEXT "Fetch Protect Key",IDC_STATIC,392,15,63,8
CONTROL "",IDC_CUSTOM5,"PieCOntrol",WS_TABSTOP,617,99,109,109
COMBOBOX IDC_COMBO1,491,236,48,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_EDIT2,"RichEdit20A",ES_MULTILINE | WS_BORDER | WS_TABSTOP, 45,106,494,314
EDITTEXT IDC_EDIT1,45,110,494,314,ES_AUTOHSCROLL
COMBOBOX IDC_COMBO2,637,244,67,16,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LISTBOX IDC_LIST2,641,310,68,11,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END -
For the class parameter the documentation says a redefined name (not sure what that means) the reason I am asking I am using a control for which I have a specific WNDCLASS which I registered however the CDialog::Create fails with that control statement in the resource definition Thanks
You may want to look at this Joe Newcomer's essay: [Self-Registering Window Classes](http://www.flounder.com/selfregister.htm)
-
You may want to look at this Joe Newcomer's essay: [Self-Registering Window Classes](http://www.flounder.com/selfregister.htm)
-
Here are the resource statements Here is the call The resource in question is IDC_CUSTOM5 Fail means that when I comment out that CONTROL staement tracing my code the create goes to my
OnInitDialog
my question is in the class parm of the resource control can it be my own class which I register at run time via RegesterClass thank you
BOOL ret2 = drivestorage->Create(IDD_DIALOG10, m_pMainWnd);
IDD_DIALOG10 DIALOGEX 0, 0, 769, 429
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Storage View / Change"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CTEXT "",IDC_TCB,45,30,47,8
CTEXT "OwnIng TCB",IDC_STATIC,41,13,58,8
CTEXT "",IDC_SP,164,28,43,8
CTEXT "Storage SubPool",IDC_STATIC,162,12,55,8
CTEXT "",IDC_ASID,265,26,32,8
CTEXT "Asid",IDC_STATIC,269,9,31,8
CTEXT "",IDC_FP,399,31,19,8
CTEXT "Fetch Protect Key",IDC_STATIC,392,15,63,8
CONTROL "",IDC_CUSTOM5,"PieCOntrol",WS_TABSTOP,617,99,109,109
COMBOBOX IDC_COMBO1,491,236,48,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_EDIT2,"RichEdit20A",ES_MULTILINE | WS_BORDER | WS_TABSTOP, 45,106,494,314
EDITTEXT IDC_EDIT1,45,110,494,314,ES_AUTOHSCROLL
COMBOBOX IDC_COMBO2,637,244,67,16,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LISTBOX IDC_LIST2,641,310,68,11,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
ENDForNow wrote:
can it be my own class which I register at run time via RegesterClass
I am not sure as I have never tried that. The documentation at CONTROL control - Win32 apps | Microsoft Docs[^] states (although it is slightly ambiguous) that it must be one of the predefined classes. If your code is failing when you try it with a locally defined class then you need to use the debugger to find out why.
-
ForNow wrote:
can it be my own class which I register at run time via RegesterClass
I am not sure as I have never tried that. The documentation at CONTROL control - Win32 apps | Microsoft Docs[^] states (although it is slightly ambiguous) that it must be one of the predefined classes. If your code is failing when you try it with a locally defined class then you need to use the debugger to find out why.
I think the documentation means you have to Register the Class before calling CDialog::Create as I remember I forgot to call AfxInitRichEdit before doing a CDialog::Create and it failed I think CDialog::Create Checks Uid template dialog resource and sees if the classes are registered Thanks you
-
I think the documentation means you have to Register the Class before calling CDialog::Create as I remember I forgot to call AfxInitRichEdit before doing a CDialog::Create and it failed I think CDialog::Create Checks Uid template dialog resource and sees if the classes are registered Thanks you
-
Here are the resource statements Here is the call The resource in question is IDC_CUSTOM5 Fail means that when I comment out that CONTROL staement tracing my code the create goes to my
OnInitDialog
my question is in the class parm of the resource control can it be my own class which I register at run time via RegesterClass thank you
BOOL ret2 = drivestorage->Create(IDD_DIALOG10, m_pMainWnd);
IDD_DIALOG10 DIALOGEX 0, 0, 769, 429
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Storage View / Change"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CTEXT "",IDC_TCB,45,30,47,8
CTEXT "OwnIng TCB",IDC_STATIC,41,13,58,8
CTEXT "",IDC_SP,164,28,43,8
CTEXT "Storage SubPool",IDC_STATIC,162,12,55,8
CTEXT "",IDC_ASID,265,26,32,8
CTEXT "Asid",IDC_STATIC,269,9,31,8
CTEXT "",IDC_FP,399,31,19,8
CTEXT "Fetch Protect Key",IDC_STATIC,392,15,63,8
CONTROL "",IDC_CUSTOM5,"PieCOntrol",WS_TABSTOP,617,99,109,109
COMBOBOX IDC_COMBO1,491,236,48,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_EDIT2,"RichEdit20A",ES_MULTILINE | WS_BORDER | WS_TABSTOP, 45,106,494,314
EDITTEXT IDC_EDIT1,45,110,494,314,ES_AUTOHSCROLL
COMBOBOX IDC_COMBO2,637,244,67,16,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LISTBOX IDC_LIST2,641,310,68,11,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
ENDI've never tried it so I'm not sure exactly how it works but I notice a rather strange capitalization in you class name:
"PieCOntrol"
. I don't know if Windows is case sensitive or not when looking for class name.Mircea
-
I've never tried it so I'm not sure exactly how it works but I notice a rather strange capitalization in you class name:
"PieCOntrol"
. I don't know if Windows is case sensitive or not when looking for class name.Mircea
-
I've never tried it so I'm not sure exactly how it works but I notice a rather strange capitalization in you class name:
"PieCOntrol"
. I don't know if Windows is case sensitive or not when looking for class name.Mircea
According to this discussion: [winapi - Are Windows window classes case-sensitive? - Stack Overflow](https://stackoverflow.com/questions/7928592/are-windows-window-classes-case-sensitive) and the link to [About Atom Tables - Win32 apps | Microsoft Docs](https://docs.microsoft.com/en-us/windows/win32/dataxchg/about-atom-tables?redirectedfrom=MSDN) the window class name is case insensitive.