Click here to Skip to main content
15,915,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help to debug Error!! Pin
James R. Twine28-Jan-05 2:44
James R. Twine28-Jan-05 2:44 
GeneralRe: Help to debug Error!! Pin
Anonymous28-Jan-05 13:43
Anonymous28-Jan-05 13:43 
GeneralRe: Help to debug Error!! Pin
James R. Twine28-Jan-05 13:55
James R. Twine28-Jan-05 13:55 
Generalpopulate list view in VB from VC++ dll using SendMessage Api Pin
Mohamed Jaffar Sagir27-Jan-05 21:05
Mohamed Jaffar Sagir27-Jan-05 21:05 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
S Douglas27-Jan-05 23:33
professionalS Douglas27-Jan-05 23:33 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
Mohamed Jaffar Sagir28-Jan-05 1:54
Mohamed Jaffar Sagir28-Jan-05 1:54 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
S Douglas28-Jan-05 3:52
professionalS Douglas28-Jan-05 3:52 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
Mohamed Jaffar Sagir28-Jan-05 4:15
Mohamed Jaffar Sagir28-Jan-05 4:15 
Smile | :) enjoy the weekend

please find the snippet..

VC++ code:

**************************************************

DLL_EXPORT_VB void __stdcall RegisterLogWindow(HWND hwndMsgLog, HWND hwndMsgRqst )
{
TCHAR msgString[512];
memset(msgString, 0, sizeof (msgString));

SYSTEMTIME st;
GetLocalTime(&st);

wsprintf(tempString, _TEXT(" Dt: %02d:%02d:%04d - %02d:%02d:%02d:%03d "), st.wDay, st.wMonth, st.wYear, st.wHour, st.wMinute, st.wSecond, st.wMilliseconds );

_tcscat(msgString, tempString );

int iItem=SendMessage(hwndMsgRqst,LVM_GETITEMCOUNT,0,0);

//LVITEMW LvItem;
LVITEMW LvItem1;
LvItem1.mask=LVIF_TEXT; // Text Style
LvItem1.cchTextMax = 256; // Max size of test
LvItem1.iItem=iItem ; // choose item
LvItem1.iSubItem=0; // Put in first coluom
LvItem1.pszText= msgString; // Text to display (can be from a char variable) (Items)

int hr = SendMessage(hwndMsgRqst,LVM_INSERTITEM,0,(LPARAM)&LvItem1); // Send info to the Listview

int err = GetLastError() ;

}
**** hr and rr returns 0.... itemcount got is correct
************************************

VB snippet

Declare Function RegisterLogWindow Lib "ToolsEng.dll" (ByVal hLogWindow As Long, ByVal hMsgWindow As Long) As Long

RegisterLogWindow lbEclipseEventLog.hWnd, ListView1.hWnd
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
S Douglas31-Jan-05 1:07
professionalS Douglas31-Jan-05 1:07 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
James R. Twine28-Jan-05 2:58
James R. Twine28-Jan-05 2:58 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
Mohamed Jaffar Sagir28-Jan-05 4:01
Mohamed Jaffar Sagir28-Jan-05 4:01 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
James R. Twine28-Jan-05 13:48
James R. Twine28-Jan-05 13:48 
GeneralMX query through NSlookup Pin
Ankit Aneja27-Jan-05 20:21
Ankit Aneja27-Jan-05 20:21 
GeneralRe: MX query through NSlookup Pin
ThatsAlok27-Jan-05 20:28
ThatsAlok27-Jan-05 20:28 
GeneralRe: MX query through NSlookup Pin
Ankit Aneja27-Jan-05 20:34
Ankit Aneja27-Jan-05 20:34 
GeneralRe: MX query through NSlookup Pin
22491727-Jan-05 21:27
22491727-Jan-05 21:27 
GeneralRe: MX query through NSlookup Pin
Ankit Aneja27-Jan-05 22:12
Ankit Aneja27-Jan-05 22:12 
GeneralImageList Control Pin
Rajmathi27-Jan-05 19:57
Rajmathi27-Jan-05 19:57 
QuestionHow to split pcl data file to print separate page Pin
hunghn27-Jan-05 19:40
hunghn27-Jan-05 19:40 
Generalproblem in dns query Pin
Ankit Aneja27-Jan-05 19:08
Ankit Aneja27-Jan-05 19:08 
Questionhow to make word so that it doesnt create .tmp Pin
Jetli Jerry27-Jan-05 18:11
Jetli Jerry27-Jan-05 18:11 
AnswerRe: how to make word so that it doesnt create .tmp Pin
shaveyourhead27-Jan-05 18:27
shaveyourhead27-Jan-05 18:27 
GeneralRe: how to make word so that it doesnt create .tmp Pin
Jetli Jerry27-Jan-05 20:07
Jetli Jerry27-Jan-05 20:07 
AnswerRe: how to make word so that it doesnt create .tmp Pin
David Crow28-Jan-05 2:58
David Crow28-Jan-05 2:58 
GeneralMulti-user server Pin
Timothy Grabrian27-Jan-05 17:26
professionalTimothy Grabrian27-Jan-05 17:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.