|
hallo
i want make an special combobox control (like windows make when
we open a file with editbox )
in fact i have trying with a normal combobox:
//void CXcomboDlg::OnEditupdateCombo1()
//{
//CListCtrl *m_List = new CListCtrl;
//m_List->Create(WS_VISIBLE | WS_BORDER , //CRect(118,110,283,300),this,IDC_LIST_TABLE);
//m_List->SetExtendedStyle(LVS_EX_GRIDLINES|LVS_EX_FULLROWSELECT);
//MessageBox("DDDDDDD");
//delete m_List;
//}
1) i have problem with dynamically using CListCtrl
2) and i dont know is it an ready control that make that or not
thanks
mlabidi
|
|
|
|
|
Hi,
I'm trying to implement bulk insert using CRecordset derived class.
I'm now in a position that I can bulk update and delete exists records, but can't add new. The strange thing is that I can add #x records where x is the number of exists records in that table. It means that the Open method of the CRecordset (actually the Move method) 'mark' something that make the allocated bulk buffer valid for add/update/delete operations, but when the table is empty no buffer records has this 'mark' and the add fails. The problem is that I can't find the way to do this 'mark' myself. I tried to change the status array values to SQL_ROW_PROCEED but it didn't work.
Can anyone please help ? code will be appreciated...
|
|
|
|
|
How can I send a pm from yahoo messenger? Anybody can help me?![Confused | :confused:](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_confused.gif)
|
|
|
|
|
IS Yahoo PM related with VC++
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Ofcourse yes! I've a project and I need 2 send some data to someone's yahoo IM ID, using Yahoo! IM online.
Is this ok?;)
|
|
|
|
|
Yeah,you are right.
as far i know yahoo doesnot provide any open source support for developer.i think you have to this by hacking into process space of yahoo messenger.
yeah yahoo provide sending of Datafiles from one computer to other using messenger may be you find some hack there.
good luck
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hello, buddies,
My program is a Win32 screen-saver program(ie, .SCR file), during its running process, it will launch another Win32 program to do certain things, and after this screen-saver program exits, that Win32 program may pop up a window for showing some information to the user.
Here's my problem: on the WinNT-based platform (WinNT/2K/XP), when the screen-saver is set to be password protected (ie, the user needs to input the password to login the system after the screen-saver exits), the Win32 program which launched by the screen-saver is immediately terminated also when the screen-saver exits, so that Win32 program doesn't have the opportunity to show the information dialog.
It's seem that That Win32 program is terminated by the system when the screen-saver ends, and this's maybe relate to something like "desktop switch", because the password-protected screen-saver is running on the so-called "screen-saver" desktop, and the other program launched by the screen-saver is also running on this desktop, the screen-saver ends, the "screen-saver" desktop disappears, so the other program dies as well...
The above is my opinion for this problem, so I tried to do somethings like switch the desktop in the screen-saver and the other program, but failed, that problem still exists.
So, does anyone can tell me: How to let the another program still run after the password-protected screen-saver ends?
Thanks!
|
|
|
|
|
I have an MFC application that loads data from a database. I created a user interface thread based on CWinThread that displays a modal dialog with a text box and a cancel button. The user can click the cancel button to abort the load. The load takes place ( and the dialog is created ) in the OnNewDocument handler of the main app. The first time it works perfectly but if I click File New the UI thread gets stuck in the dialog creation code somewhere and the dialog is not displayed. When the load function completes it does a PostThreadMessage to the new thread sending a WM_QUIT message and waits for the UI thread to close. Because the UI thread is stuck it doesn't respond and the application stalls.
Any ideas?
|
|
|
|
|
Hi,
Put a break point @ on new document & Oninitdialog of the dialog and check where it is getting struck. Sometimes the callstack may give you more information regarding the location.
Have a look @ this link on UI Threads it will surely help you
http://flounder.com/uithreads.htm.
This may help you
Sujan
|
|
|
|
|
Make it a modeless dialog instead. Even if you do keep it in the secondary thread.
Then you can just hide and show it, and each time the OnFileNew is called, you won't have to keep trying to create/destroy a window.
|
|
|
|
|
hello...
does any of you have any idea how to hide or close the console window without terminating your whole process? I've been experimenting lately with Win32 console application with MFC support... My rpogram basically communicates with a RAID system through the serial port.
My program is already working fine but I wanted to hide the console window while my program is running. Is there a way to hide the console window and just display my UI?
if any of you have any idea, you can reply to this post or email me personally...
my email add is dimitri_sjp@yahoo.com
thanks !!!
sunrise... sunset... sunrise... sunset... sunrise... sunset...
|
|
|
|
|
You should create Win32 or MFC application to hide console.
ARSALAN MALIK
|
|
|
|
|
megiddo wrote:
...does any of you have any idea how to hide or close the console window...
Which console wiondow?
megiddo wrote:
Is there a way to hide the console window and just display my UI?
If you have a handle to the console window (e.g., GetConsoleWindow() ), just send it a WM_SHOWWINDOW message.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Dear friends,
I want to add "scripting support" in my application. i.e i want the end users to write the code at run time and then i want my application to execute it. I also want to pass the parameters to the scripts and want scripts to call back the methods in my application.
Can anyone tell me what is the best approach to follow ???
Imtiaz
|
|
|
|
|
I just did this by working from the article at
http://www.microsoft.com/mind/0297/activescripting.asp
Good luck... ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
hey guys! i have this socket issue... im trying to connect using this command..
pSockCon->Connect("1.1.1.26", 777)... it works fine as i see the output on my socket workbench... but when i try to connect using this... pSockCon->Connect("1.1.1.26", 2103)... it still connects eventhough i stop already my socket workbench from listening to that port.. actually i cant listen with port number 2103 and it says there "operating system reports:10048 Address in use".. whats with the port 2103? is it always active? my program hangs everytime i use the port 2103 coz "Connect" returns always true eventhough my socket workbench isnt listening... pls help me.. ![Sigh | :sigh:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_sigh.gif)
|
|
|
|
|
Will anyone explain to me the advantage of one over the other - Passing the reference and passing the poniter as parameter in function calls
|
|
|
|
|
Hi
My understanding is there is not much difference in using reference and pointers for function calls.
Using reference makes the code neat and does the work of a pointer. It comes handy while using operator overloading etc.
Go through this article
http://www.embedded.com/showArticle.jhtml?articleID=9900082[^]
regards
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
The main advantages of references are that they are strongly type-safe, and cannot be NULL. Sometimes, passing NULL is a valid option, so a reference can't be used. Also, references are not suitable for things like data buffers or arrays, where the type of the data is unknown or variable, or the length of the data is variable. For example, a char* can point to one or more characters, but a char& is a reference to a single character.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have a function
Swap(int& a, int& b)
Does your statement "Sometimes, passing NULL is a valid option, so a reference can't be used" means that I cannot call Swap(2, NULL)(for eg.)
It will not give any error. I am using MS VC++ 6.0
|
|
|
|
|
Ranjish wrote:
Does your statement "Sometimes, passing NULL is a valid option, so a reference can't be used" means that I cannot call Swap(2, NULL)(for eg.)
Yes, for two reasons. First, you cannot supply a constant literal (2) as a non-constant reference. Second, you cannot pass NULL as a reference. A reference must always refer to an object.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi Ryan,
I am using MS VC++ 6.0.
The below code will work.
#include <iostream.h>
void Swap(int& a, int& b)
{
a += b;
b = a - b;
a -=b;
}
int main()
{
int x = 2;
int y = NULL;
Swap(x, y);
cout << x << " " << y << endl;
return 0;
}
Is it because of Converting NULL to zero before initialization.
|
|
|
|
|
There's nothing wrong with that code. You're passing x (an int) and y (an int) both as int references, so the code is fine. The contents of the variables don't make any difference, as long as they are variables.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Will anybody expain to me who calls Main() in Windows and where does main returns. Who uses the return value for wht purose. PLease don't just answer it as OS. I am looking for a detailed answer
|
|
|
|
|
Hi,
Open an appln in VC++ give F11(Step Into) it will open up the APPMODUL.CPP file there you can see _tWinMain
Sujan
|
|
|
|