|
Hello Mike,
thanks a lot for your answer.
So it looks like this is "by design" but not "by desire" . Because if you have several projects using some well tested "common dlls", you usually otherwise don't need these in debug and release mode, while debugging one of your apps.
Rainer
By the way: Thank you very much for your wonderfull tutorials ! ! ! !
|
|
|
|
|
Hi.
I have a chechbox to maik a dialog as always ontop.
But I do not know what properties or metod is for IT.
please Help me .
Thanks a lot.
|
|
|
|
|
Use SetWindowPos() with HWND_TOPMOST for the hwndInsertAfter parameter.
|
|
|
|
|
this is how I do it......
Add a control handler for when the Control is clicked
ON_BN_CLICKED(IDC_ALWAYSONTOP, OnAlwaysontop)
and the OnAlwaysontop as follows.....
void CSomeGenericDlg::OnAlwaysontop()
{
UpdateData(true);
if (m_AlwaysOnTop)
SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
else
SetWindowPos(&wndNoTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}
There's probably better ways to do it, but this works, and it will set the "Always on Top" state immediately when the box is checked...
Liam O'Hagan
Senior Test Engineer
GLI Australia
www.gli.com.au
|
|
|
|
|
Hi!
i Hope that there anyone can help me.
i need to save images from the computer to a file in format jpg or gif
or in the worst case Bmp, or convert the Bmp to jpg later and svae it to file.
if you have any ideas how to do it plz answer .
pascal.
|
|
|
|
|
hi,
I'm afraid there are some licensing issues when it comes to saving it as GIF.
But for jpg you can go for Intel's Image processing library
For storing the screen content as bitmap,there is a article in MSDN under ...
Platform SDK/Graphics And Multimedia Services/Windows GDI/Bitmaps/Using Bitmaps/Storing an Image
or
you can try Smaller Animals Jpeg Class
Hope this helps
Cheers
Kannan
|
|
|
|
|
I haven't any formal Bitmap file,but only a short array,then
what can I do to create and show a Bitmap with 16 bit color depth?!
Please tell me in detail!
Thanks!
fly against the wind
|
|
|
|
|
The CBitmap create method takes a pointer to the data to initialise the bitmap as it's last parameter.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
<<< In the name of GOD >>>
Hi.
How can i get IP address from my computer and server computer ?
Thanks for reply.
Hadi Rezaie
|
|
|
|
|
I am having a hard tym accessing the values
(array of strings) being returned by a function
in a DLL created in VB and place them in a VC++
combobox. The nearest I can get is dislay the
first characters of the strings in the array.
I need answers ASAP. Thanks.
(Here is the part of the code i am debugging ryt now)
void CUMNTestProgramDlg::OnDropdownCombo1()
{
HRESULT hresult;
CLSID clsid;
long lElements; // number of elements in the array
long iCount;
CString *pArrayElements; // pointer to the elements of the array
CoInitialize(NULL);
hresult=CLSIDFromProgID(OLESTR("MFCSUMNDLL.clsUMNDLL"),&clsid);
_clsUMNDLL *t;
hresult=CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,__uuidof(_clsUMNDLL),(LPVOID *) &t);
if(FAILED(hresult))
{
AfxMessageBox("Creation Failed");
return;
}
// reset the contents of the combobox
m_cmbGroup.ResetContent();
pArrayElements = NULL;
t->ConnectForC();
// how many elements are there in the array
lElements = t->Groups()->rgsabound[0].cElements;
// locking the array before using its elements
hresult = SafeArrayLock(t->Groups());
// using the array
pArrayElements = (CString *) t->Groups()->pvData;
for (iCount=0; iCount<(lElements-2); iCount++)
m_cmbGroup.AddString((LPCTSTR) pArrayElements[iCount]);
// releasing the array
hresult = SafeArrayUnlock(t->Groups());
CoUninitialize();
}
=P
|
|
|
|
|
i think this may be your problem
// using the array
pArrayElements = (CString *) t->Groups()->pvData;
vb uses bstr's no? and they're unicode format chars no? maybe convert the bstr's to char strings before using them
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
hi. Iwant to know what commands is for access to windows registry
keys and its value.
help me pleas.
Iman Gh
Thanks a lot.
|
|
|
|
|
There a a few articles on Code Project that contain classes that simplify reading from and writing to the Registry. Check out the following link System Articles and look under the Registry sub heading.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
Hi. I use string table and I like to know can I write a new
value in string table in runtime.
I want to put Edit Box value to string table.
Iman Gh
Thanks a lot.
|
|
|
|
|
Not really possible, why would you want to do that anyway?
The best thing to do (if you're using MFC) is to set up dialog data exchange so that the contents of the edit box gets put into a variable when you call UpdateDialog(). You can do this using ClassWizard, and you might want to look up Dialog Data Exchange (or DDX) in MSDN.
Hope that helps!
Andrew.
|
|
|
|
|
|
Hi everyone.
For a database applcation (managing either small or large amount of data), do you build GUI interfaces/ using VC++ or do you code only basic functions and try to code all database related functions using external program (PowerBuilder, Visual Basic etc...) ?
I think it takes a lot of time to develop a database application using VC++ (even in MFC). When you require to code very simple code,whatever you use ODBC or ADO, it's never efficient.
Do you think programmers always want to develop complex and large amount of lines of code only for pleasure ?
I think most of the time it's much simpler to use 4rth generation application to build database application.
What do you think ? Have you already coded a big database application ? how many time do you spent to code/test the application ?
What development tools do you often use to develop such applications ?
Thanks for your answers.
|
|
|
|
|
Don't waste your time on VC++ unless you need features such as multithreading or unique UI requirements. Write all your code in VB or something like that. The overhead it saves you is enormous. Why bother with low level COM, BSTRs, etc. When VB wrapps everything for you in a neat way ? I've been writing Database applications both in in VC++ and in VB. Most of the time I would rather use VB both for data layer and higher layers.
Hope this helps.
|
|
|
|
|
How do I bind an accelerator to my program? I have a Menu item called ID_EXIT and with a caption of E&xit\tCtrl+X and I have an acclerator that has the identifier ID_EXIT that is set to use Ctrl and X. It's not working. and I'm not sure why it isn't or how to get it to work. Any help with this will be appreciated.
|
|
|
|
|
Hi Everyone,
i reached the end of my rope. i'm trying to read the local registry, so i can retrieve a value from it, in HKEY_CURRENT_USER. All the Registry samples on CP work in the NT service BUT only with HKEY_LOCAL_MACHINE.
why can i not read from HKEY_CURRENT_USER from an NT Service ?, what am i doing wrong
Thanks Peter
|
|
|
|
|
Well, as standard a service log on as "system", and because of that there is no "current user" so it cannot read in HKEY_CURRENT_USER.
You have to change the service so it logs on as a user, then I think it should work.
- Anders
|
|
|
|
|
I have a problem. When I want to copy an item in a list ctrl with check boxes i can not copy the item as "checked". What I am doing is I am getting all the item's properties wih getitem and then inserting it with setitem using lvi structure. the new item has a check box but it is not checked ?
any ideas?
thanks
orcun
|
|
|
|
|
The checkbox state is kept separately. Use ListView_GetCheckState() and ListView_SetCheckState()
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
Hi everyone,
I don't know how to use two filtergraphs simultaneously in my application. When I
build two identical filtergraphs to capture two video sources simultaneously, it
works fine when the two filtergraphs run at the same time. But at the time when I
stop them, the application cracks. Each of the filtergraphs can run and stop
properly if the other is stopped.
Does anyone have the same experience as mine? Please help me solve this puzzle
thanks.
pdutcal
|
|
|
|
|
<<< In the name of GOD >>>
Hi.
I want to know, why we use AssertValid and Dump in SDI and MDI mode ?
Does thease won't work by RELEASE compile mode ? (In MSDN)
Hadi Rezaie
|
|
|
|