Skip to main content
GameDev.net gamedev.net
🔒 Locked

A question about c/c++;

Started by zyylovedeer Jan 18, 2002 at 7:02 AM 11 replies 400+ views
Original Post
zyylovedeer
zyylovedeer
Can you tell me how to make a dialogbox and a window actively at same time? My English is not good? Can you understand me?
i am a beginner of programming
david_williams
david_williams
Normally when a dialog appears it it impossible to interact with then main program until the dialog is closed. This is called a ''Modal'' dialog. The other type, which is used less, is called a ''Modeless'' dialog. With a Modeless dialog it is possible to interact with the main program as well. A. example would be the search and replace dialog on microsoft word.
I assume your using windows, but I don''t actually know how to create a modeless dialog. I suggest you search for ''Modeless Dialog'' in the help file.
zyylovedeer
zyylovedeer
but how to make them actively
in other word,
how to make their headline blue at same time?
can you understand me
i am a beginner of programming
zyylovedeer
zyylovedeer
oh! i am sorry my english is not good
and you cannot understand me
i means how to create a toolbar like flash
it can keep active with main window
i am a beginner of programming
Zeblar Nagrim
Zeblar Nagrim
Create a window from a MSVS 6.0 resource file.

  

HWND l_hwndDialog = CreateDialog( (HINSTANCE) GetWindowLong(l_hWnd, GWL_HINSTANCE), MAKEINTRESOURCE(l_iControlID), m_hWnd, (DLGPROC) WndProc);



The dialog box should have: style = Child, tilebar = zero.

Then it will be possible to push a button on the dialogbox or write text in a editbox control and the main window will still ''have focus''.

Zeblar Nagrim, Lord of Chaos
zyylovedeer
zyylovedeer
i am sorry
but the compiler tells undefined keyword or key name :tilebar
can you tell me more carefully
i am a beginner
i am a beginner of programming
zyylovedeer
zyylovedeer
visual c/c++
and titlebar are alse wrong
i am a beginner of programming
zyylovedeer
zyylovedeer
this is my dialogbox resource:
Tool DIALOG 5,50,100,80
STYLE WS_CAPTION|WS_VISIBLE
TITLEBAR zero
CAPTION"Tool"
FONT 10,"Arial"
{
PUSHBUTTON "Line",IDB_LINE, 5,5,30,10
PUSHBUTTON "Ellip",IDB_ELLIP, 40,5,30,10
PUSHBUTTON "Rect",IDB_RECT, 5,20,30,10
PUSHBUTTON "Arc",IDB_ARC, 40,20,30,10
PUSHBUTTON "Select",IDB_SELECT, 5,35,30,10
PUSHBUTTON "Fill",IDB_FILL, 40,35,30,10
PUSHBUTTON "Picure",IDB_PICURE, 5,50,30,10
PUSHBUTTON "Dropper",IDB_DROPPER,40,50,30,10
}
i am a beginner of programming
Zeblar Nagrim
Zeblar Nagrim
I´m talking about how to remove the title bar with the visual resource editor in Microsoft Visual Studio 6.0... The checkbox called Title Bar. But u can also do it this way:

int style = GetWindowLong(hWnd, GWL_STYLE);

if( style & WS_CAPTION)
style = style ^ WS_CAPTION;

SetWindowLong(hWnd, GWL_STYLE, style);

Zeblar Nagrim, Lord of Chaos

Edited by - Zeblar Nagrim on January 18, 2002 9:06:38 AM
zyylovedeer
zyylovedeer
Thanke you very much
i am a beginner of programming

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.