Click here to Skip to main content
16,013,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: pointer to an array... "char" Pin
Nish Nishant29-May-02 15:27
sitebuilderNish Nishant29-May-02 15:27 
GeneralRe: pointer to an array... "char" Pin
Christian Graus29-May-02 15:48
protectorChristian Graus29-May-02 15:48 
GeneralRe: pointer to an array... "char" Pin
Orbital^29-May-02 21:19
Orbital^29-May-02 21:19 
GeneralRe: pointer to an array... "char" Pin
SilverShalkin30-May-02 2:38
SilverShalkin30-May-02 2:38 
GeneralFlexGrid Sort Pin
29-May-02 13:31
suss29-May-02 13:31 
GeneralRe: FlexGrid Sort Pin
Christian Graus29-May-02 15:09
protectorChristian Graus29-May-02 15:09 
GeneralRe: FlexGrid Sort Pin
29-May-02 15:38
suss29-May-02 15:38 
GeneralCreate form controls at runtime Pin
Aaron Schaefer29-May-02 12:55
Aaron Schaefer29-May-02 12:55 
Hi All,

A Quick question. I am trying to create controls on a form at run time, in a CFormView derived class. I have got the following code, which is trying to create a static label on the form, that should display the word "Test". I got the styles and extended styles for the window from looking at another static labels properties in Spy++. This is in my CFormView derived class's OnInitialUpdate:

HWND hWndTest = CreateWindowEx(
WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR | WS_EX_NOPARENTNOTIFY, // extended window style
"Static", // registered class name
"Test", // window name
WS_VISIBLE | WS_CHILDWINDOW | WS_GROUP | SS_LEFT, // window style
30, // horizontal position of window
30, // vertical position of window
40, // window width
20, // window height
m_hWnd, // handle to parent or owner window
NULL, // menu handle or child identifier
NULL, // handle to application instance
NULL // window-creation data
);

The thing is, I get a static label on the form, that is in fact displaying the word "Test", but it looks different than the static labels that I put on the dialog template. The font is bold, or something.

Anybody ever done this before? Why would this produce a different lookin label than doing it the normal way?

Thanks,

Aaron
GeneralRe: Create form controls at runtime Pin
Matt Gullett29-May-02 12:52
Matt Gullett29-May-02 12:52 
GeneralRe: Create form controls at runtime Pin
Aaron Schaefer29-May-02 13:09
Aaron Schaefer29-May-02 13:09 
Generalfstream issues Pin
Alan Chambers29-May-02 10:45
Alan Chambers29-May-02 10:45 
GeneralRe: fstream issues Pin
Joaquín M López Muñoz29-May-02 11:12
Joaquín M López Muñoz29-May-02 11:12 
GeneralRe: fstream issues Pin
Alan Chambers29-May-02 11:21
Alan Chambers29-May-02 11:21 
GeneralProblem converting a CComBSTR to LPCTSTR with CW2CT Pin
JC Gauthier29-May-02 10:24
JC Gauthier29-May-02 10:24 
GeneralRe: Problem converting a CComBSTR to LPCTSTR with CW2CT Pin
soptest29-May-02 12:25
soptest29-May-02 12:25 
GeneralRe: Problem converting a CComBSTR to LPCTSTR with CW2CT Pin
JC Gauthier30-May-02 4:27
JC Gauthier30-May-02 4:27 
GeneralRe: Problem converting a CComBSTR to LPCTSTR with CW2CT Pin
soptest30-May-02 8:36
soptest30-May-02 8:36 
General_popen issue Pin
Stew29-May-02 9:41
Stew29-May-02 9:41 
GeneralRe: _popen issue Pin
Joaquín M López Muñoz29-May-02 9:46
Joaquín M López Muñoz29-May-02 9:46 
GeneralRe: _popen issue Pin
soptest29-May-02 9:56
soptest29-May-02 9:56 
GeneralWeird Keyboard Hooking Issue Pin
John Aldrich29-May-02 9:02
John Aldrich29-May-02 9:02 
GeneralRe: Weird Keyboard Hooking Issue Pin
Joaquín M López Muñoz29-May-02 9:34
Joaquín M López Muñoz29-May-02 9:34 
GeneralI think I got it now Pin
Joaquín M López Muñoz29-May-02 9:40
Joaquín M López Muñoz29-May-02 9:40 
GeneralMeasureItem doesn't get called. Pin
29-May-02 9:07
suss29-May-02 9:07 
GeneralRe: MeasureItem doesn't get called. Pin
Paul M Watt29-May-02 9:22
mentorPaul M Watt29-May-02 9:22 

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.