|
Hi,
Can anybody please tell me the windows messages to capture the events minimize and restore for a dialog based application.
Thanks.
Kishore
|
|
|
|
|
Do you need to SW_MAXIMIZE and SW_MINIMIZE?
|
|
|
|
|
are you asking for WM_MINIMIZE?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
WM_SYSCOMMAND wParam : SC_MINIMIZE SC_RESTORE
|
|
|
|
|
I need to create an MFC application that shows the thumbnails reading them from thumbs.db file created by windows OS. Any help would be appricated.
Note: I am able to read the catalog header of the thumbs.db which contains information about no. of thumbnails and their dimesion. The problem is to read the filenames and the actual RGB data.
|
|
|
|
|
Here[^] a code for read thumbs.db but its with C#.
|
|
|
|
|
Hi all ia am working on a com component ... prviouly i was using
UseConnection ( struct _FrameworkConnection * DBConnection )
but now i want to use I Dispatch insted of using framework...
UseConnection ( IDispatch * DBConnection ) {
but it seems something is going wrong can anybody help me ?
T@SU
|
|
|
|
|
Hello friends!
I wanna to display the baloon tooltip in my application.
But the problem is with the ShellApi.h header file which is not
having the defination of the szInfo and other constants like NIF_INFO.
I've tried the things like defining constants like
#define _WIN32_IE 0x0500
#define _WIN32_IE 0x0600
as suggested in some advises but this doesn't solve the problem.
Can anyone pls tell me what should be done exactly to achive this task?
Many Thanks in advance.
ritz1234
|
|
|
|
|
|
Hi,
Thanks for the reply.
I am using Visual studio 6.0.
And I don't know which compiler it is using.
Is the problem relate to the compiler?
Can you exaclty point out what is the problem?
Thanks,
ritz1234
|
|
|
|
|
I'm using VS2005 and didnt get this problem.
|
|
|
|
|
Using the res protocol to access an HTML inside the resources it works just fine with images but not with flash files. What am i doing wrong ?
<BODY background="HTML_RES/tile.gif"> ---> this works
but the following does not.
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=300 HEIGHT=200 name="myMovie" id="myMovie"><br />
<EMBED src="HTML_RES/clock.swf" quality=high bgcolor=#FFFFFF WIDTH=576 HEIGHT=384 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" NAME="myMovie" id="myMovie"><br />
</EMBED><br />
</OBJECT>
Does the Res:// protocol support flash objects inside resources?
Regards,
sdancer75
|
|
|
|
|
Hello everybody,
i want to create a shortcut (.lnk) to a DOS application.
There are many samples at CodeProject, but i need to set the initial size to a specific value.
On a "exe".lnk the user has the possibility to set the window size for this kind of window or only
for this "session of the window"
But i like to set these values in C++, so that the user don't need to set this value on his own.
Big thanks
|
|
|
|
|
Make it yourself: an option at the command line (of the link) and proceed it.
Greetings from Germany
|
|
|
|
|
The DOS Application behind it is made with a special "DOS-Window" component.
We try to set there'in some values to adapt it the window.
But it's hardly strange to change the intern values of the display.
But thanks anyway
|
|
|
|
|
Hi Experts,
I am new with VC++.I want to clear my basics so please help me.
When I create a new project in in VC7. It automatically craete four clasess
1.CApplication class
2.CMainrame Class
3.CView class
4.CDoc
And do not call create to crate a WindowFrame. Plz tell the significance of these classes.
|
|
|
|
|
|
please go thru MSDN. it has detailed explanation about all the classes mentioned my u.
|
|
|
|
|
i have a combo box which is of type int. i need to retreive the value that is there in the combo box. that is for example i have 2 values in a combo box. 100 and 200. now when i select 100 from the combo box the value has to send than the index. how can i do that?
|
|
|
|
|
With MFC, the simplest a way is binding the combo to an int a CString variable (use the Add Variable Wizard of VS) and then convert the latter to an int (for instance with _tstoi ). You may also use the GetItemData /SetItemData pair to store (and retrieve) directly int values inside combo box items.
If you don't like MFC, the you should retrieve the item text and then convert it to int , i.e.
const INT SIZE=0x100;
TCHAR buffer[SIZE];
INT SelectedInt;
LRESULT sel = SendMessage(hCombo,CB_GETCURSEL,(WPARAM)0, (LPARAM)0);
if ( sel != CB_ERR)
{
INT n = SendMessage(hCombo,CB_GETLBTEXT,(WPARAM)0, (LPARAM) (LPTSTR) buffer);
if ( n != CB_ERR)
{
SelectedInt = _tstoi(buffer);
}
}
Please note, I used a 'quick way' of allocating a relatively large buffer (since your combo contains short strings); you can use CB_GETLBTEXTLEN message to know requested buffer size in advance.
BTW, you have also the option to associate the int values to the Item Data of the combo box and retrieve it, whenever needed, via CB_SETITEMDATA message (it is left as an exercise for the reader... ).
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.
modified on Monday, December 10, 2007 6:40:52 AM
|
|
|
|
|
i am using MFC. my requirement is simple. whenever i am trying to acess the variable i am getting the value as the index. i need to value from the combo box.
|
|
|
|
|
You're right, mapping the combo to an int variable make the latter containing the selected index value.
Hence you can either:
(1) Map the combo to a CString variable and the performing _tstoi on the variable.
(2) Getting a pointer (say pCombo ) to your combo box class (you can either map a variable or call GetDlgItem ) and then:
int nSel = pCombo->GetCurSel();
int nSelValue;
if (nSel != CB_ERR)
{
CString strValue;
pCombo->GetLBText(pCombo->GetCurSel(), strValue);
nSelValue = _tstoi(strValue);
}
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.
|
|
|
|
|
is there any other way to get the value in the combo box. i am declaring the combo box variable as int. and this variable is used in some more files. so cant change the data type. it can be only int.
|
|
|
|
|
Chandrasekharanp wrote: so cant change the data type. it can be only int.
In fact, you can. Sometimes a bit refactoring effort it is worthy to do.
Anyway I don't insist on design policies, hence, supposing you int variable name is iCurSel (and your combo box ID is IDC_COMBO ), you can do:
int iValue;
UpdateData();
if (iCurSel != CB_ERR)
{
CString strValue;
((CComboBox *) GetDlgItem(IDC_COMBO))->GetLBText(iCurSel, strValue);
iValue = _tstoi(strValue);
}
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.
|
|
|
|
|
alright.. i have done it. now i have one more thing to do. i need to pass this value to another file. tried using static. but i dont know if i am doing it the right way. it has an error. i tried to declare the variable as
<br />
static int value <br />
in the .h file.
what is the procedure to do that?
|
|
|
|