|
Joaquin,
Thanks a million.
I think I will follow your suggestion and try to build 2.24 with 6.
The problem I had described was at run-time not build time.
Time for some fun
beamsack
|
|
|
|
|
Hi there,
I wrote this code for changing windows background color, it works fine in Win98 but it doesn't wrok on WinXP and Win2000 !
HBRUSH CSearchDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
switch(nCtlColor)
{
case CTLCOLOR_DLG:
{
CBrush brush(RGB(0, 30, 104));
pDC->SelectObject(brush);
pDC->SetBkMode(TRANSPARENT);
return (HBRUSH)brush.GetSafeHandle();
}
case CTLCOLOR_STATIC:
{
}
case CTLCOLOR_EDIT:
{
}
}
return hbr;
}
What's wrong ???
Please help me !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
{
CBrush brush(RGB(0, 30, 104));
pDC->SelectObject(brush);
pDC->SetBkMode(TRANSPARENT);
return (HBRUSH)brush.GetSafeHandle();
} Since brush is defined in the local scope, it gets destroyed as soon as the function exists. I'd say it's merely a matter of luck that this works in Win98. Instead, make brush a member variable of CSearchDialog and initialize it only once (for instance, in the constructor for the dialog).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello dear López
Ans thanks alot for your helps, now it works fine
Best Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hello dear López
Just call me Joaquín (or Joaq, as Nish prefers to put it)
Ans thanks alot for your helps, now it works fine
Glad to be helpful.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi!
I know that this is not the first time this question is asked, but I don´t found a solution yet so I hope someone in here is able to help me.
Problem is: With the standart MFC functions I can´t get the refresh rate of the display device under Win9x (Win98 and ME is important), neighter the current, nor all avaible.
Under WinNT and above all is fine. EnumDisplaySetting or GetDeviceCaps in "Normal" Mode or the equals in DirectX Mode returns all Values correct, but under Win9x only a Zero or 1 comes back.
Question: How can I get the value? Anybody knows other ways? I know it is possible (look at MultiRes or QuickRes but these are not OpenSource ).
Bye FatBastard
|
|
|
|
|
Hello there,
Is there any tutorial and class for loading animated gif ???
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
when you come to the CP main page, there is a list of categories down the left side of the page. one of those categories is "Bitmaps and Palettes". if you click that, you'll find many different classes that will do this.
-c
"Kate said / The flowers of intolerance and hatred / Are blooimg kind of early this year / Someone's been watering them.
-- Robyn Hitchcock, Devil's Radio
|
|
|
|
|
Hi,
I have many combo boxes my my dialog based application. I want to a combobox to loose focus, when the user clicks outside the combobox. The user should be able to click anywhere in the dialog (not necessarily on another control.) and the combobox should loose focus.
Please help me in this regard.
Arthi
|
|
|
|
|
try handling WM_LBUTTONDOWN in the parent dialog class and calling SetFocus() on the dialog.
if SetFocus() doesn't work (dialogs can be a bit funny) then try sending WM_KILLFOCUS to the control with the focus.
|
|
|
|
|
Hi all,
I need to get notification when the network link up or down.
is there any way to do it?
did any one know how the windows system know this and display a message at the coner of the screen when link up or down?
Thanks a lot.
|
|
|
|
|
May be that's a dumb answer from me, but you can show a blinking systray icon for the network link just by checking a box in the Network settings.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site. Support for development will ship at the same time as the Windows XP Service Pack 1 (SP1) release.
|
|
|
|
|
Hi ano,
take a look at the System Event Notification Service (SENS), and especially
the ISensNetwork interface. I believe there is an article about this in a recent Dr. Dobbs, or search the Microsoft site.
Bye,
Alwin
|
|
|
|
|
Hi Alwin,
I've read the SENS article. it works fine with dialup line. but augly with LAN. it seems the desktop network connection link up/down message is not from SENS
Did you know other info?
Thanks.
|
|
|
|
|
Hi,
It turned out that I did not read the article in Dr. Dobbs but in MSDN, which
is available electronically here.
The article indicates that SENS does not work well for what you want to do but describes an alternative using WMI (Windows Management Instrumentation) that might help you.
Regards,
Alwin
|
|
|
|
|
I want to ask like this below example?
Example :
If there are 3 people , all of them have text file name “1.txt”.
If Mr. A has data X in text file like this
X = POIR
Mr. B has data X in text file like this
X = JUKFDSSA
Mr. C has data X in text file like this
X = OYTGF
I want to embed this data in program while compile.
Example: If I use text file of Mr.A I will have data X = POIR after compile program. If I use text file of Mr.B I will have data X = JUKFDSSA after compileprogram.
If my program is in directory C:\ .
Where I need to put “1.txt” file and how to write program to do that .
Thank you.
|
|
|
|
|
can you could just put the text into a const char * variable?
when you write your text file, make it look like this:
---begin (cut here)
const char *pTheTextFile = "JUKFDSSA";
---end (cut here)
... and call it "MyText.cpp" (or whatever) and add it to your project. then just rewrite it when you want to add the other person's data.
-c
"Kate said / The flowers of intolerance and hatred / Are blooimg kind of early this year / Someone's been watering them.
-- Robyn Hitchcock, Devil's Radio
|
|
|
|
|
I have a big problem and i must finish this work:
send and receive some bitmap.
The solution?
Thanks
|
|
|
|
|
Oh please, you have been talking about sending this bitmap for several days now. I remember a few days ago someone actually wrote some nice code, in a reply to your question.
Have you been looking at that?
I don't think you get anyone to write a complete program for you, by asking the same question every day.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I have a dialog with two listboxes in it. I want my listboxes to do something when the "enter" key is pressed. The LBN_* messages listed in the ClassWizard are of no help. I tried responding to WM_KEYUP/DOWN messages from the parent dialog, but the didn't work either. How can I know when the user hits "enter" from a listbox?
|
|
|
|
|
|
Hi there,
I respond to "del" keys in my listviews by handling the KEYDOWN notifications, this solution should also work for listboxes:
In your message map add: (you should use LBN_*)
ON_NOTIFY(LVN_KEYDOWN, IDC_LIST_FILES, OnKeydownListFiles)
Add the handler:
void CUpdateDlg::OnKeydownListFiles(NMHDR* pNMHDR, LRESULT* pResult) <br />
{<br />
LV_KEYDOWN* pLVKeyDow = (LV_KEYDOWN*)pNMHDR;<br />
if (pLVKeyDow->wVKey == 46)<br />
{<br />
}<br />
<br />
*pResult = 0;<br />
}
Hope this helps !
Alwin
|
|
|
|
|
Override CYourDlg::PreTranslateMessage, check if listbox has the focus and key is Enter, then do whatever you want.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
Hello
I am trying to create a c++ program thats outputs messages to disk in a fixed lenght format i.e after each record the data needs to be padded to 512 bytes before the next record starts.
The part I have trouble with it the padding of the record to 512 bytes can anyone help or point me in the right direction
Thanks
James Wright
|
|
|
|
|
Copy the message to 512-byte buffer, then write buffer to disk.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|