|
Arris7 wrote: All my bitmaps parameters are the same except their height
Images in an image list need to be the same size...
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Why delete your question?
|
|
|
|
|
Hi all,
I am making one pure win32 windows application by selecting “Win32 Project” template in Visual C++ project type 2005 version. This is my first win32 application but I can’t understand how can I add more controls and use it in the main form created by CreateWindow() function. Or can I get some help or place where I can get tutorial about win32 applications.
Thanks in advance,
Priyank
|
|
|
|
|
Programming Windows 5th Edition by Charles Petzold is THE book on Win32.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I actually rated you too my surprise, good answer. I do not know what he is looking for exactly, but Win32 implies they want to know.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
I need a visual c++ code which gets two arguments(year and month)from user and display corresponding calendar
program must use arrays and functions and define a class date.
|
|
|
|
|
So which part do you need help with: 1) visual c++ code which gets two arguments(year and month)from user, or 2) display corresponding calendar?
If you are using MFC, check out the CMonthCalCtrl class. Otherwise, create a SysMonthCal32 window class.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Dear David,
thanks a lot for your reply, i need both part that you have asked kindly you can provide me a full flage sample code for this kind of calendar.
Actually it is not GUI it should be simple rows colum table calender through arrays and function and uses a class date.thank you once again
|
|
|
|
|
How can I turn off sounds in webbrowser control hosted in my application?
I mean sound when user or script clicks some link.
It seems it is turned on default in Windows Vista.
Thank you!
rrrado
|
|
|
|
|
Hello,
Scenario: MFC dialog application. That contains a lot of regular controls but should also contain a hidden(invisible) button or checkbox. clicking on the button (or checkbox) will enable or disable some custom or expert capabilities. Only knowing the exact location of the button will allow the user to click and get the expert capabilities.
The invisible control should behave as a regular visible control.
I know that this is possible, due that I saw it on a demo application few years ago (That I don't remember its name), but I don't have the vague idea on how to code it.
Any idea on how to implement it with Visual C++ using MFC?
Thanks in advance.
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
If it's an option, it seems to me it's easier to just intercept WM_LBUTTONDOWN notification
messages and check for the cursor being in a certain region. A simple flag to toggle can keep the
expert/novice state.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: ForumVisual C++ / MFC
Subject:Re: Need to make a button (or checkbox) invisible..
Sender:Mark Salsbery
Date:13:47 16 May '07
If it's an option, it seems to me it's easier to just intercept WM_LBUTTONDOWN notification
messages and check for the cursor being in a certain region. A simple flag to toggle can keep the
expert/novice state.
Mark
Thanks Mark,
Now, how do you intercept the WM_LBUTTONDOWN notification from the main window before the control beneath will intercept and handle it? I have an ActiveX control beneath. (2D Graph ActiveX Control[^])?
If this is not possible, can I intercept the notification after the control beneath?
Thanks in advance.
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
Well I didn't know there was a control beneath where you need to click
In that case you'd need to catch it at the control since that's where the click message goes.
So I guess in that case, maybe an owner-drawn control that draws nothing is a worthwile solution.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
In a non-MFC application, I would have suggested owner-drawn pushbutton, with the "in" and "out" buttons the colour of the dialog box. (Not that I ever used owner-drawn pushbuttons, but I thought about it once.)
Of course, everything is easier with MFC. . .
|
|
|
|
|
normanS wrote: ForumVisual C++ / MFC
Subject:Re: Need to make a button (or checkbox) invisible..
Sender:normanS
Date:15:44 16 May '07
with the "in" and "out" buttons the colour of the dialog box.
This is a problem for me due that I have an ActiveX control beneath (2D Graph ActiveX Control[^]) has its background changing all the time... therefore making the "invisible button" follow these changes is not easy.
The solution may be to use a "rectangle" and add some code to intercept when the user clicks on the mouse over it, and if it is in the rectangle do something otherwise call the 2D Graph ActiveX Control[^] handler for the mouse click. (But I'm not sure if this will work)
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
Ah - maybe you could make owner-drawn buttons with the IN and OUT transparent?
In any case, I would guess that checking for mouse clicks in a certain area would actually be easier than making an owner-drawn button.
I don't think that there should be a problem intercepting mouse clicks in the message handler and checking if they are within your defined rectangle. If they are, do something. If not, I don't think you have to explicitly call the 2D graph handler - just let Windows handle them using the DEFAULT.
|
|
|
|
|
OK, now that I've clicked on your "My articles" link, I guess I'm not qualified to advise you on the use of owner-drawn buttons! Good thing I said my knowledge was based on having thought about using them.
Maybe I should read your article to see how to make them work . . .
|
|
|
|
|
Hi,
I have a function for comaring.
int DataPeakCompareFunc(const void *el1, const void *el2)
{
const DataPeak *peak1 = reinterpret_cast(el1);
const DataPeak *peak2 = reinterpret_cast(el2);
if (peak1->position < peak2->position)
{
return -1;
}
else if (peak2->position < peak1->position)
{
return 1;
}
return 0;
}
this is my qsort function
int (FConvert::OConvevw::*pt2Function) (const void*, const void*) = NULL;
pt2Function = &FConvert::OConvevw::DataPeakCompareFunc;
qsort((void*)pScan, num_readings, sizeof(DataPeak),pt2Function);
But i am getting this error
Error 206 error C2665: 'qsort' : none of the 2 overloads could convert all the argument types d:\cougar_io_development\cougar\core\libraries\cplusplus\dlls\fconvert\OConvevw.h 789
both are residing in oconvevw.h file only.
What to do?
Thanks in advance.
Regards, Eswari
|
|
|
|
|
may be this is the wrong forum to ask.. But i could not see any C++ category.
That's why i posted here
|
|
|
|
|
At least one of the parameters you are passing to qsort() is the wrong type.
I suspect the last parameter. The compare function should have the following prototype:
int (__cdecl *compare )(const void *, const void *)
but you are passing a
int (FConvert::OConvevw::*compare)(const void*, const void*)
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Is DataPeakCompareFunc() a static or non-member function?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
member function defined in the same class where qsort is being called
|
|
|
|
|
subramanyeswari wrote: member function defined in the same class where qsort is being called
Thus it needs to be a static member.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Don't use qsort ; it's outdated. Use STL.
e.g.
inline bool operator<(const DataPeak &l, const DataPeak &r)
{
return l.position < r.position;
}
std::sort(container.begin(), container.end());
std::sort is in <algorithm>
Steve
|
|
|
|
|
Hello,
I have an int array
int a[10].
The array will have only 3 to 4 values in the it.
so how do I check for NULL values in the array
because I cannot check
a[i]!=0 since I want 0 as a value
Thanks
Prithaa
|
|
|
|