|
Sorry, but I'm not sure I understood your problem correctly. Do you want that the controls on your dialog position themselves correctly when you maximize your dialog ?
If that's the case, then take a look at these articles[^]. The first one looks promising.
If it's not what you asked for, then explain your problem more clearly.
|
|
|
|
|
I mean to say
Suppose we have create a dialog box and put on it edit box check box
etc..
when we design form on 600x800 resolution monitor form see complete at monitor. But when we open it at different resolution its see small and if we maximize its half of part see blank. How can we programming so that all control adjust automatically.
Regard's
Kaushik
|
|
|
|
|
Did you look at the article I mentioned to you ?
|
|
|
|
|
SetWindowPos will help you to resize your control!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
ShowWindow(SW_MAXIMIZE)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
See the Extras sthis article.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
Try using ShowWindow(SW_MAXIMIZE).
thanks
Nitheesh
|
|
|
|
|
It seems you need to SetWindowPos or MoveWindow on the WM_SIZE.
|
|
|
|
|
Hello,
I would like to stop all messages to the window taskbar. I try to use the PreTranslateMessage function and it seems that the messages to the taskbar are not sending throw this function. Do you know a way to catch the messages?
Do you know if it should be throw this function?
Thank a lot !
|
|
|
|
|
TalSt wrote: I would like to stop all messages to the window taskbar. I try to use the PreTranslateMessage function and it seems that the messages to the taskbar are not sending throw this function. Do you know a way to catch the messages?
Use GetWindowLong and GWL_WNDPROC to get a window's main procedure address and replace it with your own version using SetWindowLong .
Now messages to the window which you hooked should go via your WindowProc . Store replaced WindowProc ptr to use with CallWindowProc to do default stuff. Don't forget to replace back this ptr when your application exits!
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Hello,
Can you give more details? I am not sure I understand...
How can the messages be stopped this way?
Thanks !
|
|
|
|
|
|
I assume by "window taskbar" you mean the taskbar with the "Start" button on it. This is part of "Explorer.exe". You can't expect to recieve messages from windows in another process via "PreTranslateMessage"!
Steve
|
|
|
|
|
I want to delete a empty folder present at a specified path. I am using this code for doing this:-
<pre>
CString fol_Path = _T("C:\\Program Files\\New Folder");
if(_taccess(fol_Path, 0) != -1)
{
Attributes = GetFileAttributes(fol_Path);
if(Attributes != 0xFFFFFFFF)
{
SetFileAttributes(fol_Path,FILE_ATTRIBUTE_NORMAL);
_wunlink(fol_Path);
}
}
</pre>
but my _wunlink function is returning -1 value.....
i am using unicode.....
can anbody tel me how to do this.....
thanks in advance
|
|
|
|
|
You're using a rather bizarre mixture of Win32, tchar and _UNICODE functions. I assume you have checked elsewhere that the folder you want to delete is empty, right? Also, you don't have to use GetFileAttributes() since you want to delete the folder anyway.
Most importantly, check the return code from SetFileAttributes() with GetLastError() .
If that is successful, use RemoveDirectory() and again check the return value with GetLastError() .
|
|
|
|
|
good morning everybody,
I m very new to windows mobile..... i m using CeDialer application .... I m able to call outgoing call.... now i want to implement call hold.... the msdn says to use LinrHold().... but I dont know where to use it in my code ,,,, and which parameter to pass in it....
I m using visual studio 2005 and windows mobile 6 sdk....
Thanks a lot ...
modified on Monday, April 7, 2008 3:00 AM
|
|
|
|
|
i have 2 exprted functions in a dll ( Win32 dynamiclink dll project )
void __stdcall MsgBox()
{
MessageBox( NULL , "Hello" , "" , MB_OK ) ;
}
void __stdcall MsgBox1( LPSTR a )
{
MessageBox( NULL , a , "" , MB_OK ) ;
}
//i tried following commands , the first one works but the not the secnd one, can any one tell where is the problem ?
//{
rundll32.exe mydll.dll,MsgBox
rundll32.exe mydll.dll,MsgBox1 "hi"
//}
//def file
//{
LIBRARY MyDll
EXPORTS
MsgBox
MsgBox1
//}
Thanks
modified on Monday, April 7, 2008 3:35 AM
|
|
|
|
|
nitin3 wrote: MessageBox( NULL , T , "" , MB_OK ) ;
And what is the output you're expecting from?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
sorry that was a mistake, i modified the code.
my problem is the second function MsgBox1 function does not displays the text i entered,
or its shows a message "An exception occured while trying to run "mydllfile.dll"
Thanks & Regards
|
|
|
|
|
To exploit the rundll32.exe your exported function must follow some rules, for instance the prototype must be like the following
void CALLBACK MsgBoxW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow);
then a working sample (at least, on XP it works...) will be
void CALLBACK MsgBoxW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
{
MessageBox(hwnd, lpszCmdLine, L"MyMessageBox", MB_OK);
}
with def file
LIBRARY "MyDLL"
EXPORTS
MsgBoxW @1
for a complete discussion see [^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
you have eyes of vulture..
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Please let me know how much bytes transfferd by putfile() function.
Is there any api avilable?
|
|
|
|
|
How to calculate how much bytes transfferd by putfile() function at any instant
|
|
|
|
|
chetanjoshi9 wrote: How to calculate how much bytes transfferd by putfile() function at any instant
you have to create system wide api hook on PutFile, please see if it could help :-
search following text in the CodeProject.com search box "system AND wide AND api AND hooking", you will find good number of article on above mentioned subject!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Please let me know how can I get the current internet speed in vc++
Is there any API available?
|
|
|
|