|
I want to open a window in full screen mode.. how can I do that?
|
|
|
|
|
|
Doesn't this maximize the window? I mean FULL screen..
|
|
|
|
|
|
You'll need to use CreateWindowEx() to create a top-most window (WS_EX_TOPMOST ) without any border (WS_POPUP ).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
What type of fullscreen you mean? The one, where you have predefined window size and want to temporarily switch screen to that size? Or maybe the one where you want borderless and captionless window to cover entire screen (for currently set resolution)?
In the first case:
DEVMODE dm;
HWND hDesk;
HDC hDeskDC;
hDesk = GetDesktopWindow();
hDeskDC = GetDC(hDesk);
dm.dmSize = sizeof(DEVMODE);
dm.dmBitsPerPel = GetDeviceCaps(hDeskDC, BITSPIXEL);
ReleaseDC(hDesk, hDeskDC);
dm.dmPelsWidth = dwScreenX;
dm.dmPelsHeight = dwScreenY;
dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
if (ChangeDisplaySettings(&dm, CDS_TEST) == DISP_CHANGE_SUCCESSFUL) {
return TRUE;
}
dm.dmPelsWidth = dwScreenX;
dm.dmPelsHeight = dwScreenY;
if (ChangeDisplaySettings(&dm, 0) == DISP_CHANGE_SUCCESSFUL) {
return TRUE;
}
In order to get valid screen resolutions, use EnumDisplaySettings .
In the second case:
Use
GetSystemMetrics(SM_CYSCREEN)
and
GetSystemMetrics(SM_CXSCREEN) to get currently set screen resolution, and adjust your borderless and captionless window size accordingly.
Hope that helps
Regards
|
|
|
|
|
is there a constant for hourglass-arrow cursor? i can only see IDC_WAIT (which is the wait cursor)...?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
You can see on LoadCursor another constants
|
|
|
|
|
IDC_APPSTARTING did the trick
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Hi,
Isn't IDC_APPSTARTING what you're looking for?
Regards
|
|
|
|
|
this is exactly what i was looking for
thanks
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Hi,
The wait cursor is an arrow with a small hourglass beside it.
Angbo2006
|
|
|
|
|
IDC_WAIT represent only hourglass,
the answer above suggested IDC_APPSTRING, which did what i wanted...
thanks anyways
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
hi,
i want the code snippet for the action of progress bar control in a dialog box.its urgent,
thnx in advance,
zari
|
|
|
|
|
You can see two examples of CProgressCtrl class on MSDN
|
|
|
|
|
Using MFC?
Here's one way...
Add a progress control to the dialog resource.
Add a CProgressCtrl object to the dialog class:
CProgressCtrl m_StatusProgress;
In the dialog class OnInitDialog() function set up the progress control:
m_StatusProgress.SetRange32(0,100);
m_StatusProgress.SetPos(0);
As progress progresses (haha) calculate the percent done and notify the progress control:
m_StatusProgress.SetPos(percentdone);
|
|
|
|
|
Hi all,
i have 2 dialogs, dlg1 & dlg2 in both of them i use the same code:
BOOL CDlg1::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (!m_bCondition)
{
::SetCursor(::LoadCursor(NULL, IDC_WAIT));
return TRUE;
return CDialog::OnSetCursor(pWnd,nHitTest,message);
}
BOOL CDlg2::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (!m_bCondition)
{
::SetCursor(::LoadCursor(NULL, IDC_WAIT));
return TRUE;
return CDialog::OnSetCursor(pWnd,nHitTest,message);
}
problem is that i see the hourglass when mouse is over dlg1, but i don't see the hourglass when mouse is over dlg2????
what am i missing? should i implement an other message?
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Use CWaitCursor object in OnMouseMove function of both dialog.
|
|
|
|
|
well, i just took you advise and altered it abit:
i used OnMouseMove, and set the cursor myself according to the condition and it worked
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
You say it doesnt call OnSetCursor on CDlg2,right?
|
|
|
|
|
the method OnSetCursor is being called on both dialogs, but the problem is that i can see the hourglass on dialog1 when mouse is over it, but i see only an arrow (not hourglass) on dialog2 when mouse is over it....
?
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
I have created a tree control in which the whole explorer tree will be displayed.And also i have added code to drag and drop the folders and files.My problem is when i select the item i am able to drag.But it is not dropping at the selected place.How can i drop the folder at the required place.
Thanks.
|
|
|
|
|
|
Thanks.But if i drag and drop the folders in the tree control they should be also be copied into the explorer at the same time.But dropping of folders is not working properly.(My application displays the explorer in the form of a tree ,so that if we click on the tree we will be opening the folder and files what we require).
Thanks
|
|
|
|
|
Do you need to SHFileOperation
|
|
|
|