|
Do it this way,
Get the active window and store in the a variable :- activeWind.
Now keep checking the GetActiveWindow() window against the activeWind, If it differs, take that as an Event, and update your activeWind will this help you?, but there should other simpler ways
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
Hi,
Whenever I used #include<uxtheme.h> I am getting an error as "Cannot open include file: No such file or directory "
Do I need to change anything to include this file.
Thanks in advance
|
|
|
|
|
maybe your file is in another location and you dont know
or you dont have include file
whitesky
|
|
|
|
|
|
Assure that the .h file is with you , and if you use < > it searches the standard library directories. If you use "", it searches the local director. If you are not sure what to do, do this, copy the .h file to the local folder where you keep the other .cpp .h files of your project. Now use #include"sdf.h" here it can never say "cannot find the file " again.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
|
i include this file and not problem maybe you dont have this file that is for themes of course i use vs2005 now
whitesky
|
|
|
|
|
both Monitor and printer are set to MM_LOENGLISH
GetDeviceCaps(RASTERCAPS) supports for:
RC_BITBLT : both
RC_STRETCHDIB : both
RC_DEVDITS : monitor only
RC_STRETCHDLT : monitor only
Result:
monitor can display bitmap by 4 functions properly.
but Printer can display bitmap only by StretchDIBits() function, BitBlt() does not work.
who knows why?
|
|
|
|
|
did you see my answer in your previous message i used BitBlt
whitesky
|
|
|
|
|
do not make mess under my post!
|
|
|
|
|
I want to help you my friend
whitesky
|
|
|
|
|
plz somebody tel me how to disable edit control on one dialog box from menu command on other dialog box
gourav dogra jfjunf
|
|
|
|
|
|
this will not work as irt give some error because i dont define the variable in first class so give full deatils plz i am beginner so pl, tel me how to handle these errors
its request syntax error : missing ';' before '*'
d:\gourav\password\log.h(18) : error C2501: 'CPasswordDlg' : missing storage-class or type specifiers
d:\gourav\password\log.h(18) : error C2501: 'myfirst' : missing storage-class or type specifiers
passwordDlg.cpp
d:\gourav\password\log.h(18) : error C2143: syntax error : missing ';' before '*'
d:\gourav\password\log.h(18) : error C2501: 'CPasswordDlg' : missing storage-class or type specifiers
d:\gourav\password\log.h(18) : error C2501: 'myfirst' : missing storage-class or type specifiers
D:\GOURAV\password\passwordDlg.cpp(153) : error C2039: 'myfirst' : is not a member of 'CLog'
d:\gourav\password\log.h(13) : see declaration of 'CLog'
Log.cpp
d:\gourav\password\log.h(18) : error C2143: syntax error : missing ';' before '*'
d:\gourav\password\log.h(18) : error C2501: 'CPasswordDlg' : missing storage-class or type specifiers
d:\gourav\password\log.h(18) : error C2501: 'myfirst' : missing storage-class or type specifiers
Generating Code...
Error executing cl.exe.
password.exe - 10 error(s), 0 warning(s)
gourav dogra jfjunf
-- modified at 5:51 Monday 5th June, 2006
|
|
|
|
|
whats type dialog if it is CDialog see
if CMyDailog is main class use this in another class
CMyDailog* view = (CMyDialog* )GetParent();
view->m_yourcontrol or function
of course if you use one CDialog program
whitesky
|
|
|
|
|
Create a class associated to the second dialog.
Declare an object or a pointer as
CYourFirstClass *myfirst; //in the header file of the this second dialog.
now when you are calling the dialog as
CSecondClass *mysecond=new CSecondClass();<br />
mysecond->myfirst=this;<br />
mysecond->DoModal();
now when you click on the menu bar item of the second dialog call
myfirst->myeditwnd->EnableWindow(false);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 5:18 Monday 5th June, 2006
|
|
|
|
|
Hi to all,
can we create a window using createwindow() in dialog based application ..
Manjunath S
|
|
|
|
|
Did you see CreateWindow in MSDN
this code is in MSDN
g_hwndMain = CreateWindow (
TEXT ("AnxJTest Class"),
lpstrWndTitle,
WS_VISIBLE,
0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,
NULL, NULL, g_hInstance, NULL);
if (!g_hwndMain) {
DEBUGMSG(ZONE_VERBOSE | ZONE_ERROR,
(TEXT ("Could not create main window.")));
return FALSE;
}
of course Can you be more specific
whitesky
|
|
|
|
|
Yes
See the code underneath
#define ID_EDIT 201 //somwhere above in your code<code>
HWND hwndLarger;
hwndLarger=CreateWindow("BUTTON","EnterName",WS_CHILD|WS_VISIBLE,20,20,80,50,m_hWnd ,(HMENU)ID_EDIT,NULL,NULL);
</code>
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 5:26 Monday 5th June, 2006
|
|
|
|
|
|
Can i get sample code for Creating window in MFC dialog based application..
Thanks in advance ...
Manjunath S
|
|
|
|
|
Yes ofcourse... but tell me more details...
- NS -
|
|
|
|
|
I need to crate a class for windows and register it.after registering i need to create and palce that window on the Dialog.
Once completed, I need to create a SDL (simple Directmedia screen ) on the window..
SO my overall aim is to place SDL screen in MFC dialog based application...
Thanking You..
Manjunath S
|
|
|
|
|
I'm sorry, I have no experience with SDL.
Anyway I can help you to just create a window
First you have to insert a new class using ClassWizard.
Select class type as MFC and base class as generic CWnd.
Then you have to add a function to create the window in the new class created. Sample will just look like this...
bool MyWnd::Create(CWnd* pParent,const CRect& rect)
{
CString csClass = AfxRegisterWndClass( 0, LoadCursor( 0, IDC_ARROW ),
(HBRUSH)GetStockObject( WHITE_BRUSH ));
if( FALSE == CreateEx( 0, csClass, _T( "" ), WS_CHILD, rect, pParent, 0 ))
{
return false;
}
return true;
}
Then you can create a member variable of MyWnd in the dialog and can call the Create function of it.
- NS -
|
|
|
|
|
Hey man !
I provided you with the code itself. You just have to add it in your applications InitDialog function.
See my previous post to this thread.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|