Click here to Skip to main content
15,918,967 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralUnwanted color change when Edit box is ReadOnly Pin
Aidman30-Jul-03 7:07
Aidman30-Jul-03 7:07 
GeneralRe: Unwanted color change when Edit box is ReadOnly Pin
l a u r e n30-Jul-03 7:20
l a u r e n30-Jul-03 7:20 
GeneralRe: Unwanted color change when Edit box is ReadOnly Pin
Renjith Ramachandran30-Jul-03 8:13
Renjith Ramachandran30-Jul-03 8:13 
GeneralRe: Unwanted color change when Edit box is ReadOnly Pin
Aidman30-Jul-03 8:20
Aidman30-Jul-03 8:20 
GeneralRe: Unwanted color change when Edit box is ReadOnly Pin
John M. Drescher30-Jul-03 15:06
John M. Drescher30-Jul-03 15:06 
GeneralChild dialogs in Win32 Pin
bluecombtiller30-Jul-03 7:06
bluecombtiller30-Jul-03 7:06 
GeneralRe: Child dialogs in Win32 Pin
l a u r e n30-Jul-03 7:21
l a u r e n30-Jul-03 7:21 
GeneralRe: Child dialogs in Win32 Pin
bluecombtiller31-Jul-03 7:10
bluecombtiller31-Jul-03 7:10 
The hWnd is the HWND variable that the main window's WndProc message handler recieves.

In the switch statement for the various windows messages I basically have the following to create my UI:

case WM_CREATE:

HWND hCtrls;
// Listbox works
hCtrls = CreateWindowEx( WS_EX_CLIENTEDGE, "LISTBOX", "",
WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL,
5, 5, 200, 340, hWnd, (HMENU)IDC_GAMELISTBOX,
GetModuleHandle(NULL), NULL);

// Static frame works
hCtrls = CreateWindowEx( WS_EX_CLIENTEDGE, "STATIC", "",
WS_CHILD | ~WS_VISIBLE | SS_GRAYFRAME,
210, 5, 250, 340, hWnd, (HMENU)IDC_GAMEINFOFRAME,
GetModuleHandle(NULL), NULL);

// CreateDialog returns a NULL (IDD_GAMEINFO is my dialog resource)
hCtrls = CreateDialog( hInst, (LPCTSTR)IDD_GAMEINFO, hWnd,
(DLGPROC)DlgGameInfo );

// I also added this later to try it...but it didn't help:
ShowWindow( hCtrls, SW_SHOWNORMAL );
UpdateWindow( hCtrls );

I experimented a bit...the code with no modification works if I specify in the resource editor that the dialog is a regular popup with a border, etc. But of course then it's a popup...and I want it a part of the actually window. (Like a common control would be)
Thanks,
./[tiller]
GeneralRe: Child dialogs in Win32 Pin
andyj1151-Aug-03 4:30
andyj1151-Aug-03 4:30 
GeneralRe: Child dialogs in Win32 Pin
bluecombtiller1-Aug-03 9:13
bluecombtiller1-Aug-03 9:13 
GeneralDynamic array initialization. Pin
73Zeppelin30-Jul-03 6:37
73Zeppelin30-Jul-03 6:37 
GeneralRe: Dynamic array initialization. Pin
John M. Drescher30-Jul-03 6:39
John M. Drescher30-Jul-03 6:39 
GeneralRe: Dynamic array initialization. Pin
73Zeppelin30-Jul-03 6:49
73Zeppelin30-Jul-03 6:49 
GeneralRe: Dynamic array initialization. Pin
John M. Drescher30-Jul-03 6:54
John M. Drescher30-Jul-03 6:54 
GeneralMFC/ATL thread syncronization Pin
alma30-Jul-03 6:26
alma30-Jul-03 6:26 
GeneralRe: MFC/ATL thread syncronization Pin
John M. Drescher30-Jul-03 6:37
John M. Drescher30-Jul-03 6:37 
GeneralRe: MFC/ATL thread syncronization Pin
alma30-Jul-03 11:19
alma30-Jul-03 11:19 
GeneralAbstract Class Pin
Mahesh Varma30-Jul-03 5:43
Mahesh Varma30-Jul-03 5:43 
GeneralRe: Abstract Class Pin
#realJSOP30-Jul-03 5:47
professional#realJSOP30-Jul-03 5:47 
GeneralRe: Abstract Class Pin
Jonathan de Halleux30-Jul-03 5:49
Jonathan de Halleux30-Jul-03 5:49 
GeneralRe: Abstract Class Pin
ZoogieZork30-Jul-03 6:16
ZoogieZork30-Jul-03 6:16 
GeneralRe: Abstract Class Pin
John M. Drescher30-Jul-03 6:54
John M. Drescher30-Jul-03 6:54 
GeneralRe: Abstract Class Pin
Mahesh Varma30-Jul-03 19:03
Mahesh Varma30-Jul-03 19:03 
GeneralRe: Abstract Class Pin
Navin30-Jul-03 6:31
Navin30-Jul-03 6:31 
GeneralRe: Abstract Class Pin
melwyn30-Jul-03 21:51
melwyn30-Jul-03 21:51 

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.